1

When I tried to inspect one of the textbox in IE8, I found that there is weird attribute in the tag. This does not happened in only checkbox and textbox, all input type include select as well.

Where is this attribute came from? If it is valid, what does it mean?

jQuery17204372428416893459="14"

<INPUT onblur="" id="id1" class="class1" onkeyup="" onclick="" onchange="" maxLength="30" size="200" name="name1" autocomplete="off" jQuery17204372428416893459="14" value="" />
Chin
  • 593
  • 4
  • 15
  • 36
  • possible duplicate of [strange jquery attribute added on checkbox in ie8](http://stackoverflow.com/questions/19783097/strange-jquery-attribute-added-on-checkbox-in-ie8) – jojo Jun 11 '15 at 14:36

1 Answers1

0

Confirm that you are seeing the same issue with this fiddle: https://jsfiddle.net/B4TyL/1/

This "expando" attribute is used by jQuery to keep track of the events bound to your checkbox element. If you can't check it, that's probably because you have an event handler function preventing it.

Try this:

You'll need to modify your jquery source. For example, 1.6.2: http://code.jquery.com/jquery-1.6.2.js

Includes the following:

jQuery.extend({
    cache: {},

    // Please use with caution
    uuid: 0,

    // Unique for each copy of jQuery on the page
    // Non-digits removed to match rinlinejQuery
    expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),

You can change the expando line as follows:

    // Does not support multiple copies of jQuery on the same page!
    // 0 included to match rinlinejQuery (/jQuery\d+/)
    expando: "jQuery0",
jojo
  • 1,135
  • 1
  • 15
  • 35
  • Does it only can be seen in IE8? Because I tested on Chrome and Mozilla, but it doesn't have this attribute. – Chin Jun 11 '15 at 06:03
  • Yes: http://stackoverflow.com/a/3529339/3412545 , which Chrome / Mozilla version are you using? – jojo Jun 11 '15 at 14:26
  • Chrome `43.0.2357.124` and Mozilla `38.0.5`. So basically, I can just ignore the jQuery event attribute that seen in IE8? – Chin Jun 11 '15 at 14:30
  • Yes, see here: http://stackoverflow.com/a/2760928/3412545. "The numeric value assigned to the expando is an incrementing counter that references its location in the jQuery cache object." – jojo Jun 11 '15 at 14:35