#9362 closed feature (wontfix)
Enable widgets to automatically extract their own options from an attribute on the element.
Reported by: | jsm11482 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.widget | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I currently define options for my widgets in an attribute on the element. But I think it would make for a simple and useful addition to the main jQuery UI library. To best understand what I mean, please see this example.
This would allow us to easily define the options for our widgets inline with the actual widget (instead of in a script somewhere). It's very helpful for dynamically generated pages with many widgets with different configurations.
Change History (5)
comment:1 follow-up: 2 Changed 10 years ago by
Component: | ui.core → ui.widget |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
comment:3 Changed 10 years ago by
Can you elaborate regarding how I could use apply a specific function to the _getCreateOptions() for all widgets? Is there a way to do this?
comment:4 Changed 10 years ago by
Change $.widget._getCreateOptions()
. Please ask for help on IRC, the forums, or Stack Overflow.
comment:5 Changed 10 years ago by
Thank you, sorry for asking that here, I realize it's not the right place. I'm done. :)
You can already build whatever logic you want with _getCreateOptions(). We're not going to build this into jQuery UI.