Once you’ve made an initial selection with jQuery, you can traverse deeper into what was just selected. Traversing can be broken down into three basic parts: parents, children, and siblings. jQuery has an abundance of easy-to-use methods for all these parts. Notice that each of these methods can optionally be passed string selectors, and some … Continue reading →
.index() is a method on jQuery objects that’s generally used to search for a given element within the jQuery object that it’s called on. This method has four different signatures with different semantics that can be confusing. This article covers details about how to understand the way .index() works with each signature. link .index() with … Continue reading →
link Provide Public Access to Default Plugin SettingsAn improvement we can, and should, make to the code above is to expose the default plugin settings. This is important because it makes it very easy for plugin users to override/customize the plugin with minimal code. And this is where we begin to take advantage of the … Continue reading →
One of the most celebrated aspects of jQuery is its extensive plugin ecosystem. From table sorting to form validation to autocompletion – if there’s a need for it, chances are good that someone has written a plugin for it. The quality of jQuery plugins varies widely. Many plugins are extensively tested and well-maintained, but others … Continue reading →
link IntroductionWeb pages are all about interaction. Users perform a countless number of actions such as moving their mice over the page, clicking on elements, and typing in textboxes — all of these are examples of events. In addition to these user events, there are a slew of others that occur, like when the page … Continue reading →
jQuery Mobile provides a set of touch-friendly UI widgets and an Ajax-powered navigation system to support animated page transitions. This guide will show you how you can build your first jQuery Mobile application. link Create a Basic Page TemplateTo get started, you can simply paste the template below in your favorite text editor, save, and … Continue reading →
All jQuery UI plugins are designed to allow a developer to seamlessly integrate UI widgets into the look and feel of their site or application. Each plugin is styled with CSS and contains two layers of style information: standard jQuery UI CSS Framework styles and plugin-specific styles. The jQuery UI CSS Framework provides semantic presentation … Continue reading →
link Further Deferreds examplesDeferreds are used behind the hood in Ajax but it doesn’t mean they can’t also be used elsewhere. This section describes situations where deferreds will help abstract away asynchronous behavior and decouple our code. link Cachinglink Asynchronous cacheWhen it comes to asynchronous tasks, caching can be a bit demanding since you have … Continue reading →
Proper use of Ajax-related jQuery methods requires understanding some key concepts first. link GET vs. POSTThe two most common “methods” for sending a request to a server are GET and POST. It’s important to understand the proper application of each. The GET method should be used for non-destructive operations — that is, operations where you … Continue reading →
The advent of JSONP — essentially a consensual cross-site scripting hack — has opened the door to powerful mashups of content. Many prominent sites provide JSONP services, allowing you access to their content via a predefined API. A particularly great source of JSONP-formatted data is the Yahoo! Query Language, which we’ll use in the following … Continue reading →