Sha256: 1fadb689fee8e53031d011f22f0a59dc0e6f413fd56ef32937398626b645f719
Contents?: true
Size: 626 Bytes
Versions: 83
Compression:
Stored size: 626 Bytes
Contents
class Tenon.features.Pagination constructor: -> $('ul.pagination').on('click', 'a', @_pageClicked) _pageClicked: (e) => e.preventDefault() @$link = $(e.currentTarget) @$pagination = @$link.closest('.pagination') @_goToPage() @_setActive() _goToPage: => $recordList = $(@$pagination.data('record-list')) $recordList .data('records-page', @$link.data('page')) .find('li').addClass('hidden').delay(250).remove() new Tenon.features.RecordList($recordList) _setActive: => @$pagination.find('li.active').removeClass('active') @$link.closest('li').addClass('active')
Version data entries
83 entries across 83 versions & 1 rubygems