This is my code
<script type="text/javascript" language="javascript">
$(document).ready(function (){
$("#foo2").load("carousel/todos.html");
$('#foo2').animate({ "opacity":"1" });
$('#carouselselectitem1').css({ 'color' : '#FF0000', 'opacity' : '1' })
});
</script>
animate() and css() work perfectly, but load() doesn’t import my HTML. If I use a click handler with a button it works fine.
Anybody know why?
To protect you, a browser will not load a page in automatically (giving the
Origin null is not allowed by Access-Control-Allow-Originerror).You can relaunch your browser to allow this sort of activity or put it on a webserver and it should work.
HTTP Access Control