How can I check selector to see if he is ending with number?
JS code:
if(!$(this).val())
{
$('label[for^=image], input[id^=image], input[name=time]').remove();
}
I tried adding /d/, but it does not work (
$(‘label[for^=image’ + /d/ +’], ….
)
demo is this what you are looking for: http://jsfiddle.net/8g2WL/
Behaviour: for the id’s ending up with number in
labelyou will see an alert.Hope this helps, please let me know if I missed anything.
sample code using regex
html