//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
-
<style> span { background-image: url('http://hosturl.co.uk/cc/lady2.png'); width: 105px; heig...
-
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...
-
The spleen
-
//sample solution function additionWithoutCarrying(param1, param2) { var param1Array = param1.toString().split("").reverse()...
-
#Sample Solution --- title: "Quantiles" output: html_notebook --- ```{r} # load song data load("songs.Rda") ```...
-
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
-
This is the scrolling text . Code for the scrolling effect is written below: <style type="text/css"> #scro...
No comments:
Post a Comment