Your SlideShare is downloading. ×
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
jQuery Presentation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

jQuery Presentation

3,549

Published on

Basics about jQuery presented to Ancestry.com

Basics about jQuery presented to Ancestry.com

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,549
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
130
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
  • Talk a little about JavaScriptHow well do you know JavaScript?Do we really understand it?How many have done advanced stuff with javascript?Used in different platformsPdfPhotoshopFireworks
  • Unobtrusive JavaScriptLess code
  • Unobtrusive JavaScriptLess code
  • Best practice to indent your code
  • Does not rely on the browser to match the elementsGood for webforms that does the weird ID thing
  • Cross browser up until ie 6
  • Functions are omnipresent
  • Conducive tothe way web pages work.Events are useful, but rediculously hard to implmeent
  • Conducive tothe way web pages work.Events are useful, but rediculously hard to implmeent
  • Transcript

    • 1. jQuery Brownbag
      Rod Johnson
    • 2. Checking for Null Values
      C# Way…
      JavaScript Way
    • 3. Setting Default Values
      C# Way…
      JavaScript Way
    • 4. Properties
      C# Way…
      JavaScript Way
    • 5. Why is jQuery Awesome?
      What jQuery does well:
      Simplified AJAX
      DOM Manipulation
      Event Management
      Animations
      Normalizes Browser Differences
      Why It Is Successful:
      Well Designed
      Easy to extend with plugins
      Great Documentation
      Large jQuery Community
      Cross-browser
    • 6. jQuery Founder
    • 7. jQuery Philosophy
      Find some stuff
      Do something to it
    • 8. Chaining
    • 9. Example: Conditional Hide Show
    • 10. Selecting Elements: Basic CSS Selectors
    • 11. Selecting Elements: Positional Selectors
    • 12. Example: Expanding Form
    • 13. Example: Expanding Form - Continued
      Iterate through jQuery wrapped set by using the each() method.
      There are 2 ways to pass in this data.
      Controls the context. This is consistent.
      Since this item is added dynamically, you will need to use the live() method instead of bind()
      You can chain jQuery objects to each other. This makes for really succinct statements.
      Indent your code so you can easily see what is the current object in the chain
      Control chaining with the end() method
    • 14. Events in jQuery
      Control how this event gets bubbled down the DOM
      Prevent the default behavior of an element. Useful for buttons and links.
      Bind an element that is already added to the DOM
      Bind an element that is not yet added to the DOM. Very useful with Ajax or adding elements dynamically
      Namespacing works really well when you have multiple listeners attached to the same element.
      Unbinding events.
      Opposite of live()
    • 15. Example: Pager
    • 16. Example: Pager - Continued
      Setup event handler
      Optional second parameter stores your custom data that is passed from the event
      Events can be triggered by using the trigger() method.
      Load custom data from the data attribute of the html element
      Always prevent the default behavior of any hyperlink event you trap.
    • 17. Example: Default Images
      Bind default resources on the “error” event.
    • 18. jQuery in Visual Studio
      By adding script references to your .js file, you get intellisense… kinda.
      You will not be able to select any elements until the document is ready.
      Most if your work will happen here.
      Good practice to always alias your $ by using Local Scope. This will prevent any collisions with any other library that may use $ variable
    • 19. Example: Simulated Page Lifecycle
      By adding script references to your .js file, you get intellisense… kinda.
      Works good if you have multiple js files that all depend on the document loaded event
    • 20. Example: Ajax Proxy
      Very flexible way to pass in parameters to a function.
      Pass in as many or as few parameters as you need.
      Alias your functions by using jQuery as $
    • 21. Example: Ajax Dropdown with ASP.NET MVC
    • 22. Pattern: Default Values
      Old way…
      Doesn’t scale very well at all.
      Pass in an object hash with as many or as few parameters as you want.
      jQuery Way…
      Enumerate any default values
      Default values will be overwritten by the values you passed in the ‘params’ object.
    • 23. jQuery Plugins
    • 24. jQuery UI Plugin
    • 25. jQuery - BBQ
      http://benalman.com/projects/jquery-bbq-plugin/
      Merge query string fragments into the query string#foo=1&bar=2
      Maintains history with each hash change
      Great for AJAX history management
      Paging
      Tabs
    • 26. Linq to jQuery
      Without Linq to jQuery…
      With Linq to jQuery…
    • 27. Plugin Authoring
      Don’t break the chain…
      Can use as if it were just a regular jQuery method
    • 28. Learn More About jQuery
    • 29. jQuery Documentation
    • 30. Learn More
      http://jquerylist.com/
      http://enterprisejquery.com
      http://jquery.com

    ×