Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js load inside div from file

<div id="topBar">
    <a href ="#" id="load_home"> HOME </a>
</div>
<div id ="content">        
</div>

<script>
$(document).ready( function() {
    $("#load_home").on("click", function() {
        $("#content").load("content.html");
    });
});
</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #load #div #file
ADD COMMENT
Topic
Name
1+1 =