Skip to content

Instantly share code, notes, and snippets.

View DeskWOW's full-sized avatar

Desk.com Customer WOW Team DeskWOW

View GitHub Profile
@DeskWOW
DeskWOW / mycases.js
Last active August 29, 2015 14:09 — forked from tstachl/mycases.js
(function($) {
function nextPage(url, callback) {
$.get(url, function(data, textStatus, jqXHR) {
var cases = $(data).find('.mycases tbody tr')
, nextUrl = $(data).find('#pagination a.next_page');
callback(cases);
if (nextUrl && nextUrl.attr('href')) nextPage(nextUrl.attr('href'), callback);
}, 'html');
@DeskWOW
DeskWOW / mycases.js
Last active August 29, 2015 14:09 — forked from tstachl/mycases.js
(function($) {
function nextPage(url, callback) {
$.get(url, function(data, textStatus, jqXHR) {
var cases = $(data).find('.mycases tbody tr')
, nextUrl = $(data).find('#pagination a.next_page');
callback(cases);
if (nextUrl && nextUrl.attr('href')) nextPage(nextUrl.attr('href'), callback);
}, 'html');