Permalink
Browse files

Navigate event: Create a custom event called "beforenavigate" so that…

…, when someone binds to "beforenavigate", the "navigate" event will be initialized.
  • Loading branch information...
gabrielschulhof committed Mar 10, 2013
1 parent 30fd6fe commit 58e94db8a34ed1aaf83547698b3d297b63fdec95
Showing with 13 additions and 1 deletion.
  1. +13 −1 js/events/navigate.js
View
@@ -12,7 +12,19 @@ define([
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
var $win = $.mobile.window, self, history;
var $win = $.mobile.window, self, history,
dummyFnToInitNavigate = function() {
};
$.event.special.beforenavigate = {
setup: function() {
$win.on( "navigate", dummyFnToInitNavigate );
},
teardown: function() {
$win.off( "navigate", dummyFnToInitNavigate );
}
}
$.event.special.navigate = self = {
bound: false,

0 comments on commit 58e94db

Please sign in to comment.