There are tags with attributes id like this
<span id="attr35"></span>
<span id="attr44"></span>
<span id="attr23"></span>
Need to set the style to them like this (last two digits might be any)
$("span[id=attr???]").setStyle({'display':'inline'});
Is it possible?
You use valid Selectors API selectors.
$("span[id^=attr]")
If you want more than one match, use $$
$$("span[id^=attr]")
Oops, one more issue. You should use .invoke if you are getting multiple matches. You can't call setStyle directly on the returned set.
$$("span[id^=attr]").invoke("setStyle", ...)
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