I am trying to load an external jquery page into a div. I use map tag because my header’s image is full of buttons.
So this is the relevant code
index file:
<script type="text/javascript" src="loader.js"></script>
..
<area shape="rect";
id="find us";
coords="190,50,265,70";
href="javascript:clicked_on('rectangle');"
..
<div id="text">
//where I want the page to be loaded
</div>
loader file:
$(document).ready(function(){
$("#find us").click(function(){
// load contact form onclick
$("#text").load("index.html");
});
});
file to be loaded: index.html
When I click on the icon it does nothing.
But if I include in the loader.js this code at the beginning it loads with the page:
$(document).ready(function(){
// load index page when the page loads
$("#text").load("index.html");
So the icon doesn’t work..
After hours of searching I give up..Hope to find an answer here.
Thanks!
The id attribute can not consist of two words (i.e. have a space in between).
Try
<area shape="rect" id="find_us"...and$("#find_us").click(function(){