Thursday, 15 January 2015

javascript - Close last opened toggle if new clicked -


If any other click is done, then I want to close the last closed band, three of them are not related.

Here is the code:

  jQuery (function ($) {// Hamburger menu $ ("# nav-trigger span"). Click (function () { $ ("$ (" $ ("$") .removeClass ($) ("Extended"). Cloud Class ("Extended"). $ ("Nav # nav-mobile ul.expanded"). "Open"); and { $ ("Nav # nav-mobile ul") AddClass ("extended") Slidedown (250); $ (this) .addClass ("open");}}); // sliding panel $ ('panel-right '. (Slide panel' '(position:' right ', margin:' 2.5 ''}); // footer slide menu $ (".btn-slide"). (Function () {$ ("# panel ") Slide Toggle (" Slow ") ;}};}  

I managed to fix it myself Update code here Click the <$ p>

  jQuery (function ($) {// hamburger menu $ ('# nav-trigger span'.) (Function () {If ($ '(' Nav # nav-mobile ul '). Haclass (' Extended ') $ $ (' nav # nav-mobile ul.expanded '). RemoveClass (' extended '). SlideUp (250); $ (this ) .removeClass ('Open');} and {$ ('Navigation # NAV Mobile Ul'). Adclass ('extended') Slide down (250); $ (This). AndClass ('Open'); } // Close the footer panel if open $ ('# panel: visible'). Slide Toggle (); // Close the side panel with tabs tab $ ('#panel-right'). Sammet ({true: 0, width: 40}, 250, function () {}). RemoveClass ('opened');}) // Start slide panel $ ('# panel-right'). Sliding Panel ({status: 'right', margin: '2.5'}); // If the other parties are closed, SandPanel is clicked on the $ ('. Tab'). Click Close ($ function () {// close footer if open $ ('# panel: visible') SlideTag (); // Close menu if open $ ('nav # nav-mobile ul.expanded') RemoveClass (' Expanded '). SlideUp (250); $ (' # nav-trigger span ') .removeClass (' open ');}); // footer slide up menu $ ('btn-slide'). Click (function () (// show footer panel $ ('# panel') Slide Toggle ('Slow'); // Close menu if open $ (('# nav-mobile ul.expanded'). RemoveClass ( 'Expanded') SlideUp (250); $ ('# NAV-Trigger Span'). RemoveClass ('Open'); // Open Tab Lock Side Panel $ ('# Panel-Right'). ({OK: 0 , Width: 40}, 250, function () {}). RemoveClass ('opened');}}}}  

No comments:

Post a Comment