Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Learning jQuery"
Bootstrap 3.3.0 Snippet by
IonAVBenson
3.3.0
jQuery
jquery
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
1.9K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Learning jQuery</h2> <button type="button" class="btn btn-primary">Primary</button> <br><br> <class id="#div1" style="width:80px;height:80px;display:none;background-color:red;"></class> <br> <div id="#div2" style="width:80px;height:80px;display:none;background-color:green;"></div> <br> <div id="#div3" style="width:80px;height:80px;display:none;background-color:blue;"></div> <br> <div id="#div4" style="width:80px;height:80px;display:none;background-color:orange;"></div> <br> <div id="#div5" style="width:80px;height:80px;display:none;background-color:purple;"></div> <br> <div id="#div6" style="width:80px;height:80px;display:none;background-color:black;"></div> </div> </div>
h2{ color: red}
$(document).ready(function(){ $("button").click(function(){ $("#div1").fadeIn(1000); $("#div2").fadeIn(2000); $("#div3").fadeIn(3000); $("#div4").fadeIn(4000); $("#div5").fadeIn(5000); $("#div6").fadeIn(6000); $("#div1").fadeOut(6000); $("#div2").fadeOut(5000); $("#div3").fadeOut(4000); $("#div4").fadeOut(3000); $("#div5").fadeOut(2000); $("#div6").fadeOut(1000); }); }); $(function () { var $element = $('class'); setInterval(function () { $element.fadeIn(1000).delay(2000).fadeOut(1500).delay(2000).fadeIn(1500); }, 5000); });
Related:
See More
Free Template
Paper Dashboard 2
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76