Passing functions to options in jQuery UI
It would be nice if I could pass a function as an option when using jQuery UI, like I can in jQuery 1.4 with the .val() method. For example:
- $(":button, :submit, :reset").button({
- icons: {
- primary: function (element) {
- return findIconClass(element);
- }
- }
- });
(where findIconClass() returns any 'ui-icon-*' css classes on the element)