Monday, August 31, 2009

[jQuery] Re: jqModal +r14 updated

2009/4/30 Steven Garcia <stevendgarcia@gmail.com>:
>
> I cant seem to get jQuery's live function working with this at all.
>
> I tried all variations possible, including dmitri's suggestion
>
> The modal does indeed pop up, but instead of loading the ajax content,
> I get redirected to that URL.
>
> Anyone else run into this problem?
>

me too!

using FF 3.5.2
this worked for me:

$('#jqModal').jqm({ajax:'@href'});

// open the modal whenever anchor links on the page are clicked
$('a.thickbox').bind('click',function(){
$('#jqModal').jqmShow(this);
return false;
});

eek. return false is a must, why does nobody mentions? live works the
same way. just use live() instead of bind()

1/ jqmShow(this)
2/ return false;

cheers,
robert

No comments: