/** created by sarina on 2016/08/28 **/ $(function(){ //��չ���� scroll($(".develop .scroll"), 1, 600, 'course'); $('.course .box ul').each(function(){ $('li', this).eq(0).show(); }); $('.develop .center-list ul').each(function(i){ $('li', this).click(function(){ var index = $(this).index(); $('a', this).addclass('active').parent().siblings('li').find('a').removeclass('active'); $('.course .box ul').eq(0).find('li').eq(index).show().siblings('li').hide(); }); }); //���ոſ� $(".botlist li").hover(function() { $(this).find('.upbox').fadein().find('p').animate({top: "50%", opacity: 1}, 500) }, function() { $(this).find('.upbox').fadeout().find('p').animate({top: 0, opacity: 1}, 500) }); }); //��չ�����������ݹ��� function course_scroll(index, speed ,dir){ $('.course .box').each(function() { var _this = $(this); var ulw = $(this).find('ul').width(); if( dir == 1 ){ //�� [�ȹ�������marginleft] var firstulobj = _this.find("ul:first"); firstulobj.stop(true,true).animate({marginleft: -ulw}, speed, function(){ firstulobj.insertafter( _this.find("ul:last")).css("marginleft", 0); }); }else{ //�� [���ƶ��ٹ�marginleft] var lastulobj = _this.find("ul:last"); lastulobj.insertbefore( _this.find("ul:first")).css("marginleft", -ulw); settimeout(function(){ lastulobj.stop(true,true).animate({marginleft: 0}, speed); },1); } }); }