Wijmo Open is a set of open source jQuery UI widgets. Wijmo widgets such as the slider, dialog, or accordion are extensions to jQuery UI's widgets. Others, such as Wijmo's menu or dropdown, are new widgets.
In Chapter 2, The Dialog Widget, I showed you how to add custom buttons to the dialog widget without changing the internals. The API is unwieldy, in that you must override the icons and behavior for a default button. Now, I will show you how to add a custom button by extending the API. First, open jquery.wijmo-open.all.js
and rename it as jquery.wijmo-open.all.extended.js
.
When you open jquery.wijmo-open.all.extended.js
in an editor, use code folding to collapse all the code and search for wijdialog
. You will get a view that looks like the following screenshot after expanding on the line with varWijDialog
:
All of the Wijmo Open widgets start with "use strict"
. This turns on strict semantics for ECMAScript 5 and allows code to run faster on...