开发者

jquery syntax error

I get a syntax error with this and I guess(?) it's because of the $??? How else should it开发者_如何学运维 be?

            case 2: // move event
                    if ( (swipeDirection === 'down')
                       $(".latest_img").fadeTo("slow", 1.0); // The white box is completely 100%
                       $(".latest_img").hover(function(){
                       $(this).fadeTo("slow", 0.1); // The white box fades away
                       },function(){
                       $(this).fadeTo("slow", 0); // The white box stays away after finger leaves image
                       });
                     } else {
                document.getElementById('swipe-frame').style.backgroundImage = "url(11.png)";


You have a extra ( and are missing a { on the if statement line ...

                case 2: // move event
                    if (swipeDirection === 'down') {
                       $(".latest_img").fadeTo("slow", 1.0); // The white box is completely 100%
                       $(".latest_img").hover(function(){
                       $(this).fadeTo("slow", 0.1); // The white box fades away
                       },function(){
                       $(this).fadeTo("slow", 0); // The white box stays away after finger leaves image
                       });
                     } else {
                document.getElementById('swipe-frame').style.backgroundImage = "url(11.png)";
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜