Galanthus wrote:Hi,
I have this code with a iframe video.
<div class="gsvideo" id="header-video">
<div class="gsvideo__modal">
<div class="modal">
<div class="modal__close"><span class="gs-icon-delete"></span></div>
<div class="gsvideo__iframe">
@Html.Action("TopicBlock", "Topic", new { systemName = "home-header-video" })
</div>
</div>
</div>
<div class="gsvideo__overlay"></div>
</div>
How can i show this video only if it is a specific page?
Thanks
Setup a class for a div you want, say active/inactive. In your css file:
.active { display: block; }
.inactive { display:none; }
and you can use cheeky quick javascript to simply edit the class of the container depending on whatever condition you want
if ( your condition ){
$('.modal').removeClass("inactive").addClass("active");
}
if ( opposite condition ){
$('.modal').removeClass("active").addClass("inactive");
}
For example. When you're working with looks, making something visible/invisible, css classes are your best friend, 99% of cases :) imo