Getting the element type the jQuery way:
var elementType = $(this).prev().prop('tagName'); Checking for specific element type: var is_element_input = $(this).is("input"); //true or falsethen you can do this:
if ($('#myiframe').is('iframe')) $("#myiframe").contents().find("#myContent")
评论
发表评论