English 中文(简体)
jQuery Colorbox Custom Pagination
原标题:

I have a list of links that are inserted into a DIV element using jQuery and ajax. The list of links are paginated where I only show 10 links at a time. After the ajax call completes and the links are inserted into the DIV, I use the jQuery Colorbox plugin to open the link up in a nice Colorbox. Colorbox automatically groups the links that are on the page and generates pagination for them in the Colorbox.

However, since I am paginating the links when they are returned via ajax, Colorbox only sees 10 items at a time. When it generates the pagination it s not aware that there are more items that need to be included in the pagination. As a result, if I need to go past the first 10 items, I have to close the colorbox and go to the next page of links.

Can anyone help me with hooking into the method(s) in which Colorbox generates the pagination? I d like to leverage the built in pagination functionality but not sure how I can achieve this without doing something outside of Colorbox completely.

问题回答

looks as if you would have to append new elements to the $related variable. looks also as if this variable is private, so you would have to add another function for adding images on the fly.





相关问题
Pagination problem

I m using this code for my pagination, and I d like the user s choice to be persistent throughout the site (this has been solved so far)...the only problem now is that the session variable now is ...

mod rewrite problem with 2 parameters

I m trying to rewrite the categoy file of my shop system, I also integrated a pagination so I need to rewrite 2 parameters. it almost works, otherwise I wouldn t be posting in here this is the ...

Issues with pagination in ASP.NET MVC

I am trying to implementation the same pagination that is used in the NerdDinner ASP.NET. I am receiving the following error in my view, whenever the pagination starts to kick in. "A route named ...

Pagination in SQL Server

How do i limit the result of a query (in my case about 60K rows) and select only from the X row to the Y row? If I use ROW_NUMBER() I don t like my query because it involves 2 select queries .. one ...

Cakephp 1.2 Paginator and PassedArgs

Problem: when i have a search resultset with pagination, the links next, prev and numbers do not keep the search parameters. Seems to be a common problem. I searched everywhere on the internet, and ...

Flexible pagination in Django

I d like to implement pagination such that I can allow the user to choose the number of records per page such as 10, 25, 50 etc. How should I go about this? Is there an app I can add onto my project ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

热门标签