Hi all,
This is my first topic in sitepoint forum.
I am creating dynamic div & button for pagination using javascript. My question when i enter the value in the text box the number of div was creating but it was not sorting 1,2,3… It was sorting like 2,1.
Here is the fiddle Link .
Kindly help me on sorting.
Thanks in Advance
karthic2914:
when i enter the value in the text box the number of div was creating but it was not sorting 1,2,3… It was sorting like 2,1.
When I put in 10, it creates ten buttons in a nicely sorted.
When I put in 2 and then 1, it ends up with 3 in the proper order.
Can you please instruct us further on how to experience the problem that you are having.
If you enter the number 10 I am creating 10 divs. If you see the page number right bottom div page it starting from 10,9,8… but I want from 1,2,3,4,5…
You should just need to reverse your for loop.
for (var j = count; j > 0; --j)
system
Closed
July 27, 2015, 6:50am
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.