1 line
1.1 KiB
JSON
1 line
1.1 KiB
JSON
{"name":"animated","type":"selector","title":":animated Selector","deprecated":null,"removed":null,"desc":"Select all elements that are in the progress of an animation at the time the selector is run.","categories":["selectors/basic-filter-selectors","selectors/jquery-selector-extensions","version/1.2"],"entries":[{"return":"","signatures":{"added":"1.2"},"examples":{"desc":"Change the color of any div that is animated.","code":"\n$( \"#run\" ).click(function() {\n $( \"div:animated\" ).toggleClass( \"colored\" );\n});\n\nfunction animateIt() {\n $( \"#mover\" ).slideToggle( \"slow\", animateIt );\n}\n\nanimateIt();\n","html":"\n<button id=\"run\">Run</button>\n\n<div></div>\n<div id=\"mover\"></div>\n<div></div>\n","css":"\n div {\n background: yellow;\n border: 1px solid #AAA;\n width: 80px;\n height: 80px;\n margin: 0 5px;\n float: left;\n }\n div.colored {\n background: green;\n }\n"},"longdesc":"\n <p><strong>Note:</strong> If you use a custom jQuery build <em>without the effects module</em>, the <code>:animated</code> selector will throw an error. </p>\n "}],"slug":"animated-selector"} |