Saturday, February 5, 2011

How do I find the last sequential div with a specified class in jQuery?

Programmer Question

I have a DOM structure that looks like this:



...

...

...

...

...

...

...

...



In my javascript, I'll have the ID of the div that is getting a new reply, eg comment-2391. What I need to do is find that comments last reply, and insert a new div after that. The script is currently using append('#comment-1234') and that is working just fine, but it inserts it at the top of the replies.



Any ideas?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails