I want to find all input boxes with id
containing _date
My code is like this:
<input type="text" name="creation_date" id="id_creation_date" />
Can I use regex for that? Do I need to install something extra for regex to work with jQuery?
I'm thinking of one of these...
$('input[id*="_date"]').css('background-color', 'red');
If you just want to check ending with "_date" rather than containing "_date" you can use
$('input[id$="_date"]')
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