Play and Pause Bootstrap 3 Button
How do I make an play and pause bootstrap 3 button?
Play and Pause Bootstrap 3 Button using Bootstrap & Font Awesome. What is a play and pause bootstrap 3 button? How do you make a play and pause bootstrap 3 button? This script and codes were developed by Dzulfikar Adi Putra on 06 September 2022, Tuesday.
Play and Pause Bootstrap 3 Button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Play and Pause Bootstrap 3 Button</title> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h3 class="text-center">Play and Pause Bootstrap 3 Button</h3> <p class="text-center"><small>using Bootstrap & Font Awesome </small></p> <hr/> <div class="player text-center"> <button type="button" id="button_fbw" class="btn" onclick='buttonRewindPress()'> <i class="fa fa-fast-backward"></i> </button> <button type="button" id="button_bw" class="btn" onclick='buttonBackPress()'> <i class="fa fa-backward"></i> </button> <button type="button" id="button_play" class="btn" onclick='buttonPlayPress()'> <i class="fa fa-play"></i> </button> <button type="button" id="button_stop" class="btn" onclick='buttonStopPress()'> <i class="fa fa-stop"></i> </button> <button type="button" id="button_fw" class="btn" onclick='buttonForwardPress()'> <i class="fa fa-forward"></i> </button> <button type="button" id="button_ffw" class="btn" onclick='buttonFastforwardPress()'> <i class="fa fa-fast-forward"></i> </button> </div> <p class="text-center"><small>inspired from <a href="http://jsfiddle.net/Zxfn8/" target="_blank">here</a></small></p>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Play and Pause Bootstrap 3 Button - Script Codes CSS Codes
.player{ margin: 50px 0;
}
Play and Pause Bootstrap 3 Button - Script Codes JS Codes
var state = 'stop';
function buttonBackPress() { console.log("button back invoked.");
}
function buttonForwardPress() { console.log("button forward invoked.");
}
function buttonRewindPress() { console.log("button rewind invoked.");
}
function buttonFastforwardPress() { console.log("button fast forward invoked.");
}
function buttonPlayPress() { if(state=='stop'){ state='play'; var button = d3.select("#button_play").classed('btn-success', true); button.select("i").attr('class', "fa fa-pause"); } else if(state=='play' || state=='resume'){ state = 'pause'; d3.select("#button_play i").attr('class', "fa fa-play"); } else if(state=='pause'){ state = 'resume'; d3.select("#button_play i").attr('class', "fa fa-pause"); } console.log("button play pressed, play was "+state);
}
function buttonStopPress(){ state = 'stop'; var button = d3.select("#button_play").classed('btn-success', false); button.select("i").attr('class', "fa fa-play"); console.log("button stop invoked.");
}
Developer | Dzulfikar Adi Putra |
Username | superpikar |
Uploaded | September 06, 2022 |
Rating | 3 |
Size | 2,255 Kb |
Views | 141,680 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Ionic tabs in the middle of the screen | 3,727 Kb |
Image Map | 4,096 Kb |
Ionic - Wordpress REST API starter | 2,961 Kb |
D3JS Simple JSON SVG barchart vertical | 2,234 Kb |
Expand and collapse element using jquery expander | 1,854 Kb |
Force Layout Directed Graph using dot engine dagre-d3js library, data from JSON | 6,536 Kb |
Multiple Expand Collapse | 2,733 Kb |
Bulma breadcrumbs | 1,895 Kb |
Centering Image and Icon in Semantic-UI card | 2,546 Kb |
SVG Animation Follow Path - d3js | 3,068 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by John Malc | F789gh | 1,420 Kb |
FontAwesome icons with animation | Nicotinell | 2,083 Kb |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
Cool Page Split Effect | Anthonyadamski | 6,128 Kb |
Filtering with shuffle.js | Deyand | 2,712 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
Subtle site navigation with description | Necks | 3,206 Kb |
Portfolio Page | KaylaMT | 1,983 Kb |
Simple Buttons | Haydenmills | 1,750 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!