$(document).ready(function(){ function newElementaddressSpace(){ var $tr = $(''); $tr.append(''); $('#tree').append($tr); console.log("this funct"); } $(".nodeRoot").click(function () { console.log("Here"); $(this).css("border","5px solid green"); }) $("#load_nodeset").click(function(){ newElementaddressSpace(); $.getScript('executeNodeSetParser.js', function(jd) { let lt = parseAll() }) console.log("Button1 clicked") }) });