Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
it is possible to add <data-*> values like classes?

Is there way to write data attributes in class-like form? I mean like this:

<div data-el="asset assets.asset">Some div</div>

And I want to use it like classes in selector, I need to find this element as "[data-el='asset']" and also as "[data-el='assets.asset']".

Maybe there is similar way to do so. Thanks for advices!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Take a look at the attribute selectors available:

https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors

What you want to use is this:

[data-el~="assets.asset"]

That will find "assets.asset" as a single word with whitespace delimiting. I use this sort of selection sometimes and it works well.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!