This should work for you.
I just copied your code and made adjustments.
jQuery.noConflict();
jQuery("li.menu-item-47 a").on("click",function( event ) {
event.preventDefault();
if(confirm("YOU ARE LEAVING THE WEBSITE" + '\n' + "" + '\n' + "You are being connected to a secure bill payment system. Press Ok to continue.")) {
window.open( this ,'_blank'); //This will open the website in a new tab
}
});
Related Posts:
- Scroll to ID broken in main menu
- force enqueue script to be first in order of prominence
- How can I make default jquery version of WordPress “async”?
- Add section (add_settings_section) to a custom page (add_submenu_page)
- What’s the easiest way to duplicate an entire navigation menu?
- Handling jQuery Component Collision
- How to Add jQuery Infinite Scroll to My Custom Archive Page
- How to call “page specific menu items” in template [closed]
- Is dynamic forms/entries possible in Widget?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Editor not displaying dynamically after clicking on the button
- WordPress Enqueue Script Chaos (jQuery & Foundation.js)
- Check javascript file Proper way in functions.php
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- WordPress Plugin development Call to undefined function jQuery()
- Creating WordPress Plugin solely for Admin panel with dash menu and submenus
- How to load default scripts included with WordPress correctly?
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Multiple navigation menus to a location?
- WordPress 3.5 Media Manager – add a button
- Handling jQuery Component Collision
- How do I make sure a plugin loads a script after jQuery
- Making menu link open in new tab?
- Add get_option to jquery
- Check if email address exists front end with AJAX in a plugin
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- Change upload folder for a CPT
- Uncaught TypeError: jQuery(…).flipster is not a function in wordpress
- Delete mobile menu button [closed]
- Changing page URL and connect newsletter to MailChip
- Redux Framework: Page freezes on typing in Editor
- How can I inject options into an select tag inside the widget form?
- Dynamic admin submenu
- Display wordpress post’s in popup?
- Using color picker in plugin, does input attribute order matter?
- Custom Permalink Plugin and Current Page/Ancestor in Menus
- wp-custom-menu filter removes the current_page_item class
- jQuery | JJ Carousel Plugin – Can’t set speed [closed]
- add_action does not call the function
- Jquery NoConflict Problem
- this jQuery function works perfect in static html page but not on wordpress
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- “Conflict” with jQuery (or its plugins)?
- a weird attribute on every html tag
- How to track clicks
- Remove Yoast jQuery from front end
- How to display checked posts on another page over AJAX? (like comparasion style)
- Adding media upload button to User Profile page (following a tutorial)
- I changed .live() to .on() but change is not reflected on the server
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Save user total active time after login in wordpress [closed]
- Opening a JQuery modal window on click of a button with a JQuery plugin
- How do I make sure that my plugin only runs on article detail pages?
- Disable submit button order
- WordPress Custom Menu Admin helper plugin
- Why jquery option is not working when pass value using wp_localize_script?
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- force jQuery to load in the head
- Dropdown menu on click change
- How do i specify a url to which to redirect the user after he logs out from facebook?
- Ajax request sends url rather than data
- Error jQuery(domChunk).live is not a function
- I cannot include a file in my plugin settings page
- sliding/fading header plugin or approach suggestion
- Cannot read properties of undefined (reading ‘firstChild’) using photoswipe in product page
- Trigger jQuery to add events after AJAX-loading table in admin plugin
- How do I reinit WordPress plugins dynamically using jS?
- login form should redirect to register page for in 1st login next time it should redirected to home page
- JS working when used normally but not in wordpress
- $wpdb not working wordpress plugin ajax call
- WordPress site hamburger menu toggle not working
- main navigation menu disappear after adding jquery source file
- Dynamic input fields in WordPress Plugin
- Overwrite js code using WP_Footer
- Not displaying Woocommerce product page in lightbox
- Sub Categories in drop down menu
- show-hide based on select option jquery wordpress
- Add HTML between feed items
- WordPress Feedback popup with date saved into table
- WordPress ajax not working in registration
- How to add jquery to my custom post type wp plugin
- add_media_page function not creating submenu
- How can I pass value to function in add_menu_page?
- Automatically add child pages to menu
- How to add plugin activity in the menus?
- How change menu for each user in plugin?
- Redirect url in plugin to somewhere else?
- “The Events Calendar” Issues in WP 3.2
- Element works, but not on wordpress site [duplicate]
- WordPress site keeps getting flagged as malware [closed]
- Make a Custom template for a specific category in wordpress
- How can I create a navigation menu in the sidebar that can also act like a slider?
- FacetWP: Plugin breaks button/modal functionality inside searchable content area
- TypeErrors with Yoast, jQuery in conflict?
- Plugin: Custom menu item problem
- Count div with class (.length) only shows 0 [closed]
- Is it possible to know which menus are owned by a plugin?
- Jquery post responses 500 error after some time and lastly an 503 error