I have elements with classes that can be like this:
class="refType indent_00"
class="refType indent_01"
class="refType indent_02"
..
class="refType indent_10"
Is there an easy way that I can remove the index_xx class from these?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If all the objects you might find the
index_xxclass name on also have therefTypeclass on them, then you can do this:If, they don’t all have the
refTypeclass, then you can do this:Or, using all jQuery, you can do this:
The first one is probably more efficient. If you can scope this to some part of the DOM rather than the entire DOM, then that may help performance.
Working example of the second one here: http://jsfiddle.net/jfriend00/PkXag/