Neo
July 28, 2018, 7:59am
1
Hey,
I added an animation switch on the search results page; so by default the thread previews are off, but if you want to look at them, just click on the green button and the thread previews will turn on (and back off).
See image and attached animation:
1 Like
Neo
July 28, 2018, 9:05am
2
Here is the query code which makes it all possible:
jQuery(document).ready(function(){
var mySwitch = false;
jQuery("#neo-search-results-animation").click(function(){
if(jQuery(this).hasClass("fa-toggle-on")){
jQuery(this).removeClass("fa-toggle-on");
jQuery(this).addClass("fa-toggle-off");
jQuery(".neo-threadbit-threadpreview").removeClass("neo-threadbit");
}
else if(jQuery("#neo-search-results-animation").hasClass("fa-toggle-off")){
jQuery(this).removeClass("fa-toggle-off");
jQuery(this).addClass("fa-toggle-on");
jQuery(".neo-threadbit-threadpreview").addClass("neo-threadbit");
}
jQuery(".neo-threadbit").hover(function(){
jQuery(this).css({"cursor":"pointer"});
jQuery(this).find(".neo-threadbit-threadpreview").toggle();
});
});
});