Or even easier,
$("[EMAIL PROTECTED]'http']").attr('target','_blank');

On 7/23/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:


On Jul 23, 2007, at 6:45 PM, cfdvlpr wrote:



Is there an easy way to do this that does not require you to hand code
each external link?  Can you write a Jquery function that does this
for any link that has the string "http" in it?





Sure, if you want to do it for any link that has an href attribute
beginning with "http," you could do something like this:

$('[EMAIL PROTECTED]').click(function() {
window.open($(this).attr('href'));
return false;
})



--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com








Reply via email to