How can I select some divs with class name pattern a-<random>-c
.
You may find useful information Here.
for your case this might work
$("div:regex(class, .a*c)").jqFunction()
for matching the starting of selector string
<script>$('input[name^="txt"]').val('content here!');</script>
this Finds all inputs with an attribute name that starts with 'txt' and puts text in them.
<script>
$("div:contains('new')").css("text-decoration", "underline");
</script>
Finds all divs containing "new" and underlines them.
<script>$('[name$="address"]').val('a letter');</script>
Finds all inputs with an attribute name that ends with 'address' and puts text in them.
Combination of these may be helpful to you see if it helps
Just use the standard selector that meets the needs of your pattern e.g. Starts With, Contains, Ends With, or you can use the Regex selector plugin from James Padolsey to match based on a regular expression.
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