Q:

Function not recognized from jQuery

I've got a .js file that has this function in it:
function showDialog(divID) 
{
    alert("got here");

    var dialogDiv = $(divID);

    dialogDiv.dialog
    (
        {
            bgiframe: true,
            modal: true,
            autoOpen: false,
            show: 'blind'
        }
    )

    dialogDiv.dialog("open");
}

And in my page this:
<script type="text/javascript">

    $(function()
    {
        $("input.invokeDialog").click.showDialog("#testDialog");
    });

</script>

I'm trying to figure out why it doesn't recognize my showDialog function.  Is it not possible to reference it with the dot as I am doing?  Do I need a jQuery specific function or syntax for it to know that it's a jQuery function or is there no such thing?

A:

Try this:
  $(function()
    {
        $("input.invokeDialog").click(function(){
           showDialog("#testDialog");
        });
    });

