130 likes | 283 Views
JavaScript Frameworks. Presented by Kyle Goins Also see: http://www.jQuery.com. Agenda. JavaScript Overview Object-Oriented Programming Document Object Model (DOM) What are Frameworks? Why do we care? JQuery. JavaScript Overview. Object oriented programming language
E N D
JavaScript Frameworks Presented by Kyle Goins Also see: http://www.jQuery.com
Agenda • JavaScript Overview • Object-Oriented Programming • Document Object Model (DOM) • What are Frameworks? • Why do we care? • JQuery
JavaScript Overview • Object oriented programming language • Used in all major websites • Picks up where HTML and CSS leave off • Technology barrier of compatibility • JavaScript, XML • Uses: • Form validation • Dynamic alteration of CSS styles and HTML code • Performing calculations
Object-Oriented Programming • Objects are nouns • Methods are verbs • Properties are adjectives • Document Object Model (DOM) – turns webpage elements into JS accessible Objects
What are Frameworks • Pre-Created “Libraries” of code • General vs. Specialized • Designed to make JS easier • Free and anyone can use them • Simply external .js files • Compressed • Uncompressed
Adding a Library to your pages <head> <script src=“sourcehere.js”></script> </head>
Why do we care? • Cross-Browser compatibility • Simplification of normally complicated tasks • Standard functionality: • Selectors • DOM traversal • DOM manipulation • Utility functions • Event handling
jQuery • Event handling • Validation and String Manipulation • Increased access to the DOM • Full listing and documentation of all properties and methods on jquery.com
Downloading jQuery • http://jquery.com • select compression level • hit “Download”
“Rainbows” Script program <scriptsrc="jquery.js" type="text/javascript"></script> <scriptsrc="rainbows.js" type="text/javascript"></script> <scripttype="text/javascript"> rainbows.init({ selector: '.rainbows’, gradient: true, from: '#ffffff’, to: '#000000’, shadow: true, highlight: true }); </script>
Interactive fades $('#navigation li a').hover(function() { // Stuff that happens when you hover on $('.hover', this).animate({ 'opacity': 1 }, 700) },function() { // Stuff that happens when you unhover $('.hover', this).animate({ 'opacity': 0 }, 700) }) • http://dragoninteractive.com