jQuery crashing Safari 2
I thought I’d write a specific entry concerning jQuery and Safari 2. Others may be wondering why Safari 2 is crashing when trying to run some elements of jQuery. In a recent project I need to write simple caption strings into a <p> paragraph and was using html().
I first assumed that one of the fade transitions was causing problems (that’s another story!). I eventually narrowed down the problem and found that html() was causing Safari 2.0.4 to crash. In this case it was easy enough to switch to text() to write in the string and that solved it!
jQuery 1.2.6 html() will crash Safari 2.0.4
Here’s the line that caused Safari 2 to crash:
$('#main_image .caption').html(caption).fadeIn();
And the solution:
$('#main_image .caption').text(caption).fadeIn();
Apparently this may be a regression as this error existed on an earlier version of jQuery.
October 16th, 2008 at 9:59 am
Interesting. Turns out that wrapping the html content in a span tag can stop the crash. Posted by Louis on the jQuery Google group.
November 4th, 2009 at 2:29 pm
Hi doing a search online for Jquery gallery i came across you nice design code.
I am a totall beginner and trying t understand. i have sent up my website with the following plugin ( http://blog.themeforest.net/tutorials/create-a-funky-parallax-background-effect-using-jquery/ )
how and where shall i put your code lets say on “box2″ ?? i know how to put the pictures on the code etc.. but i am having problem to put the gallery and the container expand correctly.
would be greatful if you could help me with this tks.
leo