I want to select those classes in jquery that starts with e and end with a numerical value.
i am using
$('[class^="e"]').hide();
but it selects even those classes that do not end with a numerical value.
I want to select those classes in jquery that starts with e and end with a numerical value.
i am using
$('[class^="e"]').hide();
but it selects even those classes that do not end with a numerical value.
try this:
$("div:regex(class, ^e[0-9]+$)").hide()
This uses the :regex
selector by James Padolsey. Get the regex selector here.