hey guys, what am i doing wrong. i have kind of folders on my website that work with a doubleclick. However somehow my window.location.replace doesn't kind of trigger the browser history.
if i use normal click without prevent default, i can use the browser back button. however as soon as i use the script underneath and i doubleclick on a folder i cannot use the browser back button.
$('.folder a').click(function(e) {
e.preventDefault(开发者_StackOverflow社区);
});
$('.folder a').dblclick(function(e) {
window.location.replace($(this).attr("href"));
});
any idea?
This site says the replace wont add to history.
Try:
window.location.href =$(this).attr("href");
精彩评论