3

I'm looking to see if it's possible to add methods or interactions to the jQuery UI library without editing the code itself? I want to be able to quickly upgrade as new versions come out, but still be able to add my own features that extend the base UI script.

Example:

I want to use the .dialog() method to have pointer tips to provide messaging to specific areas.

Is there an easy way to add this, or will I end up having to download the source and do it myself each time a release comes out?

1 Answer 1

3

Access the UI widget's prototype:

var proto = $.ui.autocomplete.prototype;

proto.myNewMethodForAutocomplete = function(){
    // ...
};

You can also directy extend the prototype like this: How to extend a jquery ui widget ? (1.7)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.