//sample solution to script.js $(function() { $( "#button" ).click(function() { // Add the class of 'transition' with the duration // of 1000 and a callback to callbackFunction as // parameters. $("#writing").addClass("transition",1000,callbackFunction); }); function callbackFunction() { setTimeout(function() { // Remove the 'transition' class here $("#writing").removeClass("transition"); }, 1500 ); } });
Quotes help make search much faster. Example: "Practice Makes Perfect"
Monday, November 12, 2012
Codecademy: "Transition with addClass()"
//sample solution to script.js $(function() { $( "#button" ).click(function() { // Add the class of 'transition' with the duration // of 1000 and a callback to callbackFunction as // parameters. $("#writing").addClass("transition",1000,callbackFunction); }); function callbackFunction() { setTimeout(function() { // Remove the 'transition' class here $("#writing").removeClass("transition"); }, 1500 ); } });
Labels:
Codecademy,
jQuery
Subscribe to:
Post Comments (Atom)
This is an example of scrolling text using Javascript.
Popular Posts
-
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
-
Answer: From 1 to 9 days
-
Say you had an election, and you needed to tally the votes for each candidate. All you need to do is enter the name of each candidate o...
-
$(document).ready(function(){ $("button").on("click", function(){ var message = $("<span>Call 1-555-...
-
class Dog{ int age; public Dog(){ } public static void main(String[] args) { } }
-
Question: What does a "dead circuit" in Thevenin's and Norton's theorem mean? Answer: A "dead circuit" means...
-
Script solution for finding a product problem: Answer: 30 console.log("----------------------------------"); function som...
-
//sample solution to MainController.js app.controller('MainController', ['$scope', function($scope) { $scope.title = ...
-
//Sample solution to main.js var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; ...
-
floats = [1.2, 3.45, 0.91, 7.727, 11.42, 482.911] # Write your code below this line! round_down = Proc.new {|num| num.floor } # Write ...
No comments:
Post a Comment