开发者

pass arguments to jcarousel itemLoadCallback method

开发者 https://www.devze.com 2023-03-21 03:39 出处:网络
How can we pass arguments to jcarousel it开发者_StackOverflow社区emLoadCallback method? ThanksYou can\'t directly pass arguments to the itemLoadCallback as far as I can see. itemLoadCallback executes

How can we pass arguments to jcarousel it开发者_StackOverflow社区emLoadCallback method?

Thanks


You can't directly pass arguments to the itemLoadCallback as far as I can see. itemLoadCallback executes the function you give it passing in explicitly those arguments. You'd have to modify jcarousel to send additional arguments. I'd also like to understand what you're trying to achieve as maybe there is another way to achieve what you want. You could do something like the following, which should suffice from what I assume you're trying to do:

Here is how I would do it

jQuery('#mycarousel').jcarousel({
    itemLoadCallback: function (carousel, state) {
        //get Additional Information
        //doStuff with additional info
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消