jQuery issue with HTML indexes -


in html have textarea element id of employment[duties].

when try access element through jquery, ignores it.

i think because of whole input[type='text'] selector jquery has can select specific items within [] brackets.

is there way @ around this?

use escape square brackets:

$('#employment\\[duties\\]') 

edit: problem doesn't apply in plain javascript, opens other options you:

  • you can use plain javascript: document.getelementbyid('employment[duties]')

  • or can define variable var emp = document.getelementbyid('employment[duties]'); , wrap jquery $(emp) , use jquery selectors on it.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -