I am using a class name for all href links in my pages,
For example;
<a href="https://mysite.com" class="ajax">
And select that class to load content without refreshing the page,
$(".ajax").on('click',function() {
event.preventDefault();
return false;
var t = $(this).attr("href");
History.pushState(null, 'TEST', t);
});
BUT when i load content into the tooltip, that doesn’t work.
I tried to add the code above in document.ready state into the loaded tooltip content but didn’t work too.
How can i do it ?
Thanks
P.S : I am using Tipped plug-in for my all tooltip solutions.
You are returning false before the history function runs, preventDefault should be enough, but you will need an event, notice the “e” in the function(e):