Re: [jQuery] detecting edge cases when swapping divs

2009-12-11 Thread Charlie
next() is a sibling selector. Since it is contained within content div it will only interact with elements within content testing for length is a very handy method. if( $(this).next().length==0) {  // will return true if at bottom, would have to test after the animation, or use length==1 if

[jQuery] detecting edge cases when swapping divs

2009-12-11 Thread Abbey
Hello, I have basic js knowledge, and just started playing with jQuery. I am doing an experiment where when you click an UP/DOWN ARROW link, the box will slide up/down throughout the page. I found a generic swap function online and modified it for jQuery use. Now I want to refine it more. I'd l