Created
March 29, 2016 02:52
-
-
Save mashiox/db6b8736380ae5d0cce5 to your computer and use it in GitHub Desktop.
Pagination Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paginationClickHelper = function (event) { | |
event.preventDefault(); | |
try { | |
if ($("li#" + event.currentTarget.id).hasClass("pagination").toString()) { | |
$("div#displayTable").hide(); | |
$("div.table" + event.currentTarget.id).show(); | |
// update pagination | |
var $listItems = $('li'); | |
$listItems.removeClass('active'); | |
$("li#" + event.currentTarget.id).addClass('active'); | |
} | |
} catch (e) { | |
// ignore this | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.ticket.events({ | |
'click li': function (event) { | |
paginationClickHelper(event); | |
}, | |
'submit .new-search': function (event) { | |
events.preventDefault(); | |
event.target.text.value = ""; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment