Reputation: 583
I would like to ask if it's possible to disable the refresh of the browser in one page only using angular or javascript.
Upvotes: 1
Views: 7320
Reputation: 2373
$(function($){
$('[data-toggle="redirect"]').click(function(e){
e.preventDefault();
window.location = $(this).attr('href');
});
$('.job-popup').click(function(e){
e.preventDefault();
});
});
It will help you dude
Upvotes: 0
Reputation: 2130
document.onkeydown = function(){
switch (event.keyCode){
case 116 : //F5 button
event.returnValue = false;
event.keyCode = 0;
return false;
case 82 : //R button
if (event.ctrlKey){
event.returnValue = false;
event.keyCode = 0;
return false;
}
}
}
This code helps you to prevent f5 and ctrl + R functionality
Upvotes: 3