javascript - How Can I replace a div with another div(but of external html page)? -


i want replace div 'mainbox' exist in html page 'index.html' exist in html page 'list-div':

<body>      <div id="divet">      sempre caro mi fu quest'ermo colle,      e questa siepe che da tanta parte dell'ultimo orizzonte      il guardo esclude      </div>  </body> 

i did:

$(document).ready(function(){     $('#mainbox').load('list-div.html #hey'); }); 

but don't run. me please.

html

<div id="divet">      sempre caro mi fu quest'ermo colle,      e questa siepe che da tanta parte dell'ultimo orizzonte      il guardo esclude  </div> 

jquery

$(document).ready(function(){     $('#mainbox').load('list-div.html #divet'); }); 

your #hey id not found, replace #divet


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -