$(".status").attr("rel");
.status can have up to three other additional classes added to it. .online, .away, .offline
if I do this:
$(".status.online").attr("rel");
it works when status has online as a second class, but not when it's been changed, how can I do this and it not matter what other classes it has?
If the element has multiple classes you can still select it just by using any of those class. So your selector is correct you don't have to change anything.
$(".status").attr("rel");
If you think that the class can change and it can have any or these classes(online, offline, away
) along with status try this.
$(".status.online, status.offline, .status.away").attr("rel");
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