前端这一段用:
<div class="ui black huge launch right attached button" id="back_to_index" style="width: 70px;">
<i class="icon list layout"></i>
<span class="text" id="back_to_index_word" style="display: none;">返回首页</span>
</div>
然后依次引用了jQurey
,jQurey.easing
在对应 controller 的 coffee 中写了:
$back = $("#back_to_index")
$backword = $("#back_to_index_word")
$(document).ready ->
$back.mouseenter ->
$back.animate( {'width':'175px'} , { duration:1000,easing:'jswing' })
$backword.css("display","inline")
return
$back.mouseleave ->
$back.animate( {'width':'70px'} , { duration:1000,easing:'easeInOutCirc' })
$backword.css("display","none")
return
return
然后 mouseenter 和 mouseleave 死活就是不能激活……没高明白问题出在哪里了…………