在你开始阅读之前..。你应该知道下面有很多问题..。我将感激任何帮助我理解麻省理工学院代码的任何部分( jQuery v0.4的jQuery插件),我觉得很难理解。
如果您喜欢的话,可以在http://plugins.jquery.com/project/jFlip找到代码
看到它在http://www.jquery.info/scripts/jFlip/demo.html上工作
< script type=“文本/javascript>
(function($){
$(function(){
$("#g1").jFlip(800,800,{background:"green",cornersTop:false}).
bind("flip.jflip",function(event,index,total){
$("#l1").html("Image "+(index+1)+" of "+total);
});
});
})(jQuery);
< /script>
另一个我觉得很难的代码平静是:
; (function($) {
var Flip = function(canvas, width, height, images, opts) {
//private vars
opts = $.extend({ background: "green", cornersTop: true, scale: "noresize" }, opts);
var obj = this,
el = canvas.prev(),
最后一个对我来说很重要的是:
.click(function(){
if(onCorner && !flipping) {
el.trigger("flip.jflip",[index,images.length]);
}
return false;
})
这是一个感谢Trufa提供这些链接的好时机:How to get the bookflip effect with JavaScript
非常感谢您的时间,Asaf
发布于 2010-10-18 07:21:50
正如Sarfraz所建议的,您需要阅读有关Jquery的手册。
我会回答你的问题,以帮助你快速:
)
https://stackoverflow.com/questions/3957177
复制相似问题