Last active
August 29, 2015 13:57
-
-
Save nisar1/9524421 to your computer and use it in GitHub Desktop.
toggle 2 function in jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('.barmenu').click(function () { | |
var lwidth = '260px'; | |
if (!jQuery(this).hasClass('open')) { | |
jQuery('.rightpanel, .headerinner, .topbar').css({ marginLeft: lwidth }, 'fast'); | |
jQuery('.leftpanel').css({ marginLeft: 0 }, 'fast'); | |
jQuery(this).addClass('open'); | |
} else { | |
jQuery('.rightpanel, .headerinner, .topbar').css({ marginLeft: 0 }, 'fast'); | |
jQuery('.leftpanel').css({ marginLeft: '-' + lwidth }, 'fast'); | |
jQuery(this).removeClass('open'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment