Meta Programming with JavaScript

  • 552 views
Uploaded on

A talk I gave at Ignite Boston 2007.

A talk I gave at Ignite Boston 2007.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
552
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
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/