/* ajaxize javascript function - calls ajaxize_this on the server for the div */ jQuery(document).ready( function($) { $('div[id^="ajaxize_this"]').each( function() { 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; });