i am trying to do something like this in jquery.
if ($(e.target) == "select"){
//var output = $(e.target).each option
//display newoverlay(outp开发者_JS百科ut)
}
How about:
if($(e.target).is('select')) {
$('option', e.target).each(function() {
/* "this" is the <option> element in here */
// newoverlay(this)
})
}
Although I'm not sure what you want to do with the individual <option>
elements.
精彩评论