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
Post a Comment