There are many cases where we do not want our page to open in another tab while clicking ctrl+click and the anchor tag is producing dynamically.
For that, we can add the following script which will disable the same effect.
$(function(){
$("div.secondLink a").click(function(){
if( event.ctrlKey || event.button == 2 ) {
return false;
}
});
});
You can also have a look at the demo attached.
Hope this will help to resolve your bug.
0 Comment(s)