//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
-
Question: The total power dissipation in an RL series circuit is due to which component? Answer: The total power dissipation is due to ...
-
Type in the length of the shorter base of the trapezoid: meters Type in the length of the longer base of the trapezoid: meters ...
-
A regular polygon has sides of equal length. Type in the length of the side of a sided regular polygon: meters Compute
-
Type in the length of the side of a myriagon: meters Compute
-
Type in the length of the side of a dodecagon: meters Compute
-
#Sample Solution --- title: "Quantiles" output: html_notebook --- ```{r} # load song data load("songs.Rda") ```...
-
The spleen
-
This is the scrolling text . Code for the scrolling effect is written below: <style type="text/css"> #scro...
-
This script will try to solve for x in a system of linear equations of the form Ax=y . x is the unknown column vector and y is th...
-
#Sample Solution --- title: "Data Cleaning in R" output: html_notebook --- ```{r message=FALSE, warning=FALSE} # load libra...
No comments:
Post a Comment