Using the classes Option

As of the 1.12 release, the jQuery UI widget factory includes a means of managing CSS class names through the classes option. This article will give you an overview of how the classes option works, and discuss what you can do with it. link Syntax overviewThe classes option is used to map structural class names … Continue reading

Extending Widgets with the Widget Factory

jQuery UI’s widget factory makes it easy to build widgets that extend the functionality of existing widgets. Doing so allows you to build powerful widgets on top of an existing base, as well as make small tweaks to an existing widget’s functionality. Note: This article assumes some basic knowledge of what the widget factory is … Continue reading

How To Use the Widget Factory

While most existing jQuery plugins are stateless – that is, we call them on an element and that is the extent of our interaction with the plugin – there’s a large set of functionality that doesn’t fit into the basic plugin pattern. In order to fill this gap, jQuery UI has implemented a more advanced … Continue reading

Why Use the Widget Factory?

Writing jQuery plugins is as simple as adding a method to jQuery.prototype (more commonly seen as $.fn) and following some simple conventions like returning this for chainability. So why does the widget factory exist? And why is it hundreds of lines of code? In this document, we’ll walk through the benefits of the widget factory … Continue reading

Widget Method Invocation

Widgets created with the widget factory use methods to change their state and perform actions after initialization. There are two ways widget methods can be invoked – through the plugin created by the widget factory, or by invoking the method on the element’s instance object. link Plugin InvocationTo invoke a method using the widget’s plugin, … Continue reading

History of jQuery Events

Throughout the evolution of jQuery the means of event binding has changed for various reasons ranging from performance to semantics. As of jQuery v1.7 the .on() method is the accepted means of both directly binding events and creating delegated events. This article aims to explore the history of event delegation from jQuery v1.0 to the … Continue reading

Introducing Custom Events

link Custom EventsWe’re all familiar with the basic events — click, mouseover, focus, blur, submit, etc. — that we can latch on to as a user interacts with the browser. Custom events open up a whole new world of event-driven programming. It can be difficult at first to understand why you’d want to use custom … Continue reading

Introducing Events

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

Triggering Event Handlers

jQuery provides a way to trigger the event handlers bound to an element without any user interaction via the .trigger() method. link What handlers can be .trigger()’d?jQuery’s event handling system is a layer on top of native browser events. When an event handler is added using .on( “click”, function() {…} ), it can be triggered … Continue reading

Getting Started with jQuery Mobile

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