Skip to content

Instantly share code, notes, and snippets.

@anhhh11
Created September 8, 2014 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhhh11/7f22b4c310a5780b1286 to your computer and use it in GitHub Desktop.
Save anhhh11/7f22b4c310a5780b1286 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-git2.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="box">Hello</div>
<script id="jsbin-javascript">
$("#box")
.on('click.my',function(){console.log("clicked")})
.on('click.my1',function(){console.log("clicked 2")});
//$("#box").off("click.my");
$("#box").trigger("click");
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-git2.js"><\/script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="box">Hello</div>
</body>
</html></script>
<script id="jsbin-source-javascript" type="text/javascript">$("#box")
.on('click.my',function(){console.log("clicked")})
.on('click.my1',function(){console.log("clicked 2")});
//$("#box").off("click.my");
$("#box").trigger("click");
</script></body>
</html>
$("#box")
.on('click.my',function(){console.log("clicked")})
.on('click.my1',function(){console.log("clicked 2")});
//$("#box").off("click.my");
$("#box").trigger("click");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment