0
A
回答
6
$(document).ready(function() {
$("#wrapper").bind('mousemove', function(e) {
$("#tail").css({
top: e.pageY
});
});
});
補充:要回到起始位置:
$(document).ready(function() {
$("#wrapper").hover(function() {
$.data(this, "tail_Y", $("#tail").css("top"));
}, function() {
$("#tail").css("top", $.data(this, "tail_Y"));
}).bind('mousemove', function(e) {
$("#tail").css({
top: e.pageY
});
});
});
0
這可能幫助
$(document).bind('mousemove', function(e){
$('#tail').css({
top: e.pageY
});
$('#wrapper').click(function(){
xyz();
});
});
function xyz()
{
alert('hello');
}
0
試試這個:
$("#wrapper").mouseover(function() {
// your function here
alert("mouse over red area");
});
0
你必須確保你在DOM準備好運行這段代碼:
$("#wrapper").bind('mouseenter', function(e) {
alert("Entered Wrapper")
});
相關問題
- 1. 懸停功能
- 2. Highcharts「區域」不能正確懸停
- 3. 增加懸停區域
- 4. slick2d鼠標懸停區域?
- 5. 展開懸停區域?
- 6. 帆布塊區域懸停
- 7. 增加懸停區域
- 8. QLabel「懸停」區域太小
- 9. CSS懸停功能
- 10. Jquery:懸停功能
- 11. jQuery懸停功能
- 12. jquery懸停功能
- 13. jQuery懸停功能
- 14. jquery懸停功能
- 15. 暫停懸停功能
- 16. 暫停懸停功能
- 17. 懸停/鼠標懸停功能衝突
- 18. 當懸停功能工作時懸停
- 19. 懸停火狐
- 20. 在jQuery的懸停功能
- 21. PHP中的懸停功能?
- 22. 的div和懸停功能
- 23. jQuery的擴大懸停區域
- 24. IE7中的圓形懸停區域
- 25. 網頁上的熱點/懸停區域
- 26. @ font-face錯誤的懸停區域?
- 27. iPhone上的灰色區域懸停
- 28. 點擊功能和懸停功能
- 29. JQuery Animate - 如何儘快停止懸停功能(不完成懸停功能)
- 30. 超時jQuery懸停功能
好極了,有沒有辦法爲尾部彈回原來的位置?你會在鼠標移出時刪除CSS功能嗎? – uriah
@uriah:是[this](http://jsfiddle.net/dzejkej/VWEEB/3/)你想要什麼? – kubetz
@dzejkej是的!非常感謝你 – uriah