Hi Everyone,

So I am modifying the Sortables example found here:
http://interface.eyecon.ro/demos/sort.html

Basically, where the expand/collapse links exist, I am wrapping some
new html around them for better positioning, etc...

When doing this, it breaks the toggle function. I believe it has to do
with this line:

var targetContent = $('div.itemContent', this.parentNode.parentNode);

What exactly is the 2nd argument for in this case, after
div.itemContent?

I made a fix by adding a 3rd parentNode, but I don't want my HTML
completely dependent on the 2nd argument.

Because the expand/collapse links exist inside div.itemHeader, can't I
just target that main div instead of the multiple parentNode option?

Something like this I hope would work, but it doesn't.
var targetContent = $('div.itemContent', $('div.itemHeader'));

Or is it possible to use $(this) div.itemHeader or something?

Thanks,
Bryan

Reply via email to