Strange problem in IE7 Only in another browser

This is plain HTML.

I have jquery-ui (1.10) and jquery (1.9.1). it works fine in IE8.9, firefox and in Chrome only in IE 7
HTML has something like below. I have no idea what it is and where it comes from
this piece of code is missing when I see this HTML code in IE8.9, Firefox and chrome

sizzle-1367496452938="[object Object] 

and all div tags introduced by this

 jQuery191030626454110549073="6" 

Here is what part of the html looks like this.Anyone knows what the problem is?

  <html sizzle-1367496167699="[object Object]"> <div class="container" id="container2" sizzle-1367496452938="[object Object]"> <div class="arrow-left" id="wppanelstatus" style="width: 1%;" jQuery191030626454110549073="6"/> 

UPDATE
I DO NOT use sizzle javascript selector library

+7
source share
2 answers

This is what jQuery uses to attach event handlers, etc. in IE.

It is called expando. This is just a string that basically represents "jQuery" + a timestamp (essentially a unique value).

And jQuery depends on sizzle, so you definitely use it ....

You can read more here: jQuery attribute is automatically added to elements

+6
source

After some research, this answer is my question 100%

I just copy the paste from the above blog

How jQuery selects elements using Sizzle

Selection process

There are many optimizations in jQuery that make you work faster. In this section, I will cover some of the queries and try to trace the jQuery route.

$ ("# header)

When jQuery sees that the input string is just one word and searches for an identifier, then jQuery calls document.getElementById. Simple and straightforward. Sizzle is not called.

$ ('# header a) in a modern browser

If the browser supports querySelectorAll, then querySelectorAll will satisfy this request. Sizzle is not called.

$ ('. header a [href! = "hello"]) in a modern browser

In this case, jQuery will try to use querySelectorAll, but the result will be an exception (at least in firefox). The browser throws an exception because the querySelectorAll method does not support certain selection criteria. In this case, when the browser throws an exception, jQuery will pass the Sizzle request. Sizzle not only supports the css 3 selector, but also higher and higher.

$ ('. header a) in IE6 / 7

In IE6 / 7, querySelectorAll is not available, so jQuery will pass this request to Sizzle. Let's see a little detail on how Sizzle will handle this case.

Sizzle gets the '.header a. It breaks the string into two parts and stores it in variables called parts.

1 parts = ['.header', 'a'] The next step is the one that installs Sizzle separately from other selector engines. Instead of first looking for elements with a class title and then going down, Sizzle starts with the outermost selector line itself. According to this presentation by Paul Irish, YUI3 and NWMatcher also go from right to left.

+4
source

All Articles