图像轮播没有运动图像,只是更换它们

时间:2013-08-29 21:45:05

标签: jquery

抱歉,我无法将JSfiddle拉到一起,这个项目有点大。

我无法移动我的图像,但只能用下一个替换prev。

我认为这与#full_image li和#full_ image img

有关
var handler_big = function () {

$('#full_image img').css({width: width_big,height: height_big});

btn.unbind('click');
console.log(width_big);
currentPage_big = pages_big.eq(current_big); 

if ($(this).hasClass('prevButton_big')) {
    if (current_big <= 0) current_big = pages_big.length - 1;
    else current_big = current_big - 1;
    nextPage_big = pages_big.eq(current_big);

    btn.click(nextPage_big); 
    $(".box_counter")
            .css("background-color" , "white")
            .eq(current_big).css("background-color" , "red");

    nextPage_big.css("marginLeft", -1418);
    nextPage_big.show();
    nextPage_big.animate({
        marginLeft: marg_left
    }, 0,'easeInCubic',  function () {
        currentPage_big.hide();
    });
    currentPage_big.animate({
        marginLeft: car_size
    }, 0,'easeInCubic', function () {
     //   btn.bind('click', handler);
    });
} else {

    if (current_big >= pages_big.length - 1) current_big = 0;
    else current_big = current_big + 1;
    nextPage_big = pages_big.eq(current_big); 
    nextPage_big.css("left",1418);
    nextPage_big.show();      
    console.log(nextPage_big);         
    nextPage_big.animate({
        left: -1418
    }, 1000,'easeInCubic', function () {});
    currentPage_big.animate({
        left: -1418
    }, 1000,'easeInCubic', function () {
        currentPage_big.hide();
      //  btn.bind('click', handler_big);
    });
  }
 }

   $.each(get_org_images, function (i, img) {
     if (i > 0){
       $('#full_image ul').append('<li><img src="' + img + '"/></li>');} });
       pages_big = $('#full_image li'), btn_big = $('#full_image .button');
       btn_big.click(handler_big);

0 个答案:

没有答案