If you put a canvas element with a specific ID in a widget you should be able to check it's existence with $('#idofcanvas').length if it only appears on one category then the check will return false on all other pages.
sticky sidebar widgets
-
how can I do it?
-
sad
-
I could not
-
css
@media screen and (max-width:1200px) { .affix, .affix-bottom { display: none; } } .affix-top { position: relative; } .affix { top: 70px; } .affix { width: 263px; }
widget container
<div data-spy="affix" class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">{{title}}</h3></div> <div class="panel-body">{{body}}</div></div> </div>
-
@baris said in sticky sidebar widgets:
$(window).on('action:ajaxify.end', function () {
$('[data-spy="affix"]').affix({
offset: {
top: 400,
bottom: function () {
return (this.bottom = $('.footer').outerHeight(true))
}
}
});
});Thank you very much @baris. it worked