Return to Snippet

Revision: 32543
at September 28, 2010 18:37 by Meander365

Initial Code
<!DOCTYPE html>
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../assets/js/jquery.js"></script>

<script type="text/javascript">
$(function () {

	$('.box').bind('click mouseover', function(e){

<style type="text/css">
	.box {width:50px;height:50px;display:block;background:red;margin:20px;border:1px solid #ccc;}
	<a href="#" id="animate">Animate</a>
	<div class="box"></div>
	<div class="box"></div>

Initial URL

Initial Description
One bind event, multiple events. Handy.

Initial Title
jQuery - Binding a Handler to Multiple Events

Initial Tags
javascript, event, jquery

Initial Language