Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

close popup after 5 seconds in jquery

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css"
    rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(function () {
        $("#btnShow").click(function () {
            $("#dialog").dialog({
                modal: true,
                title: "jQuery Dialog",
               width: 300,
                height: 150,
                open: function (event, ui) {
                    setTimeout(function () {
                        $("#dialog").dialog("close");
                    }, 5000);
                }
            });
        });
    });
</script>
<input type="button" id="btnShow" value="Show Popup" />
<div id="dialog" style="display: none">
    This dialog will automatically close in 5 seconds.
</div>
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript count number of lines of a text 
Javascript :: Initialize View With Collection Backbone 
Javascript :: Solution-4--solution options for reverse bits algorithm js 
Javascript :: get number of new document firebasse 
Javascript :: java scrypt 
Javascript :: 2d array js 
Javascript :: var date = new Date(); 
Javascript :: password generator and password strength using javascript 
Javascript :: parse json 
Javascript :: compare two date objects 
Javascript :: js 
Javascript :: hello world js 
Javascript :: javascript find vs filter 
Javascript :: loop js 
Javascript :: switch statement javascript 
Javascript :: if anagram 
Javascript :: noise expression after effects 
Javascript :: run function periodically with setInterval 
Javascript :: javascript DOM SELECT 
Javascript :: javascript Implicit Boolean Conversion to Number 
Javascript :: JavaScript Number Objects 
Javascript :: javascript for...of with Maps 
Javascript :: javaScript has() Method 
Javascript :: salesforce set hours javascript 
Javascript :: timertask jquery 
Javascript :: flip image on x axis phaser 
Javascript :: phaser wrap in rectangle 
Javascript :: iterate cy.get(') elements 
Javascript :: js undici 
Javascript :: debounce getx 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =