mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-19 05:41:00 +00:00
add 'widgetinit' event for users to enhance widgets and markup post 'widgetcreate'
This commit is contained in:
parent
150697c8d2
commit
ae2e7f0dc4
1 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,16 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.widget", {
|
||||
// decorate the parent _createWidget to trigger `widgetinit` for users
|
||||
// who wish to do post post `widgetcreate` alterations/additions
|
||||
//
|
||||
// TODO create a pull request for jquery ui to trigger this event
|
||||
// in the original _createWidget
|
||||
_createWidget: function() {
|
||||
$.Widget.prototype._createWidget.apply( this, arguments );
|
||||
this._trigger( 'init' );
|
||||
},
|
||||
|
||||
_getCreateOptions: function() {
|
||||
|
||||
var elem = this.element,
|
||||
|
|
|
|||
Loading…
Reference in a new issue