$(function(){ $('.user-orderBox').on('click','.delete',function(){ var del = $(this).parents('.orderProduct'), n = $(this).parents('.orderProduct').attr('class').substring(22,24), bg = '

'+String.fromCharCode(parseInt(n)+65)+'組

商品尚未選購

', classStr = 'pic-bg num_'+n; del.find('.title').remove(); del.find('img').animate({opacity:0},300,function(){ del.html(bg).removeAttr('class style').addClass(classStr) }); }); var owl = $('.combosBox .content'); owl.owlCarousel({ responsive:{ 0:{ items : 2 }, 660:{ items : 3 }, 960:{ items : 4 }, 1023:{ items : 5 } }, nav:true, }); });