I'm trying to serialise my array but I'm getting nothing in the log.
I want all checkboxes called color[] but not the first one.
I've tried:
$("input[name='color[]:not(:first)']").serialize();
But this logs as blank.
The following works but includes the first one, so it must be a problem with the not part.
$("input[name='color[]']").serialize();
Your attribute equal selector is wrong $("input[name='color[]:not(:first)']")
$("input[name='color[]']:not(:first)").serialize();
The selector you are using is wrong.
Finish ] after the name=value selector.
$("input[name='color[]']:not(:first)").serialize();
Here are the mistakes highlighted:
$("input[name='color[]:not(:first)']").serialize();
// ^ finish selector here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With