I have a wrapper div1, with div2 inside which contains a string. When i click on div1 i want the content from div2 to appear in alert(); how can this be done ?
document.getElementById(feats).addEventListener("click",function show() {
var htmlstring = this.innerHTML;
alert(htmlstring);
The code above simply just add an even listener and alert all the html code from the wrapper.
Thanks
With jQuery, which is well worth learning: