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
  • 204,283
  • 31
  • 260
  • 272
user979331
  • 11,039
  • 73
  • 223
  • 418

0 Answers0