Hello.

I'm trying to make external links open in a new window but the each()
seems a little strange.

Am I missing something in the code below?
Because "this" gets the "href" attribute of the element, instead of
getting the current element itself.
The strangest of it all is when I run this snippet right into
firebug's console, it works! And when I place it into my jQuery scope,
it doesn't.

$('a[rel*="external"]').each
(
    function()
    {
        $(this).click
        (
            function()
            {
                window.open(this.href);
                return false;
            }
        );
    }
);

Reply via email to