d’bug update — down and dirty with jQuery, part three
Once again I have made an update to the books widget down the sidebar of this blog. The images are now correctly preloading, and the books will not display until all have been appended to the DOM. I loop through and simply change the display properties of the list items. This should be a slight performance boost, even though the initial load time is slightly longer. The height property of the widget is also set after the first result set is displayed, so no flicker occurs when browsing.
As I stated before, you are welcome to use the code as you see fit without attribution. If you want to support my efforts, click through from one of the books to Amazon.com and make a purchase.
[ Update ] I have decided to remove the books widget altogether, as well as Google advertising, and our hosting company referral. You could say I am eliminating the noise.
Leave a Comment
Comments are moderated. No profanity. Only <a>...</a>, <blockquote>...</blockquote>, and <code>...</code> are allowed.
Seperate paragraphs by pressing the "Enter" key twice, or press it once to break to a new line.
5 Comments
#01, May 12 2008
Steve
I’m betting it does look neat, but for me (FF 2.x) I don’t see anything, it just says “(loading books…)”, with no JS error in Firebug.
I did spot that in your src, there are 2 elements (divs) with the ID “sidebar”. I’m not sure if this is related to the issue I have seeing your book list or not.
Cheers,
Steve
#02, May 12 2008
Brian
Hey Steve,
Thanks for pointing that out. I’m not sure what happened — I must have made an edit recently and accidentally introduced another wrapper with the same ID. I will post a comment here when it is fixed.
The issue you stated is probably related. I had that happen once on FF, but then never again, so I figured it was a weird caching issue.
Thanks again!
#03, May 12 2008
Brian
I removed the additional ID, but I still experience the problem in FF 2, however, I do not experience it in FF 1.5, which is quite odd. I do not get JavaScript errors in either. I will have to experiment more with it.
#04, May 14 2008
Govind
IE 7 - “loading books” still comes.
#05, May 16 2008
Brian
It appears that I finally managed to fix the inconsistency of the preloading images. I have tested in several browsers, and the books always load now.
Try clearing your cache and hitting the homepage, then clicking around, and it should always load. Please let me know if you experience any other issues. Thanks!