newbie question, calling jquery function from .js file

newbie question, calling jquery function from .js file

I have a jquery plugin for an image gallery, and i'm trying to tweak it to be able to change the shown image via a drop down menu.

In the .js file I have this working function:

  1. changeimage: function (){
                alert(1);
                gallery.gotoIndex(1, false, true);
                return true;
                },




My issue is, how do I call this from within my html file?

I've moved the function into my html header and called it succesfully.. but only the alert occurs... The problem seems to be that once called it doesnt know what gallery.gotoIndex(1, false, true); means and goes nowhere...

So I come back to the issue of how do I call this when it sits within the jquery plugin.js?

Also I want to be able to pass the drop down menu selection value to the function... would this work?

  1. changeimage: function (val){
                alert(val);
                gallery.gotoIndex(val, false, true);
                return true;
                },




Hope that makes sense... thanks in advance.
Jordan