I want to add a slide up affect with jQuery to a DIV when a link inside of the DIV is clicked, but the problem i am running into is the class of the DIV’s are defined by a loop. So, i can’t define the DIV class in the jQuery line, because each DIV class is different and i cannot determine ahead of time what they are. I am trying to use .parent and .child but I am not sure how to go about this. Is this making any sense?
Share
Bind to the click of the element you want (in this case I just used a simple anchor element). Then find the first parent that is a
divand perform theslideUp()effect.You can see it work here: http://jsfiddle.net/XNnSp/