1
Good morning.
My site uses jQuery, but I need to add a code that sends a confirm()
to close the browser, however I realized that only works with the library mootools:
window.addEvent('load', function () {
window.onbeforeunload = function (e) {
e = e || window.event;
// For IE and Firefox prior to version 4
if (e) {
e.returnValue = 'Any string';
}
// For Safari
return 'Any string';
};
});
Is there a problem with adding this library?
May end up interfering with the jquery.min
?
Can you add more code? more information about the problem? For information: Mootools and jQuery may coexist with some care.
– Sergio
No problem yet... I just want to know if the two libraries are together in the page script will have some interference in both? If they conflict. @Sergio
– Pedro Quezado
They can conflict, easy to solve. But if you add more code, I can help you use only one of them, since it is preferable to have only one. Otherwise this question is at the bottom of this: -> http://answall.com/q/769/129
– Sergio
It’s that I need a code that displays a confirm() when I want to close the browser, but I got this code that works with Mootools.
– Pedro Quezado
If that’s the only reason you can change the first line to
window.addEventListener('load', function () {
and you no longer need Mootools. Test.– Sergio
uhuuuuuuuuuuuuuuu hehehe vlwww manooo kkk
– Pedro Quezado