Try prevent default on single click when adding dblclick:
Instead of return false;
you can prevent the default action for the event:
If you don't want the event to bubble throw the DOM you can use the event.stopPropagation()
function
$('#ajax-links a').live('click', function(event) {
event.preventDefault();
});
$('#ajax-links a').live('dblclick', function(event) {
event.preventDefault();
var url = $(this).attr('href');
url = url.replace(/^.*#/, '');
$.history.load(url);
});
Dblclick events only gets fired at dblclick: see: jsfiddle.net/cR5ZS
The reason you think its get fired on single click can be that your link refers to something like: #/some_page/
and your dblclick event handler does almost the same. Saves /some_page/
with $.history
plugin and in my experience the $.history plugin does almost the same: takes the url parsed to with the call and puts it in the hash : url=/some_page/
becomes #/some_page/
Andreas