content logo

Bootstrap Toggle Switches:

Bootstrap Toggle Switches in Table

If you have an online shop and would like to increase its beauty, this post can be helpful. This post introduces Bootstrap Toggle Switches in Table and their different design. With the help of this fantastic code, you are able to attract more customers. Additionally, this Free Switches Code allows you to change the design of your website and interest your audiences as well. To add different parts to your website, download and apply this HTML Switcher in Table code and start your business.

The preview of this Javascript Toggle Switches Code is located below, and you can see its design. As you know, it has a white background, and you have to use it for bright websites. At the top of this code, there is gray raw with different parts. All the texts of this code are black, and you can see some green, blue, and red icons that show the products' status. There are some buttons on the left side of each table that are variable, and you can change them. These Toggle Switches in Table are gray, and they turn blue after you click on them. You can download this code and change it as you desire.

#

Free Switches Code

#

HTML Switche in Table

#

Javascript Toggle Switches Code

#

Toggle Switches in Table

<!-- This script got from frontendfreecode.com -->
<div class="container mt-5">
    <div class="d-flex justify-content-center row">
        <div class="col-md-10">
            <div class="rounded">
                <div class="table-responsive table-borderless">
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </th>
                                <th>Order #</th>
                                <th>Company name</th>
                                <th>status</th>
                                <th>Total</th>
                                <th>Created</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody class="table-body">
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-13487</td>
                                <td>Gasper Antunes</td>
                                <td><span class="badge badge-success">Fullfilled</span></td>
                                <td>$2674.00</td>
                                <td>Today</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-13453</td>
                                <td>Aartsen van</td>
                                <td><span class="badge badge-info">Confirmed</span></td>
                                <td>$3454.00</td>
                                <td>Yesterday</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-13498</td>
                                <td>Trashes Habard</td>
                                <td><span class="badge badge-danger">Partially shipped</span></td>
                                <td>$6274.00</td>
                                <td>May 12,2020</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-16499</td>
                                <td>Samban Hubart</td>
                                <td><span class="badge badge-success">Fullfilled</span></td>
                                <td>$6375.00</td>
                                <td>May 11,2020</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
@import url('https://fonts.googleapis.com/css?family=Assistant');
body {
    background: #eee;
    font-family: Assistant, sans-serif
}
.cell-1 {
    border-collapse: separate;
    border-spacing: 0 4em;
    background: #fff;
    border-bottom: 5px solid transparent;
    background-clip: padding-box
}
thead {
    background: #dddcdc
}
.toggle-btn {
    width: 40px;
    height: 21px;
    background: grey;
    border-radius: 50px;
    padding: 3px;
    cursor: pointer;
    -webkit-transition: all 0.3s 0.1s ease-in-out;
    -moz-transition: all 0.3s 0.1s ease-in-out;
    -o-transition: all 0.3s 0.1s ease-in-out;
    transition: all 0.3s 0.1s ease-in-out
}
.toggle-btn>.inner-circle {
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    -webkit-transition: all 0.3s 0.1s ease-in-out;
    -moz-transition: all 0.3s 0.1s ease-in-out;
    -o-transition: all 0.3s 0.1s ease-in-out;
    transition: all 0.3s 0.1s ease-in-out
}
.toggle-btn.active {
    background: blue !important
}
.toggle-btn.active>.inner-circle {
    margin-left: 19px
}
$(document).ready(function(){
  $('.toggle-btn').click(function() {
  $(this).toggleClass('active').siblings().removeClass('active');
  });
});
<link href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css' rel='stylesheet'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet'>
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script type='text/javascript' src='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css' rel='stylesheet'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet'>
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script type='text/javascript' src='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js'></script>
<style>
@import url('https://fonts.googleapis.com/css?family=Assistant');
body {
    background: #eee;
    font-family: Assistant, sans-serif
}
.cell-1 {
    border-collapse: separate;
    border-spacing: 0 4em;
    background: #fff;
    border-bottom: 5px solid transparent;
    background-clip: padding-box
}
thead {
    background: #dddcdc
}
.toggle-btn {
    width: 40px;
    height: 21px;
    background: grey;
    border-radius: 50px;
    padding: 3px;
    cursor: pointer;
    -webkit-transition: all 0.3s 0.1s ease-in-out;
    -moz-transition: all 0.3s 0.1s ease-in-out;
    -o-transition: all 0.3s 0.1s ease-in-out;
    transition: all 0.3s 0.1s ease-in-out
}
.toggle-btn>.inner-circle {
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    -webkit-transition: all 0.3s 0.1s ease-in-out;
    -moz-transition: all 0.3s 0.1s ease-in-out;
    -o-transition: all 0.3s 0.1s ease-in-out;
    transition: all 0.3s 0.1s ease-in-out
}
.toggle-btn.active {
    background: blue !important
}
.toggle-btn.active>.inner-circle {
    margin-left: 19px
}
</style>

</head>
<body>
<div class="container mt-5">
    <div class="d-flex justify-content-center row">
        <div class="col-md-10">
            <div class="rounded">
                <div class="table-responsive table-borderless">
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </th>
                                <th>Order #</th>
                                <th>Company name</th>
                                <th>status</th>
                                <th>Total</th>
                                <th>Created</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody class="table-body">
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-13487</td>
                                <td>Gasper Antunes</td>
                                <td><span class="badge badge-success">Fullfilled</span></td>
                                <td>$2674.00</td>
                                <td>Today</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-13453</td>
                                <td>Aartsen van</td>
                                <td><span class="badge badge-info">Confirmed</span></td>
                                <td>$3454.00</td>
                                <td>Yesterday</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-13498</td>
                                <td>Trashes Habard</td>
                                <td><span class="badge badge-danger">Partially shipped</span></td>
                                <td>$6274.00</td>
                                <td>May 12,2020</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                            <tr class="cell-1">
                                <td class="text-center">
                                    <div class="toggle-btn">
                                        <div class="inner-circle"></div>
                                    </div>
                                </td>
                                <td>#SO-16499</td>
                                <td>Samban Hubart</td>
                                <td><span class="badge badge-success">Fullfilled</span></td>
                                <td>$6375.00</td>
                                <td>May 11,2020</td>
                                <td><i class="fa fa-ellipsis-h text-black-50"></i></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
$(document).ready(function(){
  $('.toggle-btn').click(function() {
  $(this).toggleClass('active').siblings().removeClass('active');
  });
});
</script>

</body>
</html>
Preview