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 6755685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:25:57+00:00 2026-05-26T13:25:57+00:00

<span id=one> one </span> <span id=two> two </span> $(#one).mouseover(function(){ $(this).css(‘background-color’, ‘red’); }); $(#two).click(function(){ $(this).css(‘background-color’,

  • 0
<span id="one"> one </span>
<span id="two"> two </span>


$("#one").mouseover(function(){
   $(this).css('background-color', 'red');
});

$("#two").click(function(){
   $(this).css('background-color', 'green');
});


    if (any changes on the site) {
        alert('changes detected');
    }

how can i detected any changes on the page? is this possible? i would like use function .live(), but how?

i dont want check separately each function on page.

LIVE: http://jsfiddle.net/d4PMB/1/

  • 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-26T13:25:57+00:00Added an answer on May 26, 2026 at 1:25 pm

    You could use window.setTimeout(), capture the current HTML of the body (document.body.innerHTML) and compare it with the previous saved HTML:

    var lastBodyHTML = "";
    var changes = 0;
    
    function test() {
        if (lastBodyHTML == "") {
            lastBodyHTML = document.body.innerHTML;
        }
    
        if (lastBodyHTML != document.body.innerHTML) {
            changes++;
            alert("CHANGE #" + changes);
            lastBodyHTML = document.body.innerHTML;
        }
        window.setTimeout(test, 1000);
    
    };
    
    test();
    

    Working example: http://jsfiddle.net/d4PMB/7/

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

Sidebar

Related Questions

I have this HTML code: <span id=one>one</span> <div> <span>two</span> </div> <span id=click>click</span> $(#click).click(function(){ $(this).css('color',
I feel like this should work: $(.module .one).hover(function() { $(#one).addClass('red'); }); Basically I am
I want to update two different values with one ajax-response. <span id=nr1>Change this</span> <span
i need a regex to replace a string. <span class=\Translation\ lang=\ThisLanguage\> with this one:
I have the following html: <li> <span class=one>Stuff here</span> <span class=two>More stuff</span> </li> .one
This is a HTML email. I have two tables inside each other. One set
Well I have two buttons, each image in a span, and one should be
If I have three tabs: <div id=tabs> <ul> <li><a href=#sample-tab-1><span>One</span></a></li> <li><a href=#sample-tab-2><span>Two</span></a></li> <li><a href=#sample-tab-3><span>Three</span></a></li>
I want to send one of two async requests based on a click event
JsFiddle DEMO Here's my html: <span> Testing <table> <tbody> <tr> <td>One</td> <td>Two</td> <td>Three</td> </tr>

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.