I'm using the Galleria jquery plugin. What i would like to be able to do is apply cufon to the caption text / galleria-info-title text but i can't see how. I presume i need to add it as a callback somewhere in the galleria call but i can't see where for the life o开发者_运维百科f me!
If anyone can help i would be eternally grateful!
Thank you for reading!
you can get the nav Dom like this and do what you want:
Galleria.ready(function(options) {
this.$('image-nav-right').click(function(){
//code
})
this.$('image-nav-left').click(function(){
//code
})
}
In the API reference there is a method called bind
that allows you to execute a function when an event is triggered. Something akin to this:
this.bind(Galleria.IMAGE, function() { Cufon.refresh(); });
That should get you started.
update
I've never actually used Galleria. But, what happens when you do this:
this.bind(Galleria.IMAGE, function(e) {
fixCaption(e.imageTarget);
Cufon.refresh();
});
精彩评论