Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5842679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:02:56+00:00 2026-05-22T12:02:56+00:00

<div class=current></div> <a href=#>text</a> How do I detect when e.g. a .live class is

  • 0
<div class="current"></div>
<a href="#">text</a>

How do I detect when e.g. a .live class is added to this <div> and do something when it happened?

For example, if class is changed, then hide the link.

I have a minified script that makes changes on the <div>‘s class. It’s too big for me to find the place where it happens, so I’m searching for some way to catch the class change.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:02:58+00:00Added an answer on May 22, 2026 at 12:02 pm

    There are DOM events, but they are far from perfect and not available in most browsers. In other words: Not possible (reliably). There are hacks like intervals and checking it in each iteration, but if you need to do something like this, your design is probably screwed. Keep in mind that such things will be slow and that there will always be a delay. The smaller the delay, the slower the application. Do not do that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this: <div class=selection> <a class=current href=#>1</a> <div class=class>text</div> <a href=#>2</a> <div class=class>text</div>
Let's say I do something stupid like this: <div class=my_class>fun wee!!</div> <span class=my_class><b class=my_class>Title</b></span>
I have the following HTML: <div class=menu> <a class=main-nav-item href=home>home</a> <a class=main-nav-item-current href=business>business</a> <a
Say i have this markup: <div class='current'> </div> <div class='current'> </div> <div class='current'> </div>
I have a div having a css class MyClass. Inside this div, I can
HTML: <div id=media-photo> <img src=/uploads/photos/16.jpg alt= /> </div> <a href=/uploads/photos/5.jpg class=img> <img src=/uploads/photos-thumbs/5.jpg alt=
So far this is what I have to work with: <div class=toplist> <div class=toplist_left></div>
I have a div with class divItemclass for this class, I have put height
How can I find the next <div> with the same class as the current
Here's HTML <div id=taxonomylist> <div class=item-list><ul><li class=first><a href=/?q=category/activity/energy class=views-processed>Energy</a></li> <li><a href=/?q=category/activity/energy/3-5 class=views-processed>3-5</a></li> <li><a href=/?q=category/activity/energy/6-8

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.