有没有办法获得对调用的元素的引用slides()
?
示例代码:
$('#my_slideshow').slides({
animationStart: function() {
<reference_to_myslideshow>.something();
}
});
使用$(this)
返回创建的幻灯片对象,它是这样的:
[
Object
animationComplete: function (current) {
animationStart: function () {
autoHeight: false
autoHeightSpeed: 350
bigTarget: false
container: "slides_container"
crossfade: "true"
currentClass: "current"
effect: "fade"
fadeEasing: ""
fadeSpeed: 350
generateNextPrev: false
generatePagination: true
hoverPause: false
next: "next"
pagination: true
paginationClass: "pagination"
pause: 0
play: 7200
preload: false
preloadImage: "/img/loading.gif"
prependPagination: false
prev: "prev"
randomize: false
slideEasing: ""
slideSpeed: 350
slidesLoaded: function (){}
start: 1
__proto__: Object
]
而不是实际的$('#my_slideshow')
对象,我似乎无法获得参考。