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.

Extended <strong>Animation</strong>s with <strong>jQuery</strong> UI<br />

}<br />

});<br />

li.appendTo("#todo ul").effect("highlight", 2000);<br />

newItem.val("");<br />

3. Save this page as highlight.html. We also need some CSS for this example. In a<br />

new file in your text editor add the following code:<br />

#todo {<br />

width:208px;<br />

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

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

}<br />

#todo ul { padding:0; margin-bottom:30px; }<br />

#todo li { list-style-type:none; }<br />

#todo label { display:block; border-bottom:1px dotted #000; }<br />

li input { position:relative; top:2px; }<br />

input { margin-right:10px; }<br />

4. Save this page as highlight.css.<br />

5. When we run the page in a browser, we can add a new item and it will be<br />

highlighted briefly as the new item is added to the list:<br />

In the previous screenshot we see the fade effect before it fades away from the newly<br />

added item.<br />

[ 144 ]

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

Saved successfully!

Ooh no, something went wrong!