jQuery: Get the styles of a clicked division
jQuery Fundamental - II : Exercise-64
Get the styles (width, height, text color, and background color) of a clicked division.
<body> <p id="result"> </p> <div id="box1">A</div> <div id="box2">B</div> <div id="box3">C</div> </body>
Sample solution :
HTML Code :
CSS Code :
JavaScript Code :
Contribute your code and comments through Disqus.
Previous: Get the background color of a clicked division.
Next: Change the color of any paragraph to red on mouseover event.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics