I am trying to figure out what is wrong with the function load()
not working in Chrome and Firefox. Using Internet Explorer it works beautifully.
I have a WampServer.
In Chrome, I get error:
Origin null is not allowed by Access-Control-Allow-Origin
I put files on local server, it is on-line. I can access an image, see code. But what goes wrong with load()
?
<body>
here is a image
<img src="/wamp/www/testing/baby2.jpg" width="100px" height="200px"></img>
<ul id="aj">
<li><a href="/wamp/www/testing/celeb1.html">One</a></li>
<li><a href="/wamp/www/testing/celeb2.html">Two</a></li>
<li><a href="/wamp/www/testing/celeb3.html">Three</a></li>
</ul>
<br>
<div id="desc">
</div>
<script>
$(document).ready(function(){
$('#aj a').click(function(){
var v= $(this).attr('href');
$('#desc').load(v);
return false;
});
});//ready
</script>
</body>
Thanks in advance.