Back

Open all links in new tab using JQ

Copy Below Code View As A Text File Show Text Only Show API Edit Code
                            

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(e) { $("a").each(function(index, element) { var win = window.open($(this).text(), '_blank'); if (win) { //Browser has allowed it to be opened win.focus(); } else { //Browser has blocked it alert('Please allow popups for this website'); } }); }); </script>