Page out
<script>
function getpagenum (num) { $ ("#PageNum ul"). Empty (); var AllCount = num; var total = math.ceil (AllCount / 5); / /data can be divided by the number of pages $ ("#txtAll"). Val (total); for (var i = 1; i < total + 1; i++) { var html = "<li><a>" + i + "</a></li>"; $ ("#PagEnum ul "). Append (HTML); } var totalcount = math.ceil ( TOTAL&NBSP;/&NBSP;8);//page var per eight pages current = 1; $ ("# PAGENUM&NBSP;UL&NBSP;LI:GT (7) "). Hide (); $ ("#btnPrev"). attr ("Disabled", "Disabled"). Click (function () { $ ("#btnNext"). Removeattr ("Disabled"); current - = 1; $ ("# Pagenum ul li "). Hide (); var indexstart = (current - 1) * 7; var indexEnd = indexStart + 7; $ (" #PageNum ul li "). Hide (). Slice (Indexstart, indexend). Show (); if (current == 1) $ (this). attr (" Disabled ", " disabled "); }); $ ("#btnNext"). Click (function () { $ ("# Btnprev "). Removeattr (" disabled "); current += 1; $ ("# Pagenum ul li "). Hide (); //$ ("#PageNum ul li"). Show (); var indexStart = (current - 1) * 7; var indexend = current * 7 - 1 > $ ("#PageNum ul li "). length - 1 ? $ (" #PageNum ul li ") .length - 1 : current * 7 - 1; $ (" #PageNum &Nbsp;ul li "). Hide (). Slice (indexstart, indexend+1). Show (); // $ ("#PageNum ul li:lt (" + indexstart + "), li:gt (" + indexEnd + ")", $ ("#PageNum ul")). Hide (); if ( Current == total) $ (this). attr ("Disabled", "disabled"); }); $ ("#PageNum ul li"). Click ( function () { //Click Digital var index = $ (This). Index (); getpagecurrent (index); }) $ ("#btnConfirm"). Click (function () { var index = $ ("#txtIndex"). Val (); getpagecurrent (Index - 1), }) } function getpagecurrent ( Index) {//index is the indexed value for the page you want to query var indexStart = index * 5; var indexEnd = indexStart + 5; $ (" #thumbWrap_controlID ul li"). Hide (). Slice (Indexstart, indexend). Show (); }
</script>
HTML code:
<div class= "products_contents" id= "Product" > <div class= "Thumbwrap" > JQuery Paging Control features