Skip to content Skip to sidebar Skip to footer

Ajax Call Returning Whole Page

I have following page with some random tips: http://www.javaexperience.com/tips I want to display the tips only on the other pages of website so I am making an ajax call and addin

Solution 1:

This is the expected behavior of the load method, it'll always download the entire content. You can specify that a certain part of the loaded page be parsed and placed into the calling container.

jQuery('#tips').load('url #tip1');

Solution 2:

You need:

$('#tips').load('ajax/test.html #container');

More info on load here

Post a Comment for "Ajax Call Returning Whole Page"