And as a stylistic note, I recommend changing the variable name from $href
to href. The code will work the same either way, but the $ prefix on a
variable name is a common convention to indicate that the variable contains
a jQuery ($) object - which this one doesn't.

Also, Andrea, is there only one possible match to the 'a.pack' selector, or
could there be more than one?

-Mike 

> From: John Resig
> 
> JavaScript can't find variables  inside of a "...", you can 
> change your code to:
> 
> $(document).ready(function() {
>        $('a.pack').click(function(){
>                var $href = $(this).attr('href');
> 
> window.open($href,"popup","width=630,height=700,status=no,resi
zable=yes,scrollbars=yes,location=no,toolbar=no");
>                return false;
>                });
>        });
> 
> --John

Reply via email to