Side navigation
Ticket #6853: test.html
File test.html, 1.3 KB (added by kjvarga, July 30, 2010 10:26PM UTC)
test click events
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="EN">
<title>Title</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<script type="text/javascript" charset="utf-8">
var debug = function(e) {
console.log('clicked time', new Date().getTime(), 'pageX', e.pageX,
'pageY', e.pageY, 'current target', e.currentTarget,
'related target', e.relatedTarget);
}
$('.test-click.live').live('click', debug);
</script>
<style type="text/css" media="screen">
.test-click {
width: 40px;
height: 40px;
background-color: red;
display: block;
}
</style>
</head>
<body>
<div class="test-click">
live
</div>
<br/>
<a href="#" class="test-click live">
live
</a>
<br/>
<a href="#" class="test-click onclick" onclick="javascript: return debug(this);">
onclick
</a>
</body>
</html>
Download in other formats:
Original Format
File test.html, 1.3 KB (added by kjvarga, July 30, 2010 10:26PM UTC)
test click events
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="EN">
<title>Title</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<script type="text/javascript" charset="utf-8">
var debug = function(e) {
console.log('clicked time', new Date().getTime(), 'pageX', e.pageX,
'pageY', e.pageY, 'current target', e.currentTarget,
'related target', e.relatedTarget);
}
$('.test-click.live').live('click', debug);
</script>
<style type="text/css" media="screen">
.test-click {
width: 40px;
height: 40px;
background-color: red;
display: block;
}
</style>
</head>
<body>
<div class="test-click">
live
</div>
<br/>
<a href="#" class="test-click live">
live
</a>
<br/>
<a href="#" class="test-click onclick" onclick="javascript: return debug(this);">
onclick
</a>
</body>
</html>