02.06.2013 Views

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

[ 153 ]<br />

Chapter 6<br />

2. Add the following script to the empty function at the bottom <strong>of</strong> the template file:<br />

$("#show").click(function() {<br />

$("#firefox").effect("transfer", {<br />

to: "#apps",<br />

className: "ui-effect-transfer"<br />

}, 1000);<br />

});<br />

3. Save the page as transfer.html. For the stylesheet add the following code to a<br />

new file:<br />

body {<br />

font:normal 14px "Nimbus Sans L", "Helvetica Neue", "Franklin<br />

Gothic Medium", Sans-serif;<br />

}<br />

#install {<br />

width:417px; height:339px; position:relative;<br />

background:url(../img/install.jpg) no-repeat 0 0;<br />

}<br />

#firefox {<br />

width:124px; height:121px; position:absolute; left:34px;<br />

top:132px; background:url(../img/firefox.png) no-repeat 0 0;<br />

}<br />

#apps {<br />

width:54px; height:52px; position:absolute; right:58px;<br />

top:172px; background:url(../img/apps.png) no-repeat 0 0;<br />

}<br />

.ui-effect-transfer { border:2px solid #7bee76; }<br />

4. Save this file as transfer.css in the css folder.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!