CodeIgniter Forums
Pagination Links with Javascript - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Pagination Links with Javascript (/thread-24963.html)



Pagination Links with Javascript - El Forum - 11-26-2009

[eluser]Milaan[/eluser]
Hello,

the Pagination Library works just fine on my site but i would really need to add onclick links to each pagination link and change href to [removed]void(0). Currently it looks like CI cant do this .Anyone has an idea how to accomplish this with CI ?

CodeIgniter produces this link:
Code:
<a href="/page/index/60">2</a>

and i want:
Code:
a href="javasccript:void(0);" onclick="function('/page/index/60')">  2 </a>

Milaan


Pagination Links with Javascript - El Forum - 11-26-2009

[eluser]eoinmcg[/eluser]
Hi Milaan,

You can extend the Pagination library
http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html - scroll down to 'Extending Native Libraries'

Alternatively you could use something like jQuery to sniff out the pagination links and change them as required

Hope that helps


Pagination Links with Javascript - El Forum - 12-18-2009

[eluser]HarishKumar[/eluser]
hi
Go to this link
http://ellislab.com/forums/viewthread/138528/

Really help you and give u something more what you want