一つはそうのようなjQueryプラグインを構築しているプラグインの機能を公開:jQueryのは、私たちの古い開発者の
jQuery.fn.limelight = function(options) {
/*Skipped code here*/
jQuery(".spotlight-btn.back a").click(function (e) {
if(lastSelectedCastIndex - 1 >= 0) {
removeFromSpotlight();
lastSelectedCastIndex--;
e.preventDefault();
$.address.value(lastSelectedCastIndex);
ca$t.scroll(jQuery.jcarousel.intval(lastSelectedCastIndex), true);
switchTo(lastSelectedCastIndex);
}
return false;
});
function switchTo(i)
{
ca$t.scroll(jQuery.jcarousel.intval(i), true);
$.address.title($("#title_text").text());
putInSpotlight();
}
};
私はjQueryプラグインのプログラミングを行っていませんでしたが、それは呼び出すことができるようswitchTo
機能を公開したいと思いますどこでも。どのように私はこれを行うことができるでしょうか?最終};
どのように単純です....グローバルスコープに移動するだけです。 – vsync