Your SlideShare is downloading. ×
Meta Programming with JavaScript
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Meta Programming with JavaScript

621
views

Published on

A talk I gave at Ignite Boston 2007.

A talk I gave at Ignite Boston 2007.

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
621
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Meta-Programming with JavaScript John Resig Mozilla / jQuery
  • 2. Browser Web Dev HTML DOM JavaScript
  • 3. DOM + HTML<html><head><script>window.onload = function(){ var test = document.getElementById(“test”); test.style.color = ‘green’; test.style.display = ‘block’;};</script></head><body><div id=”test” style=”display:none;”> You have JavaScript enabled!</div></body></html>
  • 4. A JS Library HTMLjQuery DOM JavaScript
  • 5. jQuery<html><head><script src=”jquery.js”></script><script>$(function(){ $(“#test”).css(“color”,”green”).show();});</script></head><body><div id=”test” style=”display:none;”> You have JavaScript enabled!</div></body></html>
  • 6. Meta Programming HTML Meta jQuery DOMLibrary JavaScript
  • 7. jQuery “2”<html><head><script src=”jquery.js”></script><script src=”jquery2.js”></script><script type=”text/jquery”>#test: css “color” ”green” show</script></head><body><div id=”test” style=”display:none;”> You have JavaScript enabled!</div></body></html>
  • 8. Demohttp://ejohn.org/apps/jquery2/
  • 9. More Details• http://jquery.com/• http://ejohn.org/apps/jquery2/• http://ejohn.org/blog/advancing-javascript-with-libraries/• http://yuiblog.com/blog/2007/04/16/video-resig/