I have a unordered list on which I want to plugin bootstrap-pagination.js.

https://github.com/limodou/plugs/blob/master/plugs/ui/bootstrap/static/bootstrap/2.0.3/js/bootstrap-pagination.js

According to Limodou this is the way it should work:


The common usage is like this:

function callback(page){
  //do what you want to do
}
var options = {
  pageRows:page_nums
, onChange:callback
, next: 'Next'
, prev: 'Prev'
, first: 'First'
, last: 'Last'
, totalMessage: 'Total $pages pages / $records records'
};
$(el).pagination(options);
$(el).pagination('show', total, start);

So you can swith page process in callback.


This is the list:

<ul>
  {{for r in rows:}}
    <li>
      <div class="row-fluid" style="margin-bottom: 9px;">
        <div class="span2">
          <img src="{{=URL('static','bootstrap/img/icons/%s' % r.icon)}}" 
alt="{{=r.name}} icon" width="24px" height="24px" />
        </div>
        <div class="span10">
          <span>{{=r.title}}</span>
        </div>
      </div>
    </li>
  {{pass}}
 </ul>


The problem is I do't get it to work.


Annet


Reply via email to