如何从插件外部为以下插件“defaults”对象的“extraParams”属性赋值?
(function ($) {
jQuery.fn.jScroller = function (store, parameters) {
var defaults = {
//numberOfRowsToRetrieve: 10,
onSuccessCallback: function (row, container) { },
onErrorCallback: function (thrownError) { window.alert('An error occurred while trying to retrive data from store'); },
onTimeOutCallback: function () { },
timeOut: 3 * 1000,
autoIncreaseTimeOut: 1000,
retryOnTimeOut: false,
loadingButtonText: 'Loading...',
loadMoreButtonText: 'Load more',
fullListText: 'There is no more items to show',
routValues: null
我试过这个,但导致错误:
$.jScroller.defaults.extraParams = val;