New mobile header

Add job pages
More news button on home page links to news page
Small mobile fixes for new page and other pages
This commit is contained in:
Jorit Tijsen
2024-04-03 16:38:10 +02:00
parent 249f7a7d4c
commit 4aa1fef3ad
27 changed files with 157 additions and 76 deletions

View File

@@ -3,13 +3,13 @@
* @param {object} _options
*/
$.fn.loadMoreNews = function (_options) {
var nextPage = 2;
var isLoading = false;
var page = 1;
var options = {
loadingElementId: '#loading',
container: '',
url: document.location.pathname
url: document.location.pathname,
nextPage: 2
};
$.extend(options, _options);
@@ -26,7 +26,7 @@
var $container = $(options.container)
// Fire request for the next page
$.ajax({url: options.url + (options.url.indexOf('?') >= 0 ? '&' : '?') + 'pagina=' + nextPage})
$.ajax({url: options.url + (options.url.indexOf('?') >= 0 ? '&' : '?') + 'pagina=' + options.nextPage})
.always(function () {
// Whether success or failure, update the UI again
isLoading = 0;
@@ -45,7 +45,7 @@
var id = this.toString();
$(id).append($('<div>'+data+'</div>').find(id).length ? $('<div>'+data+'</div>').find(id).children() : $(data));
});
++nextPage;
++options.nextPage;
});
}
});