Hmm, I'm stumped on this one (I created the plugin). This is the line in
the listnav plugin that causes Safari to bog down:
$('a', $letters).click(function(){
If I put a console entry right after that:
window.console.log("letter clicked");
I can see that the delay is the click handler. IE, it takes 5-10 seconds
until the console entry appears. I tried it using jquery 1.2.6 and 1.3.1
(which you had in the page), with similar results.
Any jquery or jquery plugin contributors who might know why the click
takes so long to respond? BTW, I also tried replacing that line with
some event delegation code, so that a click on $letters is watched for,
but I saw the same delay.
Thoughts?
Thanks,
Jack
simshaun wrote:
Using jQuery 1.3.1,
This question refers to the ListNav plugin found here:
http://www.ihwy.com/Labs/jquery-listnav-plugin.aspx
I've got a fairly large dataset on my page consisting of ~1000 LI
elements.
Each letter of the alphabet contains ~40 LI elements.
Each LI element contains a varying amount of chars, but lets say ~70
chars.
In FF3, it takes about 3-4 seconds for the plugin to index the list.
In IE7, it takes about 1 second.
In IE6, it takes about 1 second.
In Safari 3.1 & Google Chrome, it takes about 14 seconds.
Why does it take so long in Safari 3.1 & Google Chrome?
URL for testing: http://www.simshaun.com/listnav.php