Permalink
Browse files

add 'widgetinit' event for users to enhance widgets and markup post '…

…widgetcreate'
  • Loading branch information...
johnbender committed Sep 15, 2011
1 parent 150697c commit ae2e7f0dc4348c53dd8945f5489185118f2ae9e4
Showing with 10 additions and 0 deletions.
  1. +10 −0 js/jquery.mobile.widget.js
View
@@ -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,

0 comments on commit ae2e7f0

Please sign in to comment.