mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
23 lines
565 B
CoffeeScript
23 lines
565 B
CoffeeScript
|
define () ->
|
||
|
Effects =
|
||
|
highlight: (element, color, length, callback = () ->)->
|
||
|
element.animate
|
||
|
backgroundColor: color
|
||
|
, length, -> callback()
|
||
|
|
||
|
fadeElementIn: (element, callback = () -> )->
|
||
|
element.hide()
|
||
|
element.slideDown "slow"
|
||
|
element.fadeIn "slow"
|
||
|
@highlight element, "#BDDFB3", 1500, =>
|
||
|
setTimeout ( () -> element.removeAttr('style') ), 0
|
||
|
callback()
|
||
|
|
||
|
fadeElementOut: (element, callback = () -> )->
|
||
|
@highlight element, "#FF8E8A", 800, ->
|
||
|
element.slideUp "slow"
|
||
|
element.fadeOut "slow", ->
|
||
|
callback()
|
||
|
|
||
|
|