Calling a jquery function from inline html

Calling a jquery function from inline html

Hi guys

Really new to JQuery, but I know PHP pretty well, so hopefully that will help me.

My problem is this ...

I need to call a jquery function from an inline event handler, like so ...

<a id="contact<?=$business['bus_id']?>" onclick="toggleContacts('<?=$business['bus_id']?>', '<?=$business['bus_count']?>');"

Now, the function is declared within the usual document ready function, what is the proper way to do this?

The reason I need to do it this way, is because the function needs access to the two vars that I am passing as function properties.

Thanks