HTML
<div class="animate2"></div>
<form name="form2" action="">
<label>Choose predefined color:
<select>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
</label>
<label> or enter a custom (HEX) one:
<input type="text" placeholder="#123456" id="hex"/>
</label>
<button id="paint">Paint me</button>
</form>
CSS
.animate2 {
background:#0F0;
max-width:400px;
margin:0 auto!important;
height:400px;
Как это написать в jQuery?
$('#action').animate(function(e) {
e.preventDefault();
//Animations
//$('some_element').animate(properties, [duration], [easing], [callback]);
$('.animate2').animate({
height: 400,
color: $('#hex').val()}, 'linear');
});