I'm turning my Twitter bootstrap flashmessages in notifications for which i need to get it's type (like, success, info, error etc).
This can be done by getting a class like alert-success and substring it.
How can I get the class from my current element which start with a certain part. (in this case alert-
)
Example element:
<div class="alert alert-success" role="alert">...</div>
I need to get the class and not the element