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 <shenan...@gmail.com> wrote: > 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 <frederik.r...@gmail.com> wrote: > > > 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