Created
January 22, 2019 17:12
-
-
Save ohmydevops/2c7674d0baef1a95b89e6ba763766ec6 to your computer and use it in GitHub Desktop.
handel back button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('previous', function (e) { | |
e.preventDefault(); | |
var stop = false; | |
var width = document.getElementById("mySidenav").style.width; | |
$('.modal').each(function () { | |
if ($(this).hasClass('show')) { | |
$(this).modal('hide'); | |
stop = true; | |
} | |
}).promise().done(function () { | |
if (stop) { | |
stop = false; | |
console.log("بلاه بلاه بلاه"); | |
} else { | |
if (width == "250px") { | |
document.getElementById("mySidenav").style.width = "0"; | |
} else { | |
$('.warantybottom').each(function () { | |
if ($(this).hasClass('show')) { | |
$(this).collapse('toggle'); | |
} | |
}); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment