JobsInDarwin.com is for sale for $4,888.00

Inquire Now

We found course with a category of

History

Post a Course, It's Free!
]; var randomNumber = getRandomIntInclusive(0,ads.length - 1); advertisingHtml = ads[randomNumber]; $(this).html(advertisingHtml); countAD = countAD + 1; }); } function BuildPagination(currentPage, tabName, totalRecords, limit){ var totalPages = Math.ceil(totalRecords / limit); var html = ""; if(currentPage > 1) { html += 'Previous'; } if(currentPage === 1){ html += '1'; html += '2'; html += '3'; } else if (currentPage === totalPages){ html += '' + (currentPage - 2) + ''; html += '' + (currentPage - 1) + ''; html += '' + currentPage + ''; } else { html += '' + (currentPage - 1) + ''; html += '' + currentPage + ''; html += '' + (currentPage + 1) + ''; } if(currentPage < totalPages) { html += 'Next'; } $("#" + tabName + " .pagination").empty(); $("#" + tabName + " .pagination").append(html); var myVars = setInterval(function(){ setadvertisement(); clearInterval(myVars); },1000); } function GetWorkInResults(){ data.keywords = $("#keywords").val(); data.limit = 15; data.page = WorkInPage; $.ajax({ url: 'http://api.workinlocal.com/api/workincourse', type: 'POST', data: data, dataType: 'jsonp', error: function(xhr, status, error) { }, success: function(json) { var html = template(json); $("#workin .panels-wrapper").append(html); WorkInCount = json.TotalRecords; UpdateTotalRecords(); if (WorkInCount > 15){ BuildPagination(WorkInPage, "workin", WorkInCount, 20); } } }); } function UpdateTotalRecords(){ var totalRecords = WorkInCount; $("#totalRecords").text(totalRecords); } function ClearTabs(){ $("#workin .panels-wrapper").empty(); WorkInCount = 0; } function ClearTab(tab){ $("#" + tab + " .panels-wrapper").empty(); } function GetResults(){ ClearTabs(); $("#totalRecords").text(totalRecords); GetWorkInResults(); } $(function(){ GetResults(); $("#filterButton").click(function(){ GetResults(); }); $(".left-job-panel").on("click",".pagination a", function(e){ e.preventDefault(); var tab = $(this).attr("data-tab"); var page = $(this).attr("data-page"); ClearTab(tab); switch(tab){ case "workin": WorkInPage = parseInt(page); GetWorkInResults(); break; } }); });