Jump to content

Pop up an Image as alert using typescript


benjoe
 Share

Recommended Posts

I have an html page with an image src and I want to pop up the image  as an alert on page first load in mvc layout . I am struggling to get the popup working.  Below is my html code

<!DOCTYPE html>  
<html>  
<head>  
    <title>CUI Page</title>  
    <meta charset="utf-8" />  
    <script src="/Scripts/jquery-1.10.2.min.js"></script>  
    <link href="/Content/bootstrap.min.css" rel="stylesheet" />  
    <script src="/Scripts/bootstrap.min.js"></script>  
</head>  
<body>  
   
    <div class="container">  
        <div class="col-md-12" id="hide">  
            <img src="/Content/Images/warning.png" style="margin-left: auto; margin-right: auto; display: block;" alt="" />  
  
            <button autofocus id="myButton" type="button" style="margin-left: auto; margin-right: auto; display: block;">OK</button>  
        </div>  
    </div>  
       
</body>  
</html>  
<script>  
    $("#myButton").on('click', function () {   
        $("#hide").hide();  
</script>  

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...