Skip to main content

Bug Tracker

Side navigation

#7483 closed bug (invalid)

Opened November 12, 2010 09:51AM UTC

Closed November 12, 2010 02:26PM UTC

triggle() in $(document).ready() can't work

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "">

<html xmlns="">


<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<script type="text/javascript" src="jquery-1.4.4.min.js"></script>

<script type="text/javascript">











<input type="button" id="ok" value="ok" />



in the code , this line $("#ok").trigger("click"); never execute.

Attachments (0)
Change History (2)

Changed November 12, 2010 11:05AM UTC by jitter comment:1

This can't work. You call trigger() before you have bound the click handler. You need to revert the order if you want this to work.

See this test case

Changed November 12, 2010 02:26PM UTC by ajpiano comment:2

resolution: → invalid
status: newclosed

Closing as invalid.