javascript - load contents of html file into DOM -


i'm trying load contents of html file div using javascript/jquery doing on page load:

$("#div_name").load("xxx.html"); 

it displays fine, if try select of dom elements loaded file e.g. document.getelementbyid(#some_other_div) , not found.

i read in file text using ajax, use $("#div").append, seems pretty long-winded - there straight-forward way of making these external elements accessible current document or going have ajax it?


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -