Tagged: navigation
I’d like to have the live chat nav item open a new window but be able to specify the window size. Can this be done?
Hey endoradigital,
There is no live chat in any of our themes so I’m not sure what you are referring to? Please try to explain a bit further.
Thanks,
Rikard
Sorry. We have a navigational item labeled live chat that links to an external live chat service. We’d like to tell this one navigational item to open in a new window and be able to specify that size of the new window.
Thank you, but this is a nav item, not just a regular link. How can I do this within Appearance > Menu etc.
Hi,
A nav item is a link, what you need to do is something like this (functions.php):
function add_custom_script(){
?>
<script>
(function($){
$(window).load(function() {
$("#menu-item-num").on("click", function(e){
e.preventDefault();
window.open ("http://www.site.com", "mywindow","menubar=1,resizable=1,width=350,height=250");
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Change respectively.
Regards,
Josue