Latest Headlines
  • One thing you need to be careful of, and has caught me out a few times when jumping from PHP to Javascript, is ‘new lines’…. In JavaScript a new line...

    Javascript & New Lines

    One thing you need to be careful of, and has caught me out a few times when jumping from PHP to Javascript, is ‘new lines’…. In JavaScript a new line...

    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...

  • Like an image to have a reflection beneath it? Don’t want to process all your images, or maybe images are dynamically added to your site and you want the effect...

    jQuery Photo Reflections

    Like an image to have a reflection beneath it? Don’t want to process all your images, or maybe images are dynamically added to your site and you want the effect...

    Continue Reading...

  • Simple enough…. $result = mysql_query('SELECT * FROM table1'); $num_rows = mysql_num_rows($result); $num_rows returns the number of records returned by the query….

    Count Rows / Records

    Simple enough…. $result = mysql_query('SELECT * FROM table1'); $num_rows = mysql_num_rows($result); $num_rows returns the number of records returned by the query….

    Continue Reading...

Page 8 of 9« First...56789