我正在使用quicklfip (http://jonraasch.com/blog/quickflip-2-jquery-plugin)来制作汉字闪存卡。前面板将有字符,后面板将有定义。我遇到的问题是,我想要显示示例句子,但仅当背板可见时。似乎没有任何回调函数。有没有JQuery专家对如何做到这一点有什么想法?
发布于 2012-06-17 12:04:46
苦思冥想之后,我终于想出了答案。这比我想象的要简单。我所需要做的就是创建两个函数,如下所示:
function showExamples() {
$('#examples').show();
}
function hideExamples() {
$('#examples').hide();
}然后在卡片的每一面都放置一个<a>标签,它不仅可以翻转卡片,还可以调用上面的函数!如下所示:
<a class="quickFlipCta" href="#" onclick="javascript:showExamples()">Click to flip</a>和
<a class="quickFlipCta" href="#" onclick="javascript:hideExamples()">Click to flip</a>任务完成了!
发布于 2012-06-16 23:36:08
每个页面都有一个更新的带有回调的插件。您可以使用onBefore和/或仅通过内容来完成此操作:
$("#flipbox").flip({
direction:'tb',
onBefore: function(){
console.log('before starting the animation');
},
onAnimation: function(){
console.log('in the middle of the animation');
},
onEnd: function(){
console.log('when the animation has already ended');
}
})https://stackoverflow.com/questions/11064650
复制相似问题