• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Unobtrusive js
 

Unobtrusive js

on

  • 1,060 views

A brief introduction to unobtrusive JavaScript.

A brief introduction to unobtrusive JavaScript.

Statistics

Views

Total Views
1,060
Views on SlideShare
1,039
Embed Views
21

Actions

Likes
1
Downloads
8
Comments
0

1 Embed 21

http://brettic.us 21

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Unobtrusive js Unobtrusive js Presentation Transcript

    • Unobtrusive JavaScript
      Brett Millett
      October 6th, 2011
    • What is JavaScript?
      Powerful scripting language that your web browser executes.
      Built into every major web browser.
      Standardized (for the most part) for all web browsers.<script>alert(“hello world!”);</script>
    • Why JavaScript?
      • Makes rich interaction possible with a webpage!
      • AJAX: asynchronous JavaScript and XML.
      • The Internet would be a far less interesting place without it.
    • What’s “obtrusive” JavaScript?
      HTML markup allows use of JavaScript via event attributes. The “old way” and an “obtrusive” JavaScript practice.
    • What’s so bad about that?
      Web pages are easier to update when functionality and layout are uncoupled.
      JavaScript must be part of the document body instead of in a cacheable external file.
      href=“#” example when JavaScript disabled.
      Everybody code like it’s 1999!
    • What’s unobtrusive JavaScript?
      Separates behavior from markup.
      Allows for “graceful degradation.”
    • Unobtrusive JavaScript Example
      • Completely separate from markup.
      • Reusable and globally accessible. Easier to change one function then all your markup!
      • Degrades gracefully.
    • jQuery (jquery.com)
      Popular JavaScript framework.
      Extremely powerful selector syntax.
    • Guidelines for accessibility
      Build a website without any JavaScript.
      Once the website functions without JavaScript, use JavaScript to enhance the user experience.
      Easier interaction
      Performance
      Fun
      These guidelines only make sense when using unobtrusive JavaScript!
    • Questions?