Is there an alternative for jQuery UI's widgets?
I'm making a calendar for jquery mobile, I'm using the jquery weekcalendar (jQ wC), but the problem is, that jQ wC is using jquery UI, and this is in conflict with jquery mob开发者_StackOverflowile.
For this reason, I have removed everything UI related out of the jQ wC, but I'm stuck at the last part, and that is the widgets part.
It works like this: there is a jq wc CORE file, which initiates a widget, and a Impl file which points to this widget, and this file overwrites settings from the core file.
My question is: how can I get rid of the widgets, and still have this impl file overwrite the settings of the core?
The files can be found here:
http://pastebin.com/gswWRm8D http://pastebin.com/2180H1Veedit I temporarily solved tihs, by stripping down the UI code, and only importing the widget part of jQuery UI (which is just 3kb, instead of importing the whole library: 200kb). I am however still looking for something to totally remove the library.
Since alpha2, jQuery Mobile has used the jQUI widget factory.
$.widget
is jQUI, with $.mobile.widget
extensions. If you've pulled all other UI dependent code out except for widget factory, changing the UI widget calls ui.weekCalendar
to something more suitable (mobile.weekCalendar
) should be all you need to do.
See http://jquerymobile.com/blog/2010/11/12/jquery-mobile-alpha-2-released/
All of the relevant jQuery Mobile widgets have moved over to building off of the jQuery UI Widget Factory. This gives us the ability to have greater extensibility and methods (such as the ability to disable controls). Specifically in this release Dialog, Form Buttons, listview, collapsible, Checkbox/Radio, textinput, slider / switch, Select menu, have all moved over to the widget factory, and we’re continuing to work on extending the methods and events those plugins provide.
There are a few alternatives to jQUery UI, but I suggest you fix the conflicting problem rather than just switching libraries.
If you wish, though http://www.kendoui.com has been gaining a lot of attention lately.
精彩评论