jQuery change div background-image with fadeIn/Out

前端 未结 6 847
挽巷
挽巷 2020-12-19 01:02

I\'m trying to create a fadeIn/Out effect on a site I created (edit: site url deleted)

Everything works great except when you click on one of the colors in the color

6条回答
  •  庸人自扰
    2020-12-19 01:42

    Why not use jQuery to inject the markup that you need?

    var $image_holder = $('#imageHolder'),
        $carousel_container = $('
    ').attr('id', 'carousel_container'), images = ['first.jpg', 'second.jpg', 'third.jpg']; for ( var i=0; i').attr('src', images[i]).appendTo($carousel_container); } $carousel_container.insertAfter($image_holder); $image_holder.hide();

提交回复
热议问题