[jquery] finding the type of an element using jQuery