Using jQuery UI ThemeRoller

link About ThemeRollerThemeRoller is a web app that offers a fun and intuitive interface for designing and downloading custom themes for jQuery UI. You can find ThemeRoller in the “Themes” section of the jQuery UI site, or by following this link: jQuery UI ThemeRoller link The ThemeRoller InterfaceThe interface for ThemeRoller is categorized into panels … Continue reading

Theming jQuery UI

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

Widget Factory

The jQuery UI Widget Factory is an extensible base on which all of jQuery UI’s widgets are built. Using the widget factory to build a plugin provides conveniences for state management, as well as conventions for common tasks like exposing plugin methods and changing options after instantiation.

Keep Things DRY

Don’t repeat yourself; if you’re repeating yourself, you’re doing it wrong. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 // BADif ( eventfade.data( “currently” ) !== “showing” ) { eventfade.stop();} if ( eventhover.data( “currently” ) !== “showing” ) { eventhover.stop();} if ( … Continue reading

Feature & Browser Detection

link Can I Use This Browser Feature?There are a couple of common ways to check whether or not a particular feature is supported by a user’s browser: Browser Detection Specific Feature Detection In general, we recommend specific feature detection. Let’s look at why. link Browser DetectionBrowser detection is a method where the browser’s User Agent … Continue reading

Deferred examples

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

jQuery Deferreds

link jQuery DeferredsDeferreds were added as a part of a large rewrite of the Ajax module, led by Julian Aubourg following the CommonJS Promises/A design. Whilst 1.5 and above include deferred capabilities, former versions of jQuery had jQuery.ajax() accept callbacks that would be invoked upon completion or error of the request, but suffered from heavy … Continue reading

Introduction to Effects

link Showing and Hiding ContentjQuery can show or hide content instantaneously with .show() or .hide(): 1 2 3 4 5 // Instantaneously hide all paragraphs$( “p” ).hide(); // Instantaneously show all divs that have the hidden style class$( “div.hidden” ).show(); When jQuery hides an element, it sets its CSS display property to none. This means … Continue reading

jQuery Event Basics

link jQuery Event Basicslink Setting Up Event Responses on DOM ElementsjQuery makes it straightforward to set up event-driven responses on page elements. These events are often triggered by the end user’s interaction with the page, such as when text is entered into a form element or the mouse pointer is moved. In some cases, such … Continue reading

Understanding Event Delegation

link IntroductionEvent delegation allows us to attach a single event listener, to a parent element, that will fire for all descendants matching a selector, whether those descendants exist now or are added in the future. link ExampleFor the remainder of the lesson, we will reference the following HTML structure: 1 2 3 4 5 6 … Continue reading