Hi Micheal, you are right I will change the variable name...I still make some confusion....
yes a.pack van have more match. I test and is working nice. You think is better to make some more modification? Thanks Andrea On Aug 24, 3:50 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote: > 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