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

133
Views
How to delete data-toggle attribute from div - wordpress

I want to delete this data-toggle attribute from wordpress, but i don't know how.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use the removeAttribute() method of HTMLElement.

First, you need to select the element. There are several ways, I prefer to use querySelector(). The query selects a a element with the class cart-contents and the attribute data-toggle.

Then, simply call the removeAttribute method.

Full Code
const $toRemoveAttrElem = window.document.querySelector("a.cart-contents[data-toggle]");
$toRemoveAttrElem.removeAttribute("data-toggle");
about 4 years ago · Santiago Trujillo 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!