1 Replies - 8791 Views - Last Post: 10 June 2011 - 04:13 AM

#1 ChrissehB  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 42
  • Joined: 01-February 09

jQuery .load not working in Safari

Posted 08 June 2011 - 08:14 AM


So I really really really suck at javascript.

I'm having a problem using jquery where I'm loading content into a div.

It works fine in every other browser but in Safari it refuses to load properly.

Here's the website - http://bumpyride.co.uk - it's on online scrapbook type website for The Hoosiers' tour. To get to the actual website go to http://bumpyride.co....afanclubber.php (that's jsut to stop people going on it who we don't want yet :P)

So. The venu/city links across the top all work right, but when you try clicking Gig pictures or photos with fans etc inside it just loads the pages and not fade them into the #content div.

I'm pretty certain the reason it isn't working is because the links are inside the #content div where the content is loaded to
Here is the JS:
$(document).ready(function() {

	$('#content li a').click(function(){
		var toLoad = $(this).attr('href');
		$('#wrapper').append('<span id="load">LOADING...</span>');
		function loadContent() {
			$('#content').load(toLoad, timer);
	function timer(){
	var t=setTimeout(function(){$('#content').fadeIn('normal',hideLoader())},200);
		function hideLoader() {
		return false;


It's not my code, I found it on google, not entirely sure where from though.

It's probably a mess but it works in all the other browsers.

This is how the nav is
<a href="birmgig.php">Gig Photos</a></li><strong> | </strong><li><a href="birmfans.php"> Photos With Fans</a> </li><strong> | </strong><li><a href="birmvids.php">Videos</a></li><strong> | </strong><li><a href="birmquotes.php">Quotes</a></li><strong> | </strong><li><a href="birmreviews.php">Reviews</a></li></ul>

And then all the pages load into a div called #content.

And then CSS for the nav:
body ul{
	margin: 0;
	padding: 0;

body ul li { display: inline; }

Can anyone please help me get it to load the pages into the content div in safari. As I said it works perfectly in all the other browsers ;/

Is This A Good Question/Topic? 0
  • +

Replies To: jQuery .load not working in Safari

#2 maniacalsounds  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 118
  • View blog
  • Posts: 474
  • Joined: 27-June 10

Re: jQuery .load not working in Safari

Posted 10 June 2011 - 04:13 AM

Hi. I'm not quite sure what you mean. I booted it up in Firefox and Safari, and the animations seem fine. However, you have MAJOR duplicate code. That entire code that you posted on this post is duplicated right after the first time you type it. I would suggest deleting the duplicate code. What's the point in having it twice? It only increases page weight. Thanks :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1