<button id="demo-1" class="hx-btn hx-positive"><i class="fa fa-play-circle-o"></i> Run</button>
<button id="demo-1-reset" class="hx-btn hx-contrast"><i class="fa fa-refresh"></i> Reset</button>
hx.select('#demo-1').on('click', function () {
hx.select('body')
.animate()
.style('background-color', '#000000', 500)
})
hx.select('#demo-1-reset').on('click', function () {
hx.select('body').style('background-color', undefined)
})
<button id="demo-3" class="hx-btn hx-positive"><i class="fa fa-play-circle-o"></i> Run</button>
hx.select('#demo-3').on('click', function () {
hx.select('body').morph()
.then(function () {
return hx.select('body').animate().style('background-color', '#ff0000', 500)
})
.then(function () {
return hx.select('body').animate().style('background-color', '#00ff00', 500)
})
.then(function () {
return hx.select('body').animate().style('background-color', '#0000ff', 500)
})
.then(function () {
hx.select('body').style('background-color', undefined)
})
.go()
})
<button id="demo-4" class="hx-btn hx-positive"><i class="fa fa-play-circle-o"></i> Run</button>
hx.select('#demo-4').on('click', function () {
hx.select('body').morph()
.thenStyle('background-color', '#ff0000', 500)
.thenStyle('background-color', '#00ff00', 500)
.thenStyle('background-color', '#0000ff', 500)
.then(function () {
hx.select('body').style('background-color', undefined)
})
.go()
})
cancel()
is called on this Animation cancel()
is called on this Morph.
cancel()
method will be called. hx.ease
functions