Skip to content Skip to sidebar Skip to footer

Jquery - Trouble With Children

I have a container with several divs inside of it. Only one of the divs should should at a time. The container is essentially just a jQuery slider of divs. It should show and hide

Solution 1:

Using the indexer in a jQuery object returns the raw DOM element, which does not contain the show() function. You can use the eq() function instead of the indexer, which returns a jQuery object wrapping the DOM element:

children.eq(current--).show();

Post a Comment for "Jquery - Trouble With Children"