473,748 Members | 9,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JQuery Paginate Plugin

Fary4u
273 Contributor
I've recently find some Paginate Plugin
but it's only came with NEXT & PRV

HERE IS THE CODE

Expand|Select|Wrap|Line Numbers
  1. eval(function(p,a,c,k,e,r){e=function(c)
  2.     {
  3.         return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))
  4.     };
  5.     if(!''.replace(/^/,String))
  6.         {
  7.             while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function()
  8.                 {
  9.                     return'\\w+'};c=1
  10.                 };
  11.             while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);
  12.             return p
  13.             }
  14.             ('o.L.M=5(c){c=o.N({3:6,2:C,s:t,u:"O",w:"P",p:"Q",x:"R",D:"S"},c);0 d;0 e;0 f=q;0 g=t;0 h=o(T);0 i;0 j;0 k=5(){h.y();e=h.z();4(h.z()>c.3){h.U(":V("+(c.3-1)+")").A();d=c.3;n()}};0 l=5(){4(!f){0 a=d+c.3;h.A();h.E(d,a).y();d=a;4(d>=e){f=t;i.B("r")}4(c.s)c.2.7("."+c.p).v(d/c.3);j.F("r");g=q}};0 m=5(){4(!g){0 a=d-c.3;h.A();h.E((a-c.3),a).y();d=a;4(d==c.3){g=t;j.B("r")}4(c.s)c.2.7("."+c.p).v(d/c.3);i.F("r");f=q}};0 n=5(){4(c.2===C){c.2=o(\'<G 8="W"></G>\');h.X(h.z()-1).H(c.2)}0 a=$(\'<a 8="\'+c.u+\'" I="#">&Y; Z</a><a 8="\'+c.w+\'" I="#">10 &11;</a>\');o(c.2).12(a);4(c.s){0 b=\'<9 8="\'+c.D+\'"><9 8="\'+c.p+\'"></9> / <9 8="\'+c.x+\'"></9></9>\';c.2.7("."+c.u).H(b);c.2.7("."+c.p).v(1);c.2.7("."+c.x).v(13.14(e/c.3))}i=c.2.7("."+c.w);j=c.2.7("."+c.u);j.B("r");i.J(5(){l();K q});j.J(5(){m();K q})};k()};',62,67,'var||pager|perpage|if|function||find|class|span|||||||||||||||jQuery|pagenumber|false|qp_disabled|showcounter|true|prev|text|next|totalnumber|show|size|hide|addClass|null|counter|slice|removeClass|div|after|href|click|return|fn|quickpaginate|extend|qp_next|qp_prev|qp_pagenumber|qp_totalnumber|qp_counter|this|filter|gt|qc_pager|eq|laquo|Prev|Next|raquo|append|Math|ceil'.split('|'),0,{}))
  15.  
it's return the page no.

Expand|Select|Wrap|Line Numbers
  1. $(function(){
  2. $("#shopping_list li").quickpaginate({ perpage: 4, pager : $("#shopping_list_counter") });
  3.     });
  4.  
i want something like next with page no.
Sep 24 '09 #1
10 4398
Fary4u
273 Contributor
the file name called jQuery.quickpag inate.packed.js

& Example is jQuery Quick Pagination
Sep 28 '09 #2
acoder
16,027 Recognized Expert Moderator MVP
Your post is confusing. Does it come with next/prev or page numbers? You've said both:
but it's only came with NEXT & PRV
it's return the page no.
Usually, when code is obfuscated like this, you're better off writing your own, or finding one that already has the functionality, or is easily extendable.
Sep 28 '09 #3
Fary4u
273 Contributor
Thanks for reply

regarding my post it's executed fine only problem with getting per page links
it's only brining result with NEXT & PREV

variables are followings

prev : The class name for the 'prev' link(s) => "qp_next"
next : The class name for the 'next' link(s) => "qp_prev"
counter : The class name for the span that wraps the counter => qp_counter
totalnumber : The class name for the span that wraps the total number of pages => "qp_totalnumber "
pagenumber : The class name for the span that wraps the current page count => "qp_pagenum ber"
& " return page no " mean how many items you want to show on per page.

i'm sure you know about " jquery pagination " but have a look following link it's also based on same methord but in different way it's call " jquery quick paginate "

http://plugins.jquery.com/project/quick_paginate

http://projects.allmarkedup.com/jquery_quick_paginate/
Sep 29 '09 #4
acoder
16,027 Recognized Expert Moderator MVP
Since this is not built-in, and you haven't written it, I would recommend that you just use one of the other plugins that does support page numbers.
Oct 1 '09 #5
Fary4u
273 Contributor
well there is few plugins available for this pagnation

but now recently i came accross 1 advance thing that mostly JQuery came as packed code & it's very hard to read & understand, if you need to do something then all you need is to make it as unpacked & do you own programming.

thanx for ur reply
Oct 9 '09 #6
acoder
16,027 Recognized Expert Moderator MVP
Yes, you posted the packed version (p,a,c,k,e,r should've been the clue), but an unpacked version is also available.
Oct 12 '09 #7
Fary4u
273 Contributor
yep i've done my job what i'm looking for.
Oct 12 '09 #8
acoder
16,027 Recognized Expert Moderator MVP
That's good to hear. Perhaps you could post your code for the benefit of others.
Oct 13 '09 #9
Fary4u
273 Contributor
yep sure & i always be there 4 evey one : )
also i've changed this code with my own requirments here's the code
Expand|Select|Wrap|Line Numbers
  1. jQuery.fn.quickpaginate = function (c) {
  2.     c = jQuery.extend({
  3.         perpage: 6,
  4.         pager: null,
  5.         showcounter: true,
  6.         prev: "qp_next",
  7.         next: "qp_prev",
  8.         pagenumber: "qp_pagenumber",
  9.         totalnumber: "qp_totalnumber",
  10.         counter: "qp_counter"
  11.     },
  12.     c);
  13.     var d;
  14.     var e;
  15.     var f = false;
  16.     var g = true;
  17.     var h = jQuery(this);
  18.     var i;
  19.     var j;
  20.     var k = function () {
  21.         h.show();
  22.         e = h.size();
  23.         if (h.size() > c.perpage) {
  24.             h.filter(":gt(" + (c.perpage - 1) + ")").hide();
  25.             d = c.perpage;
  26.             n()
  27.         }
  28.     };
  29.     var l = function () {
  30.         if (!f) {
  31.             var a = d + c.perpage;
  32.             h.hide();
  33.             h.slice(d, a).show();
  34.             d = a;
  35.             if (d >= e) {
  36.                 f = true;
  37.                 i.addClass("qp_disabled")
  38.             }
  39.             if (c.showcounter) c.pager.find("." + c.pagenumber).text(d / c.perpage);
  40.             j.removeClass("qp_disabled");
  41.             g = false
  42.         }
  43.     };
  44.     var m = function () {
  45.         if (!g) {
  46.             var a = d - c.perpage;
  47.             h.hide();
  48.             h.slice((a - c.perpage), a).show();
  49.             d = a;
  50.             if (d == c.perpage) {
  51.                 g = true;
  52.                 j.addClass("qp_disabled")
  53.             }
  54.             if (c.showcounter) c.pager.find("." + c.pagenumber).text(d / c.perpage);
  55.             i.removeClass("qp_disabled");
  56.             f = false
  57.         }
  58.     };
  59.     var n = function () {
  60.         if (c.pager === null) {
  61.             c.pager = jQuery('<div class="qc_pager"></div>');
  62.             h.eq(h.size() - 1).after(c.pager)
  63.         }
  64.         var a = $('<a class="' + c.prev + '" href="#"><img border=0 src=libs/L.jpg></a><a class="' + c.next + '" href="#"><img border=0 src=libs/R.jpg></a>');
  65.         jQuery(c.pager).append(a);
  66.         if (c.showcounter) {
  67.             var b = '<span class="' + c.counter + '"><span class="' + c.pagenumber + '"></span> / <span class="' + c.totalnumber + '"></span></span>';
  68.             c.pager.find("." + c.prev).after(b);
  69.             c.pager.find("." + c.pagenumber).text(1);
  70.             c.pager.find("." + c.totalnumber).text(Math.ceil(e / c.perpage))
  71.         }
  72.         i = c.pager.find("." + c.next);
  73.         j = c.pager.find("." + c.prev);
  74.         j.addClass("qp_disabled");
  75.         i.click(function () {
  76.             l();
  77.         });
  78.         j.click(function () {
  79.             m();
  80.         })
  81.     };
  82.     k()
  83. };
Oct 19 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
11477
by: Gale | last post by:
I'm working on something in jQuery with XPath What I want to do is: if checkbox is checked, set background color od label that contain input(checkbox) to red I have this code: $("label]").css("background", "red"); but it doesn't working because of nested brackets ] and it freeze the browser
2
1820
by: vacuno | last post by:
Hi! Im reading a xml file via http and writing this content in browser with this code in vbscript/asp: ************* <% dim xmlDom, oNode, nodeCol set xmlDom = Server.CreateObject("MSXML2.DOMDocument.4.0") xmlDom.async = False xmlDom.setProperty "ServerHTTPRequest", true
1
3947
by: Big Moxy | last post by:
This plugin can be downloaded from http://www.phpletter.com/DOWNLOAD/. I want to add 2 fields to the sample form but do not know how. The variable s.fileElementId in the function ajaxFileUpload below is the name of the file to be uploaded. I can see where it is added to the form in the createUploadForm. Can someone please show me how to add 2 fields to this form so that I can use it in the php script called by the form action method? ...
1
1155
by: joker197cinque | last post by:
I'm looking for an example like http://jqueryfordesigners.com/demo/slider-gallery.html but there is a big difference. What I have to do is a simple 2 arrows navigation at the very left of the page and at the very right of the page. Clicking left arrow I have to slide in through 3 images. The same clicking on right arrow. I tried lots of example on the web but none of them worked this way.
3
2404
by: NetWave | last post by:
Hi, For my next project I'm going to need Ajax, so I'm in about to read some books on ASP.NET Ajax. While reading Rick Strahl's blog I stumbled upon jQuery. I've been to the website and seen some examples, and it sure looks promising. However, I'm not sure how it relates to ASP.NET Ajax. Do they complement each other? Or are they concurrent products?
26
3148
by: RobG | last post by:
Do some of the regulars here need to re-think their (sometimes strident) opposition to libraries? Both Microsoft and Nokia have announced support for jQuery. It seems to have gained quite a bit of momentum, can it be considered a reasonable choice for those who want to use a full-featured, well supported library? <URL: http://jquery.com/blog/2008/09/28/jquery-microsoft-nokia/ >
53
8412
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script language="javascript" type="text/javascript">
7
6676
by: neovantage | last post by:
Hey all, I am developing a portfolio and i am having problem relate to Easy Slider 1.5 jquery plugin in IE6. It shows all the images in IE6 as it must show 1 image at a time. It is working fine in all other broswers like firefox mozilla 2+, Google Chrome, Safari, IE7+ but it is creating problem in IE8. here is the url of page where i am facing problem URL of the Page I will b very grateful if some one solve my problem. Thanks in...
5
4954
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.