jQuery

The world of client side programming has suddenly become easy. Understanding jQuery comes easy after knowing CSS (Cascading Style Sheet) syntax for selecting html, and default set functions covering events, animations, styling, AJAX and more! I enjoy jQuery a heck of a lot more than pure javascript.

  • Left2RightBounce : JQuery Image Scrolling

    Image ScrollingThe concept of this plugin was to create an image scroller that can move to the right and then back to the left. The ones that were out there were a bit buggy when the items were travelling slow and went outside the contanine...
  • Simple show and hide toggle

    Welcome to the first ever tutorial that I have done. I though I'd start with something simple. HTML wise you will need a link and a div box. The link will need an id attribute of 'click-item' and the div will need an id attribute of 'show-h...
  • jQuery : simple event listening technique

    Event listening in jQuery has served me well when doing small custom events. It helps to use this technique so that the majority of browsers support the code being executed. A typical example for using event listening is when I a click or ...
  • Form element attribute not changing via javascript

    "It just doesn't make sense!"I definitely said this many times until I managed to figure out why I couldn't change a form attribute via jQuery or even raw javascript. In order to illustrate this I'll give an example.Example:Aim was to chang...
  • Javascript Plugin not working on AJAX loaded content

    This is a common little problem I've come across a few times, and the first time it happened it took damn long to find the answer. The main case that I come across this issue is when a have popup jQuery plugins such as thickbox or colorbox ...
  • Disable enter key on form submit - (keycode 13)

    I needed to disable the enter key on a particular form field and was able to find this solution.$('input#form_id').keypress(function (event){ return event.keyCode == 13;});Note that this is a simplified version of what I did, but basically ...
  • jSON IE bug jquery .ajaxSubmit() - badly formed jSON

    BackgroundRecently came across this problem, on a site that was already programmed by someone else, which turned out to be something simple in the end. There was a click event on a submit button that would then fire off an ajaxSubmit with a...
  • Firebug Plugin in Firefox - a big time saver - find bugs faster

    If you haven't played around with firebug before - or even used firefox, it would be a good thing to explore if you are a web developer. Of course this is a very general article but it will cover some of the uses that I have for firebug on ...
  • jQuery running with prototype

    jQuery was nice enough to add in a function that helps with conflicting scripts. Typically prototype and jQuery use the $ sign to initialise their scripts. Code to help you achieve no conflicts://include your prototype//include your jquery/...
  • Javascript setMonth() bug - Why is the date not working?

    Recently I was doing some javascript date checking and recently encounted bugs that only occurred towards the end of the month. Today being the 31st May 2011 was the key to the problem.var arrivalDate = new Date(); arrivalDate.setFullYear( ...