javascript - How to jQuery for Call div from other website -


i have questen

how call div other website usng javascrpt

i have page : https://yuyunxp.github.io/share/index.html

then, wan call <div id="testa"> in other page

otherpage.html

jquery(function($){    $('#testa').load('https://yuyunxp.github.io/share/index.html');  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <html>  <head>  </head>  <body>      <div id="testa"></div>  </body>  </html>

but got error page. hehe..

i dont know why page error..

please sir, can u me.. ?

ps :)

testa id, need use # selector:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <html>  <head>  <script type="text/javascript">  jquery(function($){  	$('#testa').load('https://yuyunxp.github.io/share/index.html');  });  </script>  </head>  <body>  <div id="testa"></div>  </body>  </html>


Comments

Popular posts from this blog

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -

php - Autoloader issue not returning Class -