Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7921 closed enhancement (invalid)

.click() does not trigger event bound with .toggle()

Reported by: jmagner@… Owned by:
Priority: undecided Milestone: 1.next
Component: event Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by jitter)

If an event handler is bound using .toggle(),

$('#elem').toggle(function(e){
  console.log('toggle state 1');
}, function(e){
  console.log('toggle state 2');
}, function(e){
  console.log('toggle state 3');
});

There should be a way to invoke an event on this.

$('#elem').click(); does not work

This would be particularly useful in cases where you'd want to 'hide' something when another, outside event occurred.

Change History (4)

comment:1 Changed 12 years ago by Rick Waldron

Resolution: invalid
Status: newclosed

toggle() is not intended to respond to the 'click' event, unless you trigger the click event on the specified element.

Last edited 12 years ago by Rick Waldron (previous) (diff)

comment:4 Changed 12 years ago by jitter

Component: unfiledevent
Description: modified (diff)
Note: See TracTickets for help on using tickets.