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

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -