简体   繁体   中英

jQuery selector behaves differently in IE

I have an element that looks like this:

在此处输入图片说明

I use the following selector to point to the a (anchor) element

$('.navigation-tabs .profile a')



This selector returns the following in Chrome : 在Chrome中使用选择器

Returns the following in IE (all versions):

在IE11中使用选择器

What does the result in IE mean?

If the objective were to trigger the click event on the selector, how do I use the selector result in IE to do so?

Results are actually same. Result in chrome looks different because IE shows you plain js object, while chrome shows you markup, which is interactive by the way.

In your javascript code, you don't think about it and just use this objects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM