javascript - how to access a function in a jquery plugin? -


I am using this YouTube API jquery plugin which I found (code is located here): < P>

In order to access the plugin in my index.html, I write this code, in the plugin, write a function thiers in line 124 which I want to use called seekto I am

  $ (document) .ready (function () {$ ('# player'). YouTubeEmbed ({Video: "http://www.youtube.com/watch?v=0NcJ_63z -mA ", width: 500, // search here for search here (123, true)};   

will it be possible? Thanks :)) < / Div>

The easiest way to modify plug-ins is to. Just add the data value to originalDiv . $ (elements.originalDiv) .data ("youTubeEmbed", element); Return element Original div;

Now, you can access it with:

  $ ("# player"). Data ("youTubeEmbed") Elements.player.seekTo (123, true);    

Comments