Search and Top Navigation
#9362 closed feature (wontfix)
Opened June 06, 2013 12:57AM UTC
Closed June 06, 2013 12:22PM UTC
Last modified June 06, 2013 02:38PM UTC
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.
Attachments (0)
Change History (5)
Changed June 06, 2013 12:22PM UTC by comment:1
component: | ui.core → ui.widget |
---|---|
resolution: | → wontfix |
status: | new → closed |
Changed June 06, 2013 12:52PM UTC by comment:2
I was not aware of that function , I'll take a look. Thanks.
Changed June 06, 2013 02:19PM UTC by comment:3
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?
Changed June 06, 2013 02:37PM UTC by comment:4
Change $.widget._getCreateOptions()
. Please ask for help on IRC, the forums, or Stack Overflow.
Changed June 06, 2013 02:38PM UTC by comment:5
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.