Focus on IT Recommend

Home > How to use the pagination of the JQuery plugin "dataTables" but with the same style as cakephp's pagination?

How to use the pagination of the JQuery plugin "dataTables" but with the same style as cakephp's pagination?



We are using cakephp website.

The only way I could have many data sets with a separate pagination for each dataset on one single page was by suing the great DataTables JQ plugin.
I also want the pagination to look like the rest of the website's pagination which is cakephp's(2.0) !

I tried to track what classes cakephp paginator is using from cakephp's cake.generic.css, but when I try to use those classes in oStdClasses of full_numbers method (because that's the pagination type I'm using) they don't apply or things get messed up. I know a little css but I'm not really an expert -- yet! ;) --

Any help, guidance, or ideas would be appreciated...

Update: I think what I need help with is understanding how cakephp styles each element of it's pagination and THEN match that with oStdClasses

And I see cakephp using these classes:
/** Paging **/
.paging .current,
.paging .disabled,
.paging a {..}
.paging > span {..}
.paging > span:hover {..}
.paging .prev {..}
.paging .next {..}
.paging .disabled {..}
.paging .disabled:hover {..}
.paging .current {..}

so how to make dataTables take cakephp paging classes...thats what I don't know! ;(

Recommend:jquery checkbox plugin not initialising on datatables pagination

or checkboxes which works great. However, when using pagination, on the second (or subsequent) page(s) the plugin isn't initialised. Here is the initialisation code for Switchery: var elems =

answer 1 >>---Accepted---Accepted---Accepted---

I found the solution for this problem long time ago(sorry for the delay in feedback)...and it's like always; much easier than expected!

Instead of modifying the same plugin styles...just inspect elements you want to change their style attributes and redefine same classes again in the same page AFTER invoking datatables plugin.

When two style classes with same name included in a page, the later will be the one that takes effect.

Recommend:jquery - Cakephp 3 : Ajax Pagination

query pagination But I know this is not the actual solution. Here is my code that I have tried $('document').ready(function(){ $(".pagination a").click(function(){ $("body").load(this.href); return fals

------splitte line----------------------------