"TEST: jQuery with Classes"
Bootstrap 3.1.0 Snippet by Geniusone

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>TEST jQuery with Classes</h2> </div> </div> <!-- Main jumbotron for a primary marketing message or call to action --> <div class="jumbotron"> <div class="container"> <h1>Hello, world!</h1> <p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p> <p><a class="btn btn-primary btn-lg">Learn more »</a></p> </div> </div> <div class="container"> <!-- Example row of columns --> <div class="row"> <div class="col-lg-4"> <h2>Heading</h2> <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> <p><a class="btn btn-default" href="#">View details »</a></p> </div> <div class="col-lg-4"> <h2>Heading</h2> <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> <p><a class="btn btn-default" href="#">View details »</a></p> </div> <div class="col-lg-4"> <h2>Heading</h2> <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p> <p><a class="btn btn-default" href="#">View details »</a></p> </div> </div> <hr> <footer> <p>© Company 2013</p> </footer> </div> <!-- /container --> <h1>Connecting the jQuery dots.</h1> <button id="btnStart">Start Animation</button> <button id="btnReset">Reset</button> <div class="my-box"></div>
.jumbotron{ opacity:0; } h1 { padding:10px; } .my-box { background:#E3AE57; height:100px; width:100px; position:absolute; }
$(document).ready(function () { // $('.jumbotron').show(); $(".jumbotron).animate({ opacity: '1.0', }); // end my-box div .animate function $(".jumbotron").show(); $(".jumbotron").fadeIn("slow"); $(".jumbotron").click(function () { $(".my-box").animate({ left: '250px', opacity: '0.5', height: '250px', width: '250px' }); // end my-box div .animate function $("h1").animate({ opacity: '0.5', height: '250px', width: '250px' }); // end h1 .animate function }); // end btnStart .click event $("#btnReset").click(function () { $(".my-box").animate({ left: '10px', opacity: '1.0', height: '100px', width: '100px' }); // end my-box div .animate function }); // end btnReset .click event }); // end document.ready main function

Related: See More


Questions / Comments: