/ Published in: jQuery
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
Copy this code and paste it in your HTML
$('a.orange_button_end').click(function() { var p = $(this).parent().parent().parent().find('div.promo_box_pop_up').slideToggle('fast', function() { // Animation complete. }); });
URL: http://www.newvisions.ch/courses/