ItGo.me 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?

2020腾讯云双十一活动,全年最低!!!(领取3500元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1074

【阿里云】双十一活动,全年抄底价,限时3天!(老用户也有),
入口地址https://www.aliyun.com/1111/home

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.
BUT!
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

{e.g.
sTable,
sPagePrevEnabled,
sPagePrevDisabled,
sPageNextEnabled,
sPageNextDisabled,sPageButton:,
sPageButtonActive,
sPageButtonStaticDisabled,
sPageFirst,
sPagePrevious,
sPageNext,
sPageLast,
sPaging
}
And I see cakephp using these classes:
/** Paging **/
.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 = Array.prototype.slice.call(document.querySelecto

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----------------------------