Windows – Linux – Mac OSX Guides

Jquery selector problem with IDs have square brackets

I’m using PHP quite often in my work, and have the habits to put the form name in the syntax of array, such as

But the problem happened when I use Jquery selector to select the element

This will not work


But this will work


There is another way is escape the square by putting \\ before the
square brackets


Hope that help someone having the same trouble like me.

Related Articles

Loading Facebook Comments ...


  1. alex

    Thanks this help me

  2. Evgeny

    not working in Opera moobile.

Post your comments

Your email address will not be published. Required fields are marked *