需要从另一个页面访问一个方法。似乎应该有类似 $("#selectedClip").setValue(4,4);
(function($) {
$.fn.extend({
spinit: function(options) {
var settings = $.extend({ min: 0, max: 100, initValue: 0, callback: null, stepInc: 1, pageInc: 10, width: 50, height: 15, btnWidth: 10, mask: '' }, options);
return this.each(function() {
var UP = 38;
var DOWN = 40;
var PAGEUP = 33;
var PAGEDOWN = 34;
var mouseCaptured = false;
var mouseIn = false;
var interval;
...........
function setValue(a, b) {
if (a >= settings.min && a <= settings.max) {
value = b;
//this is for editVideo php. Probably will break code in other page
spinnerChange(value);
} el.val(value);
}
以上是我需要在这个文件之外调用的方法。帮助!!:)