i have a jquery problem with lists.
I have a big list and i want when a link is clicked;
each time the next 5 items of that list will be shown and the previous items hide.
How can i do this?
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
Onload this should be shown:
1
2
3
4
5
when clicked on “next”
6
7
8
9
10
when clicked on “next”
11
12
13
14
15
Thanks in advance !
Here’s an option:
http://jsfiddle.net/JQq5n/
Don’t know how/if you plan to show the previous items so I’ve left that out