html - Css Selector - Hide repeated elements from same class -
I am having trouble hiding the search results again and again.
Here's an example:
Say I have a website where I sell cars. I allow users to search on certain features, such as brands, models, etc. ... and then I add all the cars for the result (the user can do multiple searches)
I Looking for "Brand A" and I get results:
car-id-1 car-id -2 car-id -3 car -Id-4Car-id-5
Now I do a new search for "Brand A" and "Model A", and I get repeated results Is:
car-id-1 car-id -2 car-id-3
I have my HTML:
& lt; Div class = 'car-id-1' & gt; & Lt; / Div & gt; & Lt; Div class = 'car-id-1' & gt; & Lt; / Div & gt; / * Frequently * / & lt; Div class = 'car-id-2' & gt; & Lt; / Div & gt; & Lt; Div class = 'car-id -2' & gt; & Lt; / Div & gt; / * Repeated * / & lt; Div class = 'car-id-3' & gt; & Lt; / Div & gt; & Lt; Div class = 'car-id-3' & gt; & Lt; / Div & gt; / * Frequently * / & lt; Div class = 'car-id-4' & gt; & Lt; / Div & gt; & Lt; Div class = 'car-id-5' & gt; & Lt; / Div & gt;
I need some selectors, so I can hide these repetitive cars from my results.
I tried to use: On the first type I do not know how
.kar-id-3: No (: first-of- Type)
but the ID came from the database, so this is not the solution, because I can add a new car for DB.
Is this also possible?
You need to know those sections, so you can not blindly search for a match.
I recommend you to push the value of the square, with php or whatever you are using as a server side, a
display: any
not in the class, then on display: block
or anything. Category: Fist Types
.
You can do this with JS also in any case you can not do this with CSS.
Comments
Post a Comment