I have a dynamic page which has a parent div called 'divWiz' where I have to do the following:
count total div's inside 'divWiz' and hide 50% of them. For example: If I have 50 child div's inside divwiz, I want to show 25 and hide the rest.
At the end of the 25 div's, two links should appear that says 'Show Next' and 'Show All'.
If the user clicks the 'Show Next' link, the first 25 should be hidden and the next 25 visible. 'Show Next' link should be invisible now.
If the user clicks 'Show All', all the div's should be visible. Both the links will disappear once the user clicks Show All.
How can I do this? Since this involves lot of traversing, I am looking for jquery code with performance.