Where to put JavaScript Code
-
I am an absolute newby and have no idea about code.
I am trying to use WP External Links Plugin.
I would like to have the external links on my site open in a popup browser window and this Plugin says I can do that but I need to add this Javascript code to my site. I have no idea how or where to do that. The external links are located in my menu.
jQuery(function ($) {
$(‘a[rel*=”external”]’).click(function (e) {
// open link in popup window
window.open($(this).attr(‘href’), ‘_blank’, ‘width=800, height=600’);// stop default and other behaviour
e.preventDefault();
e.stopImmediatePropagation();
});});
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Where to put JavaScript Code’ is closed to new replies.