Skip to content

Instantly share code, notes, and snippets.

@assertchris
Created August 16, 2012 13:50
Show Gist options
  • Select an option

  • Save assertchris/3370239 to your computer and use it in GitHub Desktop.

Select an option

Save assertchris/3370239 to your computer and use it in GitHub Desktop.
Moofx3 Mootools Adapter (Moo/CS)
do ->
animate = (property, value, options) ->
moo = moofx(this)
moo and moo.animate(property, value, options)
return this
design = (property, value) ->
moo = moofx(this)
moo and moo.style(property, value)
return this
compute = (property) ->
moo = moofx(this)
return moo and moo.compute(property)
computeNext = (next, property) ->
hasClass = @hasClass(next)
@addClass(next)
value = @compute(property)
unless hasClass then @removeClass(next)
return value
Element.implement({
"design": design
"animate": animate
"compute": compute
"computeNext": computeNext
})
Elements.implement({
"design": design
"animate": animate
})
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment