css解决ios 绑定click事件不触发问题

Posted loewe0202

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css解决ios 绑定click事件不触发问题相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>test</title>
		<style type="text/css">
			.test {
				font-size: 60px;
				text-align: center;
				height: 300px;
				background: red;
				cursor: pointer;
			}
		</style>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	</head>

	<body>
		<div class="test">click me!</div>
		<script type="text/javascript">
			$(document).on("click", ".test", function() {
				alert(1);
			});
		</script>
	</body>

</html>

  

以上是关于css解决ios 绑定click事件不触发问题的主要内容,如果未能解决你的问题,请参考以下文章