I think one of greatest features of jQuery is support of XPath and
CSS3 selectors, so why to mess up code with each() and match()?
Use this nice way:
$("[EMAIL PROTECTED]'http:']").click(function(){
    ...
});

More about it:
http://jquery.com/docs/Base/Expression/XPath/
http://jquery.com/docs/Base/Expression/CSS/

MichaL

2006/11/28, Michael Holloway <[EMAIL PROTECTED]>:
> Hi Adam,
>
> Welcome to the community.
> I haven't tried this, but how about:
>
> // each a-tag
> $('a').each(function(){
>     // if the url contains http or https we take it it's an external url
>     if(this.href.match(/https?/)){
>        // when the link is clicked, open a popup and stop the parent
> going anywhere
>         $(this).click(function(){
>             window.open(this.href);
>             return false;
>         });
>     }
> });
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to