jQuery prevUntil() include start selector and end selecter

Posted by Globalz on Stack Overflow See other posts from Stack Overflow or by Globalz
Published on 2010-05-05T04:17:32Z Indexed on 2010/05/05 4:18 UTC
Read the original article Hit count: 122

Filed under:
|
|

I would like to select the start and end selector for the prevUntil() or nextUntil() jQuery selector methods. If i implement these methods now, it grabs everything between the two selectors given.

i.e. $('p').prevUntil('h1') will not include the p and h1 element, only those between them. How could I also select the p and h1 elements as well as though between?

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about selectors