While returning false will stop the event from propagating, it will also
prevent the default action from occurring, which isn't necessarily
desirable. In this case it might not matter, but in general,
event.stopPropagation() is the right way to stop the event from
propagating. Returning false does
Understood.
I read the issue to be that when he clicked the link the row was
highlighting. Whereas he wants to do something specific when the on the
link click, but highlight the row when the row is clicked. In which
case both click events need to be independant (i.e. end). The
You could use the hover() method, instead of the separate mouseover()
and mouseout() methods. And you could also use the .toggleClass method
instead of the addClass() and removeClass() methods.
Larry
On Dec 21, 4:55 pm, rolfsf [EMAIL PROTECTED] wrote:
I've set up a simple action when a user
Thanks to both of you... when I get back at this later in the week I'm going
to play with the various ideas and read up. I don't understand event
bubbling, but have heard the term enough times that I should dig in a bit.
The good (and bad) side of jquery is that I haven't had to really learn
that looks promising! Thanks Erik
Erik Beeson wrote:
Maybe try:
// hide a row after acknowledgement
$(#myTable a.ackn).click( function(e){
e.stopPropagation();
$(this).parents('tr').hide();
});
See also:
Maybe try:
// hide a row after acknowledgement
$(#myTable a.ackn).click( function(e){
e.stopPropagation();
$(this).parents('tr').hide();
});
See also:
http://docs.jquery.com/Events_(Guide)#event.stopPropagation.28__.29
--Erik
On 12/21/07,
You probably need to return false from your click handlers
// highlight rows, load details
$(#myTable tr).mouseover(function() {
$(this).addClass(over);}).mouseout(function() {
$(this).removeClass(over);
}).click(function(){
7 matches
Mail list logo