Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ajaxize javascript function - calls ajaxize_this on the server for the div */
- jQuery(document).ready( function($) {
- $('div[id^="ajaxize_this"]').each( function() {
- $(this).ajaxError(function(e, xhr, settings, exception) {
- if (xhr.responseText) {
- $(this)[0].innerHTML = xhr.responseText;
- }
- });
- var newquery = $.query.set('ajaxize_this', $(this).attr('id')).set('_wpnonce', ajaxizeParams._wpnonce);
- $(this).load(location.pathname + newquery, function() {
- // renaming div id to prevent loops
- $(this).attr('id', 'loaded_' + $(this).attr('id'));
- });
- });
- return false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement