Home  >  jQuery

Example of :animated in jQuery

February 21, 2013
:animated in jQuery do a very interesting task. Letís suppose if we have some elements which are animated by slideToggle. Then :animated can select those animated ids. And do some task for those elements like we can change the CSS properties for those elements. :animated can be used as
Here :animated has been applied on div. on all animated div block can be provided toggleClass i.e different CSS properties. Find the example.
<!DOCTYPE html>
div {background:green; border:1px width:70px; height:60px; }
div.conmove { background:red; }
<script src="http://code.jquery.com/jquery-latest.js"></script>
<button id="click">Click To Test</button>
<div id="mid"></div>
function conAimate() {
$("#mid").slideToggle("medium", conAimate);

©2022 concretepage.com | Privacy Policy | Contact Us