I created a new jQuery UI widget and wanted to add a version so that if my API changes in the future, users can respond accordingly based on the specified version of the widget. In the main widgets, developers used $.extend()to add a public version of the variable:
$.extend()
$.extend($.ui.dialog, { version: "1.8.11", ... });
Is this a suitable method to add a version identifier for my own widget or just include a variable as part of the original widget definition?
What about $.ui.dialog.version?
$.ui.dialog.version
, somehting, , window.myvar={dielog: '1.0',...} :) coz ui, , ...:), ,
window.myvar={dielog: '1.0',...}