- It doesn't apply to every scenario.
- It will hurt if you use it wrong.
- Long etc.
I hope someone creates a complete jquery.ui.unobtrusive plugin. Since I'm a developer I have already started one at:
Until now I've seen incomplete and ugly approaches (the latter is obviously a personal opinion):
- Generate small pieces of script from server-side code, intermingled with the final HTML code (outside the head tag), and handle elements' IDs and classes.
This new approach is:
- Flexible: you can use whatever you like to generate the attributes (ASP.NET MVC HtmlHelpers, your own framework, write attributes by hand in your HTML, etc).
<input type="text" ui-datepicker="true" ui-datepicker-showOn="button" ui-datepicker-buttonImage="../themes/mytheme/calendar.gif" >
What do you think?