jquery/test/fix.html

48 lines
1.2 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator"
content="HTML Tidy, see www.w3.org" />
<title>Tester</title>
<style type="text/css">
#container { background:yellow; width:400px; height:400px; }
</style>
<script type="text/javascript" src="../dist/jquery.js">
</script>
<script type="text/javascript">
function doIt() {
$("#adiv").text("click!");
$("#adiv").trigger("acustom.atype");
}
function showMouse(e) {
$("#adiv").text("( " + e.pageX + ", " + e.pageY + " )");
}
$(function () {
$("#doit").bind('click.mine', doIt);
$("#container").mousemove(showMouse);
$("#adiv").bind("acustom.atype", function () {
//console.log("custom");
});
});
</script>
</head>
<body>
<button id="doit">Do It</button>
<div id="container">
Hi
</div>
<div id="adiv">
</div>
</body>
</html>