Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
plusgut60137yDo you have gists for both available? Then I might be able to tell you what happened. Until then it's to less information to say anything.
-
@plusgut
It's not on github if that's what you're talking about. This happens all the time. At this point, I'm convinced classes simply hate me. -
@Michelle Are you sure your code works on all elements with same class and not just one? (Hence why it might work if you do it by id instead.) Did you try step through debugging?
-
@lucifyer
It's a bit obvious, considering the fact I said I changed the class to an id. I'm not sure why everyone is trying to help. I wasn't asking a question lol. -
Voxera113887yI assume your referring to css
The main difference between a class and an id is that an id has to be unique.
And you use different ways to get the element/elements they represent.
When using a class you could get multiple matches but with an id you will only get one.
Could any of that be a clue? -
@Voxera
I know the difference between a class and id. I've been doing this for 3-4 years, it's nothing new to me. -
@everyone
I'm not asking a question haha. Stahp trying to help. However, I appreciate your efforts. -
plusgut60137y@Michelle how about posting the code which was not working? Then we can exactly tell you what went wrong.
-
-
I'm probably wrong, but this sounds like a CSS specificity issue.
You can use this to test it: specificity.keegan.st
Part of my code wasn't working until I changed my class into an id... How was using a class incorrect??
rant