Problem accessing jwPlayer() within a function
I have successfully set up a jwplayer instance, and it is the only one on the page. I can access its properties from an <a onclick> event (for example, <a onclick='jwPlayer().getPosition()'>Report position</a>), but once I call jwPlayer().getPosition() from inside a script or function, I get an 'Uncaught ReferenceError: jwPlayer is not defined'. I am by no means an expert in JS or JQuery, but how could this be a scope issue? I see examples of this working fine on the support pages. I also tried targeting the specific element id: jwPlayer('videoPlayer').getPosition(). I am scratching my head on this one.
Any help is appreciated. Thanks!