How do I grab the CSS #ID of the clicked element below, so that I can execute subsequent commands on it:
<div id="ID1" onclick="clickable">Div 1</div>
<div id="ID2" onclick="clickable">Div 2</div>
<div id="ID3" onclick="clickable">Div 3</div>
Using script:
function clickable() {
// need to grab '#ID1','#ID2', or '#ID3' depending on which is clicked
}
I tried simply using $(this)... but it doesn't work.