Skip to content

Instantly share code, notes, and snippets.

@ghorvat
Created September 2, 2015 21:15
Show Gist options
  • Save ghorvat/0b230621127df1f56b81 to your computer and use it in GitHub Desktop.
Save ghorvat/0b230621127df1f56b81 to your computer and use it in GitHub Desktop.
$('.nav_trigger').click(function()
{
isClicked=$(this).data('clicked');
if (isClicked) {isClicked=false;} else {isClicked=true;}
$(this).data('clicked',isClicked);
if(isClicked)
{
jQuery("#push_sidebar_nav").css("display","block");
jQuery('.cat').click(function () {
var cThis = $(this);
isClicked2=$(this).data('clicked');
if (isClicked2) {isClicked2=false;} else {isClicked2=true;}
$(this).data('clicked',isClicked2);
if(isClicked2){
jQuery(jQuery(this).data('target')).slideDown("slow");
jQuery("#push_sidebar_nav").css("display","none");
jQuery('.previous').click(function(){
isClicked3=$(this).data('clicked');
if (isClicked3) {isClicked3=false;} else {isClicked3=true;}
$(this).data('clicked',isClicked3);
if(isClicked3){
jQuery("#push_sidebar_nav").css("display","block");
jQuery(jQuery(cThis).data('target')).slideUp("slow");
}else {
}
});
}else {
}
});
}
else
{
jQuery("#push_sidebar_nav").css("display","none");
jQuery(jQuery(".cat").data('target')).slideUp("slow");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment