$(document).ready(function () { // Set up with initial load if ($('#listing').length) { var arid = ""; if ($('#arid').length){ arid = "&arid=" + $('#arid').html(); } $("listing").html('

Loading...

'); $.get("/article/ajax/common/list/load/?artype=" + $('#artype').html() + arid, function(data){ $("#listing").html(data); }); } // Reload $(document).on('click', '#reload', function(){ var data = $('#filter_form').serialize(); var form = ""; if ($('#filter_form').length && $('#attachments').length){ form = "&form=true"; } var arid = ""; if ($('#arid').length){ arid = "&arid=" + $('#arid').html(); } $("listing").html('

Loading...

'); $.get("/article/ajax/common/list/load/?artype=" + $('#artype').html() + "&" + data + form + arid, function(data){ $("#listing").html(data); }); }); // Clear $(document).on('click', '#clear', function(){ $("input.list_view_filter").val(""); var form = ""; if ($('#filter_form').length && $('#attachments').length){ form = "&form=true"; } var arid = ""; if ($('#arid').length){ arid = "&arid=" +$('#arid').html(); } $("#listing").html('

Loading...

'); $.get("/article/ajax/common/list/load/?artype=" + $('#artype').html() + form + arid, function(data){ $("#listing").html(data); }); }); });