Help with the trigger function

Help with the trigger function

Hey Guys, I have been reading about the trigger function.  I have tried it out on my own but it doesn't seem to be working. I took the following example from the jQuery API website and added an alert function... When I refresh the page it doesn't seem to be displaying an alert.

In the jquery website is also refrecnes an a selector named foo but didn't find any element ID the references foo??

Below is my code. Thanks!!!

  1. $( "#foo" ).trigger( "click", function () { alert("Automatic Click"); }) ;

Documentation link http://api.jquery.com/trigger/