Giter VIP home page Giter VIP logo

codeigniter-ajax-pagination-library's Introduction

Greetings!

My name is Sean Patterson, and after using this VERY helpful jQuery Pagination
library for CodeIgniter, I wound up adding a couple updates that I thought would
be helpful for the project.

1. The anchor_class variable has been added to this library, to mirror what is
   available in the original CodeIgniter pagination library. If you need to
   assign a CSS class to all of the links in your pager, simply set the 
   anchor_class variable in your initialization:
   
   $ajax_pagination_config['anchor_class'] = 'page_link';
   
   This will apply the appropriate class to every anchor tag.

2. I've added a variable to optionally hide the "Showing 10 to 20 of 100" text
   that shows up in the pager. I needed this text hidden for my pagers, and
   initially I commented out the code entirely, but thought it would be much
   nicer to add that as an option. To enable/disable the "count" text, use the
   following variable in your initialization:
   
   $ajax_pagination_config['show_count'] = false;
   
   By default this value is set to true if you do not configure it.
   
I hope this helps folks out there. CodeIgniter is a great tool and the AJAX
pagination provided by jQuery in this code has helped me even more!

[:: Sean ::]
[:: http://about.me/dillieo ::]

*** Original README ***

Hi My name is Amzad Hossain Tohin
Blog:  tohin.wordpress.com



How to Use JQuery Pagination: 


The use is same as the built in pagination system with extra config parameter :
	$config['div'] = '#content'; /* Here #content is the CSS selector for target DIV */
	$config['js_rebind'] = "alert('it works !!'); "; /* if you want to bind extra js code */
    $config['additional_param'] = 'serialize_form()'; /* If you are using ajax pagination with Search */
    

Requirements: Make sure you have added the Jquery.js file on top of the view file. 

Put "Jquery_pagination.php" file in you application/library folder.

Don't forget to use : $this->jquery_pagination->  instead of $this->pagination



/* Include Searching with Ajax Pagniation */

1. You have a form with id 'myform' before pagination. Which holds input, textarea, selectbox etc for filtering. 
2. Create a function in view file as : 

<script type="text/javascript">
	function serialize_form() {
    	return $('#myform').serialize();
    }
</script>

3. Now add another parameter in Config of jquery pagination:
	$config['additional_param']  = 'serialize_form()';
    
4. Now you will receive filtering datas as POST in your pagination function in controller. 



Original Post Link : http://tohin.wordpress.com/2008/08/12/codeigniter-ajax-pagination/
Example Post Link : http://tohin.wordpress.com/2008/10/07/codeigniter-ajax-pagination-exampleguideline/

codeigniter-ajax-pagination-library's People

Contributors

dillie-o avatar neotohin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.