How to add version number in jQuery UI Widget

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($.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?

+5
source share
1 answer

What about $.ui.dialog.version?

, somehting, , window.myvar={dielog: '1.0',...} :) coz ui, , ...:), ,

0

All Articles