JQUERY if is animated jquery - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

if is animated jquery


 187

JQUERY


1

// this works nice, check out this ...

<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<style>
div {
background: red;
border: 1px solid #AAA;
width: 80px;
height: 80px;
margin: 0 5px;
float: left;
}
div.color {
background: yellow;
}
</style>
</head>

<body>
<button id="mybtn">check</button>
<div></div>
<div id="div_move"></div>

<script>
$( "#mybtn" ).click(function() {
$( "div:animated" ).toggleClass( "color" );
});

function animateIt() {
$( "#div_move" ).slideToggle( "slow", animateIt );
}

animateIt();
</script>

</body>
</html>


By        
The power of the user (%)
62%