jquery:safari bug? [英] jquery: a safari bug?

查看:122
本文介绍了jquery:safari bug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我为什么此网页会导致Safari出现一个奇怪的问题?如果您点击Safari上的任何框,您将收到多个提醒或无数个提醒。

Can anyone tell me why this page causes a strange problem on Safari? If you click on any of the boxs on Safari, you will get a multiple alerts or countless alerts.

这只是一个简单的jquery代码,

This is only a simple jquery code,

$(document).ready(function(){

    $('.tile-item').click(function(){
        alert('0');
    });

});

它应该只警告一个警告框每次点击像其他浏览器

It should just alert one alert box on each click like other browsers (even IE works ok too!)

如何解决这个问题?

谢谢。

编辑:

我在Windows 7 Safari 5.0.5(7533.21.1)上测试了

I tested it on Windows 7 Safari 5.0.5 (7533.21.1)

任何人在其Windows上检查过它?

Any has checked it on their Windows?

谢谢。

推荐答案

点击警告框将点击它,然后点击背景中的框。

Clicking on the alert box will click through it and click the box in the background. You can test this by placing the alert box away from your boxes.

诀窍是不要使用警告测试你的代码工作。

The trick is not to use alert for testing your code works.

如果您需要显示数据,请尝试jQuery UI中的jQuery对话框。

if you need to display data try the jQuery dialog from jQuery UI.

这篇关于jquery:safari bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆