jQuery UI using addRule()

In this example, we're loading jQuery UI on top of jQuery 1.7. The purpose of this is to show how addRule works. We've set up examples for jquery itself and the jquery.ui namespace. For the more complex jQuery UI items, we have added pointcuts to all the applicable modules, ensuring jQuery is available in each UI item's scope.

The button below will turn red once it gets a class of "ui-button-text", caused by the jQuery UI call.

For added impact, we slowed down a jQuery dependency: jquery.ui.widget.min.js to 5 seconds to demonstrate how only the modules that depend on it directly block. You will need to clear your cache to reintroduce the lag for browsers that intelligently cache content.

Back to examples

I turn into a jQuery button