Re: [jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread Richard D. Worth
I'm glad it helped! - Richard On Wed, Dec 9, 2009 at 10:05 AM, T.J. wrote: > You know what, I just think I fixed my own problem. The function call > is executed before I bind the click event to the button, which means > that it has no event to trigger yet. Two days I've spent wondering > about

Re: [jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread Richard D. Worth
You're calling the function before binding the click handler. Change checkState("#nbl=3"); $("#test").click(function(){ alert("You clicked #test!"); }); to $("#test").click(function(){ alert("You clicked #test!"); }); checkState("#nbl=3"); - Richard On Wed, Dec 9, 2009 at

[jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread T.J.
You know what, I just think I fixed my own problem. The function call is executed before I bind the click event to the button, which means that it has no event to trigger yet. Two days I've spent wondering about this, and only saw it because of far, far fewer lines of code on that example page. Th

[jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread T.J.
Thanks for the link; I haven't heard of that site before. http://jsbin.com/axuwi3 is my (very basic) example of what I'm trying to attempt. What the button on my page actually does is quite different, and if you need that then let me know. On Dec 9, 8:29 am, "Richard D. Worth" wrote: > Could you

Re: [jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread Richard D. Worth
Could you share a live sample page? If you don't have a place to host one, jsbin.com: http://jsbin.com/ That will allows us to see what you're seeing quite easily. - Richard On Wed, Dec 9, 2009 at 9:23 AM, T.J. wrote: > For further clarification, the way I'm calling that is as follows: > > fo

[jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread T.J.
For further clarification, the way I'm calling that is as follows: for (var x = 1; x <= count; x++) { $("#button").triggerHandler("click"); } which is inside of a function that I call on page load, and it isn't working at all. Thanks, T.J. On Dec 8, 1:32 pm, "T.J." wrote: > Hi all, > > I