A Brief Introduction to jQuery

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

A Brief Introduction to jQuery

Old presentation from the archives.

James Hughes

October 22, 2010

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

26 slides
  1. Custom  Filters   /*    *    jQuery  Input  Modified

     Filter    */   $.extend($.expr[':'],  {                  modified:  func)on(el)  {                          return  $(el).is("input")  &&  el.defaultValue  !=  el.value;                  }   });     /*  Clear  all  modified  input  elements  */   $("input:modified")  .val(“”);  
  2. Custom  Plugin   /*        *    jQuery

     Zebra  Stripping  Plugin    */   jQuery.fn.zebra  =  funcQon(odd,  even)  {          return  this.find("tr:odd").css("background-­‐color",  odd)                  .end().find("tr:even").css("background-­‐color",  even);   }    //or  $.fn.extend({  zebra  :  funcQon(){…}  })     /*  Apply  Stripping  to  all  tables  in  DOM  */   $("table").zebra("#fff",  "#eee");  

More Decks by James Hughes

Other Decks in Programming