css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Banking App</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="bankApp.css" />
   
    
</head>
<body>
    <div id="container">
        <header>
            <h1>simBankApp</h1>
            <ul class="menu">
                <li><a href="#">Home</a></li>
                <li><a href="#">Exit</a></li>
            </ul>
        </header>
       
        <form action="">
            <div id="select-operation" >
                <h3>Select an Operation:</h3>
                <div  class=form>
                    <ol class="operation-list">
                        <li>Open A New Account</li>
                        <li>Existing Account</li>
                    </lo>
                    <br>
                    <input type="number" name="selectOperation" id="select-input" placeholder="Enter 1 or 2" required>
                    <br>
                    <br>
                    <input type="button" name="submit" value="submit" class="submit-btn btn" onclick="">
                </div>
            </div>
            <div id="new-acc">
                <h3>Registration Form - New Account</h3>
                <div class=form>
                    <input type="text" name="new-account" id="new-name" class="new-account-input" placeholder="Name" required><br>
                    <input type="date" name="new-account" id="new-dob" class="new-account-input"   required><br>
                    <input type="radio" name="gender" id="gender" value="male">Male</input>
                    <input type="radio" name="gender" id="gender" value="female">Female</input>
                    <textarea type="text" name="new-account" id="new-address" class="new-account-input" placeholder="Address" required></textarea><br>
                    <input type="email" name="" id="email" placeholder="E-mail"><br>
                    <input type="tel" name="" id="phone" placeholder="Phone"><br>
                    <input type="button" name="submit" value="submit" class="acc-submit btn">
                
                </div>
            </div>
            <div class="existing-acc">
                <h3>Existing Account Holder</h3>
                <div class="form">
                    <input type="text" name="" id="customer" placeholder="Customer Name"><br>
                    <input type="button" class="customer-back btn" value="back">
                    <input type="button" class="customer-next btn" value="next">
                </div>
            </div>

            <!--This table display Date inputed above-->
            
           

        </form>
        <div class="transaction">
            <div class="customer">Welcome</div>
            <h3>What do you want to do?</h3>
            <div class="form">
                <ol class="operation-list">
                    <li>Deposit</li>
                    <li>Withdrawal</li>
                    <li>Balance</li>
                    <li>Exit</li>
                </ol>
                <input type="number" name="" id="select-tran">
                <input type="button" class="tran-submit btn"value="submit">
            </div>
        </div>

            <div class="deposit-form">
                <h3>Deposit Form</h3>
                <div class="form">
                    <label for="">How much do you want to Deposit</label>
                        <input type="number" name="" id="deposit-input">
                        <input type="button" class="deposit-submit btn"value="save">
                </div>
            </div>
            <div class="withdraw-form">
                    <h3>Withdrawal Form</h3>
                    <div class="form">
                        <label for="">How much do you want to withdraw-form</label>
                            <input type="number" name="" id="withdraw-input">
                            <input type="button" class="withdraw-submit btn"value="save">
                    </div>
             </div>

             <div class="balance">
                    <h3>Customer Balance</h3>
                    <div  class="form">
                        <div class="bal-msg">

                        </div>
                        <input type="button" class="close btn" value="close"> 
                    </div> 
                       
             </div>
             <div class="display-box">
                 <h3>Information</h3>
                 <div class="form">
                     <div class="info-msg">
                     </div>
                     <input type="button" class="ok btn" value="ok"> 
                 </div>
             </div>
       
    </div>
    <div class="table-container">
            <h3>Account Database</h3>
        <table id="acc-data">
              
                <tr>
                <th>Name</th>
                <th>Date of Birth</th>
                <th>Gender</th>
                <th>Address</th>
                <th>E-mail</th>
                <th>Phone</th>
            </tr>
            <tr>
                <td>Sintim-Misah </td>
                <td>12-12-2018</td>
                <td>Male</td>
                <td>Box KT 650, Kotobabi</td>
                <td>sintim @ gmail.com</td>
                <td>0249688295</td>
            </tr>

        </table>
    </div>
    <div class="footer">
            <p> &COPY;2018</p>
     </div>
        

</body>
</html>
            
          
!
            
              
*{
    margin:0;
    padding:0;
}

#container{
    width: 70%;
    margin:10px auto;
}
header{
    background: rgb(136, 2, 2);
    color:#ffff;
    border-radius: 5px;
    width: 100%;
    display: inline-block;

    
}
header h1{
    float: left;
    margin-right: 125px;
    
}
.menu li {
    list-style: none;
    display: block;
    display: inline-block;
    margin: 0px ;
    padding: 15px 20px;
   
}
.menu li a{
    text-decoration: none;
    color:#ffff;
    
   
}
.menu li:hover{
    background: #000009;
    border-radius: 5px;
    transition: 1s;
    
}
h1{
    font-size: 24px;
    font-weight: normal;
    padding: 10px;
}
h3{
    font-size: 16px;
    padding: 10px 0px;
}

.form{
    width: 100%;
    margin: 0px; 
    border: 1px solid rgb(136, 2, 2);
    border-radius: 5px;
}

li{
    padding: 5px;
}

.operation-list{
    margin: 5px 10px ;
    padding: 0px 10px ;
}

#select-input{
    border: 0px solid rgba(136, 2, 2, 0.295);
    outline:none;
    color:rgb(136, 2, 2);
    font-size: 16px;
    padding: 7px;
    border-radius: 5px;
    width: 120px;
    background: #0003;
}
#select-input:focus{
    background: rgba(136, 2, 2, 0.295)
}
.btn{
    background: rgb(136, 2, 2);
    border: none;
    outline:none;
    padding: 10px  15px;
    border-radius: 5px;
    color:#ffff;
    text-transform: capitalize;
    cursor: pointer;
    width: 80px;
}
.btn:hover{
    background: #000000;
    transition: 1.2s;
}

input{
    margin: 10px;
    border: 0px solid rgb(136, 2, 2);
    border-radius: 5px;
    font-size: 16px;
    padding: 7px;
    border-radius: 5px;
    width: 250px;
    outline: none;
    background: #0003;
    
}
input:focus{
    background: rgba(136, 2, 2, 0.295)
}
.gender{
    margin:-200px;
    padding: 0px;
    display: inline-block; 
  
}
.gender:focus{
    background: rgba(136, 2, 2, 0.295)
}

textarea{
    margin: 10px;
    border: 0px solid rgba(0, 89, 255, 0.747);
    font-size: 16px;
    padding: 7px;
    border-radius: 5px;
    width: 250px;
    background:#0003;
}
textarea:focus{
    background: rgba(136, 2, 2, 0.295);

}

.table-container {
    
    width: 70%;
    margin:10px auto;  
}
.table-container table{
    border-collapse: collapse;
}
tr,th,td {
    text-align: center;
    margin: 5px 0px;
    padding: 5px;
    word-wrap: break-word;
    border: 1px  solid rgb(136, 2, 2);
    border-collapse: 0;
}

tr:nth-child(even){
    background: rgba(136, 2, 2, 0.295);
    color: #ffff;
}
#new-acc{
    display: none;
}
.table-container{
    display: none; 
}
.transaction{
    display: none;
}
.existing-acc{
    display: none;
}
.customer{
    text-align: center;
    color:  rgb(136, 2, 2);
    text-transform: capitalize;
}
.deposit-form{
    display: none;
}
.withdraw-form{
    display: none;
}
.balance{
    display:none;

}

.balance .form{
    text-align: center;
    color: rgb(136, 2, 2);
    padding: 30px 0px;
    text-transform: capitalize;
    height: 80px;
    outline: none;
    
}
.display-box{
    display: none;
    
}
.display-box .form{
    text-align: center;
    color: rgb(136, 2, 2);
    padding: 30px 0px;
    text-transform: capitalize;
    height: 80px;
    outline: none;
    
}
.footer{
    width: 70%;
    margin:10px auto;
    text-align: center;
    background: rgb(136, 2, 2);
    color:#ffff;
    padding: 10px 0px;
}

            
          
!
            
              let balance= 50.00;
// Click action on submit Btn (Select Operation)
$(".submit-btn").on("click", function(){{
let selectInput=$("#select-input").val();
   // $("#select-input").val("");
if(selectInput==1){
    $("#select-input").val("");
    $("#new-acc").fadeIn(600).show();
    $("#select-operation").fadeOut(600).hide();
}
else if(selectInput==2){
    $("#select-input").val();
    $(".existing-acc").fadeIn(600).show();
    $("#select-operation").fadeOut(600).hide();

}
else if(selectInput==""){
    $(".select-operation").fadeOut(600).hide();
    $(".display-box").fadeIn().show();
    $(".display-box .form .info-msg" ).html("You must enter a number.\n Try Again");
}
  else{
    $(".select-operation").fadeOut(600).hide();
    $(".display-box").fadeIn().show();
    $(".display-box .form .info-msg" ).html("Wrong Input.\n Try Again");
  }

}});

//Next Click action on Existing Customer page

    $(".customer-next").on("click", function(){
        let customerName=$("#customer").val();
        if(customerName == "sintim"){
            //alert("Welcome Back "+ customerName+ "You have GHC"+ balance +"in you account");    
        $(".existing-acc").fadeOut(600).hide();
        $(".transaction .customer").html("<h2 > Welcome back "+customerName+"</h2>");
        $(".transaction").fadeIn(600).show();
    }   
    else{
        $("#customer").val("");
        $(".existing-acc").fadeOut(600).hide();
    $(".display-box").fadeIn().show();
    $(".display-box .form .info-msg" ).html("Account doe not exist.\n Try Again");
        $(".existing-acc").fadeIn(600).show();
    }
});
// Back Click action on Existing Customer form
    $(".customer-back").on("click", function(){
        $("#select-input").val("");
        $(".existing-acc").fadeOut(600).hide();
        $("#select-operation").fadeIn(600).show();
    })
// Transaction
$(".tran-submit").on("click", function(){
if($("#select-tran").val()==1){
    $(".transaction").fadeOut().hide();
    $(".deposit-form").fadeIn().show();
} 
else if($("#select-tran").val()==2){
    $(".transaction").fadeOut().hide();
    $(".withdraw-form").fadeIn().show();
}
else if($("#select-tran").val()==3){
    $("#select-tran").val("");
    $(".transaction").fadeOut().hide();
    $(".balance").fadeIn().show();
    $(".balance .form .bal-msg" ).html("Your Current Balance is "
    + balance+" Ghc");
}
else if($("#select-tran").val()==4){
    $("#select-tran").val("");
    $(".transaction").fadeOut(600).hide();
    $("#select-operation").fadeIn(600).show();
}
else{
    $("#select-tran").val("");
    $(".transaction").fadeOut(600).hide();
    $(".display-box").fadeIn().show();
    $(".display-box .form .info-msg" ).html("You Entered the Wrong number.\n Try Again");
}
});

//OK btn
$(".ok").on("click", function(){
    $(".display-box").fadeOut(600).hide();
    $(".table-container").fadeOut(600).hide();
    $(".transaction").fadeIn(600).show();


});

//deposit btn action
$(".deposit-submit").on("click",function(){
    $("#select-tran").val("");

    let deposit =$("#deposit-input").val();
    let newDeposit=parseFloat(deposit);
    balance=balance+newDeposit;

    $(".deposit-form").fadeOut().show();
    $(".balance").fadeIn().show();
    $(".balance .form .bal-msg" ).html("Deposit was successfull "+"<br>"+
    "You current balance is "+ balance+" Ghc");
    
   
});

//withdrawal 
$(".withdraw-submit").on("click",function(){
    $("#select-tran").val("");
    let withdraw =$("#withdraw-input").val();
    balance=balance-withdraw;
    if(withdraw  > balance){
        $(".withdraw-form").fadeOut(600).hide();
    $(".display-box").fadeIn().show();
    $(".display-box .form .info-msg" ).html("Insufficient Funds.\n Try Again");
    }
    else{
        $("#select-tran").val("");
        $(".withdraw-form").fadeOut().show();
        $(".balance").fadeIn().show();
        $(".balance .form .bal-msg" ).html("Deposit was successfull "+"<br>"+
        "You current balance is "+ balance+"Ghc");
    }
   
});

//Balance

    
   
// New Account Registration
$(".acc-submit").on("click",function(){
   let newName =$("#new-name").val();
   let newDob=$("#new-dob").val();
   let newGender=$("#gender").val();
   let newAddress=$("#new-address").val();
   let newEmail=$("#email").val();
   let newPhone=$("#phone").val();
    balance=0.00;
   $("#new-acc").fadeOut().hide();
   $(".display-box").fadeIn().show();
   $(".display-box .form .info-msg" ).html("New Account Successfully created for "+ newName);
   $(".table-container").fadeIn(600).show();
   $("#acc-data").append("<tr>"+"<td>"+newName+"</td>"+ "<td>"+newDob+
   "<td>"+newGender+"</td>"+"<td>"+newAddress+"</td>"+"<td>"+newEmail+"</td>"+
   "<td>"+newPhone+"</td>"+"</td>"+"</tr>");
    });

    //btn close action
    $(".close").on("click", function(){
        $(".balance").fadeOut().hide();
        $(".transaction").fadeIn().show();
       
    });

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console