Sidebar.coffee 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. class Sidebar
  2. constructor: ->
  3. @initFixbutton()
  4. initFixbutton: ->
  5. $(".fixbutton-bg").on "mouseover", ->
  6. $(@).stop().animate({"scale": 0.7}, 800, "easeOutElastic")
  7. $(".fixbutton-burger").stop().animate({"opacity": 1.5, "left": 0}, 800, "easeOutElastic")
  8. $(".fixbutton-text").stop().animate({"opacity": 0, "left": 20}, 300, "easeOutCubic")
  9. $(".fixbutton-bg").on "mouseout", ->
  10. $(@).stop().animate({"scale": 0.6}, 300, "easeOutCubic")
  11. $(".fixbutton-burger").stop().animate({"opacity": 0, "left": -20}, 300, "easeOutCubic")
  12. $(".fixbutton-text").stop().animate({"opacity": 1, "left": 0}, 300, "easeOutBack")
  13. ###$(".fixbutton-bg").on "click", ->
  14. return false
  15. ###
  16. $(".fixbutton-bg").on "mousedown", ->
  17. $(".fixbutton-burger").stop().animate({"scale": 0.7, "left": 0}, 300, "easeOutCubic")
  18. #$("#inner-iframe").toggleClass("back")
  19. #$(".wrapper-iframe").stop().animate({"scale": 0.9}, 600, "easeOutCubic")
  20. #$("body").addClass("back")
  21. $(".fixbutton-bg").on "mouseup", ->
  22. $(".fixbutton-burger").stop().animate({"scale": 1, "left": 0}, 600, "easeOutElastic")
  23. window.Sidebar = Sidebar