I have a css class (.SideOption) which has multiple instances on a page and I want to have something to differentiate between them (so I chose ID), but I can't get JS to get the ID, it just returns undefined in the alert box.
JS;
function CreateBox()
{
    $MyID = this.id;
    alert($MyID);
}
$(document).ready(function() 
{
    $(".SideOption").click(function() 
    {   
        CreateBox();
    })
})
This is what the SideOption looks like for example.
<div class="SideOption" id="1">
</div>
 
     
     
    