i suppose that with data-remote you are letting the buildin ujs handle
everything but this js is build to be used with link_to so what i think is
that the event is been triggered 3 times because that js is effectively
attaching the event 3 times, so either use link_to or handle the click event
your self, is not hard at all
$("#shocases a").clikc(function(){
console.log("cogito ergo google");
});
you can send aja with this
$.ajax({
type: 'get',
url : $(this).attr('href'),
success: function(){
alert("Annoying message");
}
});
$(this) will be the clicked link
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.