I’m a newbie programmer working with jQuery and wonder if anyone can help me out.
Essentially, I’ve created some html for a social button’s section on our articles.
I’ve uploaded that with the aim of using jQuery’s .load() function to pull it into every article.
It works in IE7, but not in Firefox or Chrome. Can anyone help fix it?
<script type="text/javascript">
$(document).ready(function(){
$('#shareBlock').load("http://i.thisis.co.uk/275563/binaries/sharebox.html");
});
</script>
Based on the URL in your
load()and the nature of the issue I believe you have a problem with same origin. If your URL is external/violates same origin in some way you will not be able to load it in this manner.For more details check this out – http://en.wikipedia.org/wiki/Same_origin_policy