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,resizable=yes,scrollbars=yes,location=no,toolbar=no");
return false;
});
});
--John
On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am a Cold Fusion developer starting playing with jquery and I get
> the first problem:
>
> I have a link with class pack and I want to open in a popup using the
> href attributes:
>
> My jquery statment is:
>
> $(document).ready(function() {
> $('a.pack').click(function(){
> var $href = $(this).attr('href');
>
> window.open("$href","popup","width=630,height=700,status=no,resizable=yes,scrollbars=yes,location=no,toolbar=no");
> return false;
> });
> });
>
> 1) if I alert $href I get the right attributes ( the link ) but I get
> a second window open when I close the first one. So I think maybe
> there is an iteration that I am not considering.
>
> 2) If I use the $href in the open statment I open a pop up win that
> contain the page where the event is generated and not the link/page
> attributes.
>
> Some suggestion???
>
> Thanks
>
> Andrea
>
>