How can I get the elements between 2 other elements?
Like if I had:
You could also try the following:
var selected_elems = $("div").slice(2,6);
slice(): reduce the set of matched elements to a subset specified by a range of indices.
slice()
Documentation: http://api.jquery.com/slice/