jquery - Unrecognized expression when using special ID -


i have following code in jquery mobile 1.2 project. working fine until upgraded jquery 1.7.2 jquery 1.8.3.

<input type="text" id="a['val']" name="a['val']" /> 

when page loaded, throws

syntax error, unrecognized expression: label[for='a['val']']

and page refuse load. although there's no label in code, error thrown asking label. problem occurs in jquery 1.8 , it's working fine 1.9 , versions prior 1.8.

here's fiddle problem on 1.8.3 + jqm 1.2

here's fiddle without problem on 1.9.1 + jqm 1.2

i think bug or feature in jquery 1.8 + jqm 1.2, occurs when have id containing '

jquery can't transfer selector of label correctly , throw error, can modify id "a[val]" or 'a["val"]', it's ok.

<input type="text" id='a["val"]' name="a['val']" /> 

see fiddle


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -