Javascript Code


 

var nodeitem = document.querySelectorAll(‘.footer .widget > .widget-title’)
for(var x=0;x<nodeitem.length;x++){
nodeitem[x].style.border=’1px solid #71d7f7′
nodeitem[x].style.position=’relative’
nodeitem[x].insertAdjacentHTML(“beforeEnd”,'<a class=”edit” style=”position: absolute;right: 0;top: 2px;color: burlywood;font-size: 14px;font-weight: normal;background: #000;padding: 3px 12px;”>Edit</a>’)
nodeitem[x].addEventListener(‘click’,myfunction)
function myfunction(){
this.style.color=’red’
this.contentEditable=”true”
}
}
Note: this      is   self object