HTML and CSS Reference
In-Depth Information
Summary
In this lesson, I explored some of the powerful features common to most JavaScript
libraries using jQuery. You learned which JavaScript libraries are available and why you
might want to use them. You also learned how to include jQuery in a web page and take
advantage of its functionality through the document.ready() event. I explained how
event binding works with jQuery and how to dynamically modify the styles on a page as
well as the content of a page itself. Finally, I explained what AJAX is and how jQuery
and other JavaScript libraries enable you to make requests to external data sources from
within a web page.
16
Workshop
As always, we wrap up the lesson with a few questions, quizzes, and exercises. Here are
some questions and exercises that should refresh what you've learned about JavaScript
libraries and jQuery.
Q&A
Q Won't adding a JavaScript library cause my pages to load more slowly?
A Yes, adding a JavaScript library will add to your overall page size. However, the
browser will cache the external JavaScript file, so it should only have to download
it once, when they get to the first page of your site. When they go to subsequent
pages, the JavaScript library will already be in the cache. Also, the libraries vary in
size. If you are concerned about download time, you might want to go with a
smaller library.
Q What about users who don't have JavaScript enabled?
A It's generally agreed that less than 5 percent of users have JavaScript disabled these
days. However, you'll still want to make sure that essential functionality still works
for users who don't have JavaScript access. That's one of the big advantages of the
unobtrusive JavaScript approach that these libraries reinforce. The markup should
work fine without the JavaScript, which enhances the experience but is not essen-
tial to making the pages work.
 
 
 
Search WWH ::




Custom Search