Anonymous Anonymous - 3 years ago
881 0

i can't add Jquery library to my codes and i have to use js code

can somebody help me with converting following code to js


jq to js

    $('.historyAPI').on('click', function(e){      


        var href = $(this).attr('href');

        getContent(href, true);

window.addEventListener("popstate", function(e) {

    getContent(location.pathname, false);

function getContent(url, addEntry) {
    $.get(url).done(function(data) {

        if(addEntry == true) {
            history.pushState(null, null, url); 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download