I've got a question:
In simple js applying of stopPropagation looks like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<script type="text/_javascript_">
function stopBubble(e) {
var e = e || window.event;
e.cancelBubble = true; // stops IE
if (e.stopPropagation) { // stops others
e.stopPropagation();
}
}
function showTest() {
alert("Test");
}
</script>
</head>
<body>
<div id="wrapper" > awd1
<div id="square" > <div id="glass">awd3</div>
</div>
</BODY>
</HTML>
Is there anyway to apply stopPropagation in more beautiful way to #square in jQuery than that
$('#wrapper').click(function(){alert( this.id);}); // shows wrapper id
$('#square').click(function(e){e.stopPropagation();});
???
--
____________________________
С уважением, Марат Мамяшев
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/