Tuesday 15 May 2012

stopPropogration with .toggle() and jQuery -


Looking to add stopPropogation to the following dropdown menu.

  $ (document) .ready (function () {$ ('.js nav # nav-ads'). Toggle (function () {$ ('.downloaddown-js'). FadeIn (); $ ('.js Toggleclass (' arrow-up ') Toggleclass (' arrow-down ');}, function () {$ (' .downdown-જેએસ '). FadeOut (); $ (' Toggleclass ('arrow-down'). Toggleclass ('arrow-up');});  

});

Note: The signature of this method was deprecated in jQuery 1.8 and was removed in jQuery 1.9 JQuery also offers an animation method designated toggle () which toggles the visibility of elements animation or eve Whether or not the root method has been removed depends on the set of arguments passed.


Modern Solutions

 < Code ($. 'Js nav # nav-ads'). (' Click ', function (e) {$ ('. Dropdown-js') .Fed Toggle (); $ ('.js nav # nav -ads span '). ToggleClass (' arrow-up arrow-down '); e.stopPropagation ();});  

No comments:

Post a Comment