update events
This commit is contained in:
@@ -1061,8 +1061,9 @@ $.fn.createHoverTouch = function () {
|
||||
|
||||
var isCurrentNavBack = false;
|
||||
|
||||
$(window).on("navigate", function (e, data) {
|
||||
data = data.state || {};
|
||||
window.addEventListener("navigate", function (e) {
|
||||
|
||||
var data = e.detail.state || {};
|
||||
isCurrentNavBack = data.direction == 'back';
|
||||
});
|
||||
|
||||
|
||||
@@ -2472,10 +2472,9 @@ var AppInfo = {};
|
||||
|
||||
function pageClassOn(eventName, className, fn) {
|
||||
|
||||
$(document).on(eventName, function (e) {
|
||||
document.addEventListener(eventName, function (e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
if (target.classList.contains(className)) {
|
||||
fn.call(target, e);
|
||||
}
|
||||
@@ -2484,10 +2483,9 @@ function pageClassOn(eventName, className, fn) {
|
||||
|
||||
function pageIdOn(eventName, id, fn) {
|
||||
|
||||
$(document).on(eventName, function (e) {
|
||||
document.addEventListener(eventName, function (e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
if (target.id == id) {
|
||||
fn.call(target, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user