Let's say that this is some part from my source:
Code: Select all
<li id="my_id" class="my_class">How can I get, let's say into another variable, the class of the element which its id is held by targetId?
Something like this:
Code: Select all
var my_class = some_made_up_function(targetId);