how to check the type of element in jquery Edit
In the javascript code, I wanted to update the src if the selected element is an Image. Check the jquery / javascript code below to find the type of element.
$(".classname")[0].tagName or $("#yourid")[0].tagName
The above code returns IMG if the selected element is an image