我有以下代码:我想打电话
预加载函数()
(function ($) {
$.fn.waterwheelCarousel = function (options) {
options = $.extend({}, $.fn.waterwheelCarousel.defaults, options || {});
return $(this).each(function () {
var data = {
itemsContainer: $(this).find(".carousel-images"),
totalItems: $(this).find(".carousel-images img").length,
containerWidth: $(this).width(),
containerHeight: $(this).height(),
currentCenterItem: null,
items: [],
itemDistances: [],
waveDistances: [],
itemWidths: [],
itemHeights: [],
itemOpacities: [],
carouselRotationsLeft: 0,
currentlyMoving: false,
itemsAnimating: 0,
currentSpeed: options.speed,
intervalTimer: null
};
// Setup the carousel
beforeLoaded();
// Preload the images. Once they are preloaded, the passed in function
// will be called and the carousel will be setup
preload(function () {
setupDistanceArrays();
setupCarousel();
setupStarterRotation();
});
我努力了 :
waterwheelCarousel().preloadfunction()
它给了我未定义的方法
我也试过:
var t = $("#waterwheelcarouseldefault").waterwheelCarousel();
t.preloadfunction();
没有运气,有人知道如何调用这个函数吗?