Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).on("click", ".ajax-load-more", function(e) {
- var container = $(this).parent();
- var section = $(this).closest("section");
- if (e.which === 1 && !e.ctrlKey && !e.shiftKey) {
- e.preventDefault();
- var url = $(this).attr("href");
- $(this).replaceWith(spinner);
- $.ajax(url, {
- data: {"ajax": 1},
- success: function(data) {
- container.remove();
- loadData(url, data, section);
- },
- error: function() {
- location.href = url;
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement