this is sindhuri,I receive the following warning in my Google Chrome console: event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery1.9.1 version i am using.
<script>
window.jQuery(document).ready(function () {
window.jQuery('#hideshow').click(function () {
window.jQuery('#message').toggle(function () {
window.jQuery('#hideshow').text('Show');
window.jQuery('#message').hide();
alert("message hide succeesfully");
}),
function () {
window.jQuery('#hideshow').text('Hide');
window.jQuery('#message').show();
alert("message show succeesfully");
}
});
});
</script> <a href="#" id="hideshow">Hide</a>
BeforeUnloadEvent has a returnValue attribute. Setting returnValue to a non-empty string in an event handler causes the user agent should ask the user to confirm that they wish to unload the document. This is equivalent to returning a non-empty string in the EventHandler