How to add sec. in .hide()

Discussion in 'JavaScript' started by Shakil, Oct 20, 2010.

  1. #1
    Dear all pro.

    I m using slider/timer bar with hide option...

    means when timer/slider finish it will automatically hide and then visible some cheat check img....

    so here i used
    $("#bar").hide();
    PHP:
    to hide slider/time bar.

    I need to add time within hide function
    -------------------------------------------
    When timer/slider bar finish it will wait another 2 or 3 sec. after that it will automatically hide and then visible some cheat check img....

    How to do that ?



    Here is the full php code that i have

    function reportAd() {
        window.open("gpt.php?v=report&id="+id+"&type="+type+"&"+url_variables+"","","width=500,height=400,status=1")
    }
    
    function next(num) {
        if(timer == fulltimer) {parent.location.href='gpt.php?v=verify&buttonClicked='+num+'&id='+id+'&type='+type+'&pretime='+pretime+'&'+url_variables+'';}
        else { alert("You must wait for the counter to reach 0"); }
    }
    
    function adTimer() {
        timer++;
        if(timer == fulltimer) {
            var show="Click " + key;
            $("#bar").hide();
            $("#buttons").fadeIn();
            $("#timer").html(show);
        }
        else {
            setTimeout(adTimer, 1000);
        }
        $("#bar").width((timer/fulltimer)*200);
    }
    
    $(document).ready(function() {
        if(id != -1) adTimer();
        else $("#timer").html("Cheat Check");
    });
    
    
    PHP:
     
    Shakil, Oct 20, 2010 IP
  2. _:codefan:_

    _:codefan:_ Active Member

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    58
    #2
    setTimeout("$('#bar').hide()", 3000);
    Code (markup):
     
    _:codefan:_, Oct 24, 2010 IP
  3. Shakil

    Shakil Greenhorn

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Thanks problem solved
     
    Shakil, Oct 25, 2010 IP