> Let's say you have this:
>
> $('#myID').click(magicFunc);
>
> magicFunc looks like:
>
> function magicFunc()
> {
>    $(this).fadeOut();
>
> }
>
> Now, let's say I want to invoke magicFunc on a certain item MANUALLY,
> via code, not through a user-driven event.  e.g.: (I know this is
> wrong)
>
> $('#myID').magicFunc();
>
> I don't want to make a plug-in.  I just want to somehow make the $
> (this) reference in magicFunc() refer to whatever I pass into it.  Is
> that possible?


$('#myID').triggerHandler('click');


Reply via email to