JavaScript
  Home arrow JavaScript arrow Page 2 - jQuery Overview
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

jQuery Overview
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 7
    2009-02-11

    Table of Contents:
  • jQuery Overview
  • Library Components
  • Attributes
  • More jQuery Attributes

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    jQuery Overview - Library Components


    (Page 2 of 4 )

    Let's look at the different components available within jQuery to get an idea of exactly what we can achieve when using it. The core of the library sets up the $ object and allows you to easily select elements based on id, class name, element name or other, more complex requirements.

    The core section of the library also allows you to quickly and easily create new elements by passing raw HTML to the $ object. So if you need to insert a new paragraph into your page, it can be created with just:

    $("<p>")

    Once created, you can add content to it, add styles or attributes, and then add it to the page in your desired location using one of the many jQuery methods, all in a consistent, cross-browser way.

    JQuery's equivalent to onDomReady (or similar) can also be found here in the core section of the library, and like the rest of the library, it's beyond easy to use. All you need to do is wrap any code within the following function:

    $(function() {

    //your code here

    });

    The code within the anonymous function will only be executed when the DOM is in a usable state. It also shields you from littering the global namespace, as any variables declared here will become properties of the jQuery $ object instead of the window object.

    More JavaScript Articles
    More By Dan Wellman


       · Hi,This article aims to familliarise developers that haven't used jQeury before....
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek