Presentation is loading. Please wait.

Presentation is loading. Please wait.

Diego Guidi - DotNetMarche. DOM tree is clunky to use No multiple handlers per event No high-level functions Browser incompatibilities = jQuery to the.

Similar presentations


Presentation on theme: "Diego Guidi - DotNetMarche. DOM tree is clunky to use No multiple handlers per event No high-level functions Browser incompatibilities = jQuery to the."— Presentation transcript:

1 Diego Guidi - DotNetMarche

2

3 DOM tree is clunky to use No multiple handlers per event No high-level functions Browser incompatibilities = jQuery to the resque!

4

5 John Resig http://twitter.com/jeresig http://twitter.com/jeresig jQuery 1.0 out (Aug 2006) jQuery 1.3.2 latest Production 19k – Debug 120k Cross-browser Visual Studio 2008 support http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx

6 var fieldsets = document.getElementsByTagName('fieldset'); var legend, fieldset; for (var i = 0; i < fieldsets.length; i++) { fieldset = fieldsets[i]; if (!hasClass(fieldset, 'collapsible')) continue; legend = fieldset.getElementsByTagName('legend'); if (legend.length == 0) continue; legend = legend[0];... // Do your job }

7 $('fieldset.collapsible legend').each(function() {... // Do your job }); $("table tr:nth-child(odd)").addClass("striped");

8 Separate behavior from structure and style HTML => structure CSS => style JS => behavior

9


Download ppt "Diego Guidi - DotNetMarche. DOM tree is clunky to use No multiple handlers per event No high-level functions Browser incompatibilities = jQuery to the."

Similar presentations


Ads by Google