Well, it depends on how you request the data. If you have $ .ajax, etc., you can make the necessary changes to the success handler. I assume that since you are not very good at jQuery, you use $ .load () to load the data, in which case it is easiest to replace it with
$.get('/somecode.php', function(data) { data = $(data); // Find and remove all anchor tags for example data.find('a').remove(); $('#target-id').append(data); });
Or, if you do not want to create a jQuery object, you can easily do something like
$.get('/somecode.php', function(data) { // Replace all strings "foo" with "bar" for example data = data.replace('foo', 'bar'); // Manually append it to DOM or do whatever you want with it $('#target-id').append(data); });
source share