1
The Code below changes the innerHTML of a DIV and when I run the function item.Footer();
the javascript console tells me "Referanceerror 'item is not defined?"
(function() {var item ={
Name: "site-info"
Html: "Powered by <a target='_blank' href='https://www.twitter.com/FRNathan13'></a>"
Footer: function(){
document.getElementById(item.Name).innerHTML=item.Html;
}
}
}
<div id="site-info"><button onclick="item.Footer();">MUDAR DIV!</button></div>