Click handler problem in Safari
Hello-
I'm attaching a click handler to all hyperlinks on a page. It makes a web service call. My desired behavior is for the web service to be called, and then have the link execute its default behavior. Here is my code:
-
$(function()
{
$('a').live('click', function(event)
{
//event.preventDefault();
MyServiceCall($(this).text());
});
});
This works as expected in Firefox and IE. In Safari, my web service never gets called unless I uncomment the preventDefault, but doing so obviously prevents the the link from performing its original action.
Anybody have any ides?
- Dave