0

I have this code:

  $('select[name=picks[0][football]]').on('change', function() {
    alert( this.value );
  });

and here is the HTML

<select name="picks[0][football]">
                <option value="one">One</option>
                <option value="two">Two</option>
                <option value="three">Three</option>
              </select>

But when I run my code I get this error:

Uncaught Error: Syntax error, unrecognized expression: select[name=picks[0][football]]

What am I doing wrong here?

j08691
  • 197,815
  • 30
  • 248
  • 265
user979331
  • 9,373
  • 64
  • 206
  • 383

0 Answers0