3

I would like to load content from another site using JQuery, Unfortunately the .load() function is limited to the current domain. Is there any way around ? I would like to insert à navigation bar directly into a tumblr blog.

Roch
  • 21,741
  • 29
  • 77
  • 120
  • oddly, sites disallow ajax loading of content from "other sites" but do allow javascript loading from other sites with the same "http vs. https" ness FWIW. – rogerdpack Oct 12 '16 at 19:49

2 Answers2

3

Have a look at Ways to circumvent the same-origin policy If you have control over the other side it is quite easy. Otherwise try Yahoos YQL.

Community
  • 1
  • 1
PiTheNumber
  • 22,828
  • 17
  • 107
  • 180
2

You can take a look at cross domain ajax request with YQL and jQuery.

http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-cross-domain-ajax-request-with-yql-and-jquery/

ShankarSangoli
  • 69,612
  • 13
  • 93
  • 124