0

我正在使用 Drupal 和 jQuery 说.animation is not a function。为什么我会收到此错误?

(function($){
    var cg_parent = "#block-views-content_gallery-cg_block";
    var cg_items = cg_parent + " ul";
    var cg_item = cg_items + " li";

    $(cg_item + ".views-row-first div.cg_item").addClass("active");
    $(cg_item + ".views-row-first div.cg_item").bind("mouseenter", function() {
        $("div.cg_item.active div.cg_body_content").animation({ left: '100px' }, 100, function() {
            alert("je;;p");
        });
    });
})(jQuery);

http://jsfiddle.net/seejee/sYFR9/7/

4

2 回答 2

1

该方法名为animatenot animation

$("div.cg_item.active div.cg_body_content").animate({ left:'100px' }, 100, function() {  
    alert("je;;p");
});
于 2013-02-03T13:18:56.600 回答
0

请替换animationanimate,这将完成工作:)

于 2013-02-03T13:35:24.853 回答