I'm trying to call the private method _scrollMe from within my plugin, but I keep getting an error that it's not a function.
Can somebody tell me what I'm doing wrong? Thanks!
(function( $, window, undefined ){
$.widget( "mobile.multiview", $.mobile.widget, {
_create: function() {
this._morph();
},
_morph: function() {
$('div[data-role="page"]').live('pagebeforeshow.scroll', function(event){
var $page = $(this);
if ( $page.data('scrollable', 'Off') ) {
$page._scrollMe(); // this doesn't fire
}
});
},
_scrollMe: function () {
alert ("scrollMe");
}
});
// initialize
$( document ).bind( "pagecreate", function( ) {
$(document).multiview();
});
})(jQuery,window);