[jQuery] Re: Is it possible to override a link?

2009-02-24 Thread jQuery Lover
Yes it is... Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Tue, Feb 24, 2009 at 6:06 PM, david.0pl...@gmail.com wrote: > > Thank you very much, i never tought it would turn out so simple! > > Is it also possible to do this with an onclick? > > On 23 Feb, 20:55, Kean

[jQuery] Re: Is it possible to override a link?

2009-02-24 Thread david.0pl...@gmail.com
Thank you very much, i never tought it would turn out so simple! Is it also possible to do this with an onclick? On 23 Feb, 20:55, Kean wrote: > There are a couple of options, depending on your needs. > > $('a#woof').click(function(e){ > e.preventDefault(); > //do ajax form > > }); > > $('a#woo

[jQuery] Re: Is it possible to override a link?

2009-02-23 Thread Kean
There are a couple of options, depending on your needs. $('a#woof').click(function(e){ e.preventDefault(); //do ajax form }); $('a#woof').click(function(e){ //do ajax form return false; // preventDefault and stopPropagation }); On Feb 23, 9:12 am, Frederik Ring wrote: > This should be worki

[jQuery] Re: Is it possible to override a link?

2009-02-23 Thread Frederik Ring
This should be working: $('a#woof').click(function(e){ e.preventDefault(); //do ajax form }); Or you could set all href attributes to '#' before adding the click function