jQuery Archive

  • Using ‘hotspots’ to swap images is pretty straight forward, and can be really effective…. try this method from Stackoverflow <img src="nav.jpg" /> //set off state var nav_off = "/images/nav-off.jpg"; //...

    Great Hotspot Image Swap

    Using ‘hotspots’ to swap images is pretty straight forward, and can be really effective…. try this method from Stackoverflow <img src="nav.jpg" /> //set off state var nav_off = "/images/nav-off.jpg"; //...

    Continue Reading...

  • http://net.tutsplus.com/tutorials/wordpress/anatomy-of-a-wordpress-plugin/ http://wordpress.tv/2009/09/20/john-hawkins-plugin-building-portland09/ http://www.tipsandtricks-hq.com/wordpress-lightbox-ultimate-plugin-display-media-in-a-fancy-lightbox-overlay-3163

    FW: Fancybox

    http://net.tutsplus.com/tutorials/wordpress/anatomy-of-a-wordpress-plugin/ http://wordpress.tv/2009/09/20/john-hawkins-plugin-building-portland09/ http://www.tipsandtricks-hq.com/wordpress-lightbox-ultimate-plugin-display-media-in-a-fancy-lightbox-overlay-3163

    Continue Reading...

  • Sometimes you need to change something depending on the browser size. Often this means that you’ll need to check for the browser being resized too… To do this you use:...

    window.onresize

    Sometimes you need to change something depending on the browser size. Often this means that you’ll need to check for the browser being resized too… To do this you use:...

    Continue Reading...

  • Common problem, just wrap it in CDATA tags… <script type="text/javascript">     /*<![CDATA[*/                      // place javascript here i.e.           function myFunction () {                  // do something           }...

    Javascript not validating?

    Common problem, just wrap it in CDATA tags… <script type="text/javascript">     /*<![CDATA[*/                      // place javascript here i.e.           function myFunction () {                  // do something           }...

    Continue Reading...

  • Like .click(), the params are normally other functions. .hover() is pretty much the same as mouseover() however… .hover() can have it’s ‘re-set’ function in the same block of code, whereas...

    jQuery .hover();

    Like .click(), the params are normally other functions. .hover() is pretty much the same as mouseover() however… .hover() can have it’s ‘re-set’ function in the same block of code, whereas...

    Continue Reading...

  • Event handler that gets attached to a jQuery object thats targeting an element… i.e. $(h4).click(); The above triggers when you click on a h4 tag, but to get it to...

    jQuery .click();

    Event handler that gets attached to a jQuery object thats targeting an element… i.e. $(h4).click(); The above triggers when you click on a h4 tag, but to get it to...

    Continue Reading...

  • :first The first match of the page. li a:first returns the first link also under a list item :last The last match of the page. li a:last returns the last...

    More powerful jQuery selectors

    :first The first match of the page. li a:first returns the first link also under a list item :last The last match of the page. li a:last returns the last...

    Continue Reading...

  • Here are a few examples of tag selectors that go between the ‘magic’ jQuery $();….. * Matches any element E Matches all elements with tag name E i.e. $(‘img’); E...

    Powerful jQuery Tag Selectors

    Here are a few examples of tag selectors that go between the ‘magic’ jQuery $();….. * Matches any element E Matches all elements with tag name E i.e. $(‘img’); E...

    Continue Reading...

  • To ‘get’ and element ID or CLASS you can use the same functions as CSS i.e. $('#id-name'); or $('.class-name'); You can use single or double quotes too, i.e. $('#single-quotes'); or...

    To ‘Get’ an element in jQuery

    To ‘get’ and element ID or CLASS you can use the same functions as CSS i.e. $('#id-name'); or $('.class-name'); You can use single or double quotes too, i.e. $('#single-quotes'); or...

    Continue Reading...

  • To call jQuery you can either download it or use the Google content network… If you download it, you’ll need to call it in the head like: <script type="text/javascript" src="script/jquery-1.3.2.min.js"></script>...

    Adding jQuery to your page

    To call jQuery you can either download it or use the Google content network… If you download it, you’ll need to call it in the head like: <script type="text/javascript" src="script/jquery-1.3.2.min.js"></script>...

    Continue Reading...

Page 1 of 212