/ Published in: jQuery
URL: http://www.newvisions.ch/courses/
Useful jQuery for mutliple items on a page that are using the same jquery function and classes to perform an action. By traversing the dom like this the function will only be applied to the item you are clicking on and not all elements on the page that have the class specified in the jQuery function.
Expand |
Embed | Plain Text
$('a.orange_button_end').click(function() { var p = $(this).parent().parent().parent().find('div.promo_box_pop_up').slideToggle('fast', function() { // Animation complete. }); });
You need to login to post a comment.
