Unobtrusivelib 介绍
Unobtrusivelib is a collection of small javascripts behaviors intended to
replace the presence of script in the body of pages, as to open a popup or
cleaning out a form field on the focus.
To enable all modules, we call the jQuery.unobtrusivelib() method on the
“document ready” event:
jQuery(function(){ jQuery.unobtrusivelib(); });
It is also possible to list only the modules used in an array:
jQuery(function(){ jQuery.unobtrusivelib(["inputAutoFocus", "inputAutoClear", "popup", "external"]); });