|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions Creating a "Next"/"Previous" button for a pag. |
Creating a "Next"/"Previous" button for a pag. |
I have a picture and video section on my site and I want to know how I can make a button for both those pages (e.g page 1 of 30 or "Next", etc.) that will allow whoever visits the site to go to a next page that contains either more pictures or videos and so on.
http://llamasarepeople.ucoz.com/ |
You should install Video and Photo Album Module for videos and photos. Then, using below code for Next and Previous page.
Code <div id="pages"></div> <script> a=location.href; b=a.split('-'); c=b.length; d=eval(c-1); e=b[d]; f=a.split('-'+e)[0]; $('#pages').html('<a id="b" href="'+f+'-'+eval(e-1)+'"><img src="http://icons.iconarchive.com/icons/gakuseisean/ivista-2/96/Alarm-Arrow-Left-icon.png" border="0"></a><span id="i"> </span><a id="a" href="'+f+'-'+eval(e*1+1)+'"><img src="http://icons.iconarchive.com/icons/gakuseisean/ivista-2/96/Alarm-Arrow-Right-icon.png" border="0"></a>'); $.ajax({ type: 'GET', url: f+'-'+eval(e*1+1), error: function(){$('#a, #i').hide();} }); $.ajax({ type: 'GET', url: f+'-'+eval(e-1), error: function(){$('#b, #i').hide();} }); </script> |
Thanks, but is there a way to make it work for only the sub categories?
|
| |||
| |||