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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:33:30+00:00 2026-06-15T23:33:30+00:00

this.anim= true; How to change this object’s variable to false after x seconds?

  • 0
this.anim= true;

How to change this object’s variable to false after x seconds?

  • 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-06-15T23:33:32+00:00Added an answer on June 15, 2026 at 11:33 pm
    this.anim = true;
    var that = this; // you store the reference to a `this` in `that` variable,
                     // so you could use it in a callback function. You have
                     // to do that because it has its own `this` defined
    setTimeout(function() {
        that.anim = false;
    }, x * 1000);
    

    or

    this.anim = true;
    
    (function(that){ // you create an IIFE (see http://tinyurl.com/js-iife)
        setTimeout(function() {
            that.anim = false;
        }, x * 1000);
    }(this)); // and invoke it with `this` as a parameter, which will be available
              // as `that` in the function body
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm studying this source base . Basically this is an Anim server client for
This should be a simple one: I have an observableArray object called To in
This works. $(document).ready(function(){ $(.items article).click(function(){ window.location=$(this).find(a).attr(href); return false; }); }); However , when the
I'm using UIImageView to run a flipbook anim like this: mIntroAnimFrame = [[UIImageView alloc]
I have the following animations in my web page: $(.anim-item).not(this).animate({ opacity: 0, }, {
This script works perfectly in all the browsers, except Google Chrome. $(document).ready(function(){ $(.banners-anim img).each(function(){
This code down never call alert 'ane is true' . It is possible to
this is my first question in here, and I would like to ask if
This question is directly related to this SO question I posed about 15 minutes
This question is kind of a follow up to this question I asked a

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.