Hello all,
as you can tell by the following statements, i'm new to jQuery.
I'm trying to do the following (in plain english) without too much success..
Any help would be gladly appreciated!
--
1) when document ready..
2) find the element with id 'next'.
3) pull / take all 'li' elements, and perform so and so, all whilst excluding 'last' element.
- $(document).ready(function() {
- $('#next').click(function() {
- $('li').each(function() { //for each li ..
-
- $(this).filter(':last'); //exclude last item in sequence?
- $(this).fadeOut('slow'); //fade out current
- $(this).next().fadeIn('slow'); //bring in next
-
- });
- });
- });
My questions are..
- Why is the 'filter' method not being properly executed?
- How can i perform a simple transition from one li to the next?
(when element with id 'next' is clicked) *Currently,
(with provided script) - it clicks / scrolls through all the way to last element, (quickly) and then fades out..