Read the latest web development and design tips at Fred Wu's new blog! :-)
Poke me on GitHub

Archive for the ‘jQuery’ Category

jQuery Slideshow Lite Plugin Updated (Major Rewrite)

The jQuery Slideshow Lite plugin is updated with new features!

This is a major rewrite which fixed the known issue of not being able to change slides instantly via pagination clicks.

The new version also adds automatic photo caption display.

Enjoy! :)

Related posts

Release: [jQuery Plugin] Slideshow Lite

Latest release: v0.5.3

A few days ago I was asked to make a simple slideshow. My initial thought was, there must be a ton of solutions available for jQuery. I could easily draw inspiration from them.

I was wrong. Whilst there are a few nicely done slideshow plugins for jQuery, the majority of them are either poorly written or far too complicated.

So, I decided to code my own plugin from the ground up. Meet Slideshow Lite!

The plugin is only tested with jQuery 1.3, but it should also work on jQuery 1.2.

Features

  • Unobtrusive JavaScript, simply load it and that’s it
  • Clean, semantic HTML structure
  • Easy to use
  • Customisable
  • Free to use or to modify (GPL/MIT dual license)!

(more…)

Related posts

jQuery Endless Scroll Updated

The jQuery Endless Scroll plugin has been updated.

A bug caused by ‘fireDelay‘ is fixed.

Please head over to the release post or the jQuery plugin site for the download link.

Related posts

jQuery.slideDown() issues in IE: quick fixes

A simple Google search suggests that people are having problems with jQuery.slideDown() on Internet Explorer.

I’ve come across two issues on Internet Explorer 7 while developing a website containing some slideDown() effects, and found some quick fixes for them. :)

(more…)

Related posts

Release: [jQuery Plugin] Endless Scroll

Latest release: v1.4.1

If you don’t already know, endless scroll (or infinite scrolling) is a popular technique among web 2.0 sites such as Google Reader and Live Image Search, where instead of paging through items using the traditional pagination technique, the page just keeps loading with new items attached to the end.

I have developed a jQuery plugin to easily achieve this.

Requirement: jQuery 1.2+

The plugin is tested with jQuery 1.2.6, 1.3 and 1.4.

There are a few options to customise the behaviour of this plugin:

  • bottomPixels (integer) – the number of pixels from the bottom of the page that triggers the event
  • fireOnce (boolean) – only fire once until the execution of the current event is completed
  • fireDelay (integer) – delay the subsequent firing, in milliseconds. 0 or false to disable delay.
  • loader (string) – HTML loader
  • data (string) – plain HTML data
  • insertAfter (string) – jQuery selector syntax: where to put the loader as well as the plain HTML data
  • callback (function) – callback function, accepets one argument: fire sequence (the number of times the event triggered during the current page session)
  • resetCounter (function) – resets the fire sequence counter if the function returns true, this function could also perform hook actions since it is applied at the start of the event

(more…)

Related posts

jQuery problems in IE? It could be SWFObjects.

So your jQuery/JavaScript code doesn’t have any errors, yet your site isn’t working as expected in Internet Explorer? It could be that you have some SWFObject code interfering with your jQuery code (if for example, you’re using a Flash video player or something along those lines). The solution is very simple. Simply enclose your SWFObject code in a jQuery $(document).ready() as so:

<script type="text/javascript">
    $(document).ready(function(){
        var so = new SWFObject("movie.swf", "mymovie", "400", "100%", "8", "#336699");
        so.addParam("quality", "low");
        so.addParam("wmode", "transparent");
        so.addParam("salign", "t");
        so.write("flashcontent");
    });
</script>

The only downside to this is that if you have some alternate HTML to show when Flash isn’t present, this text will be shown until the document is fully loaded and the player(s) start to render (even if the user does in fact have Flash installed).

Related posts