I’m looking for the ability when a link contains, for example /schedule/ in the address, only this link will open in a new window when clicked. I have a series of 5,000+ links that need to open in a new window, which I would need to update manually (no find/replace available), which contains /schedule/ in the address field and I need them all to open in a new window.
This script will enable external links to open in a new window, but can someone please assist if the link contains /schedule/ in the address field? the external algorithm can be removed. Also, can it include a width + height constraint such as 500 x 600?
UPDATED WITH SOLUTION
add this to your library to append the width & height:
http://plugins.jquery.com/project/open
<script type="text/javascript">
$(document).ready(function(){
$("a[href*='/schedule/']").open
({
width:800,
height:600,
location:true,
toolbar:true,
resizeable:true,
scrollbars:true
});
});
</script>
try this:
For width / height constraints you need to open a popup window (lookup window.open…) or use a modal window that can load external content into an iframe.