ElEditors, Interface administrators, Administrators
85,550
edits
mNo edit summary |
mNo edit summary |
||
Line 40: | Line 40: | ||
position: relative; | position: relative; | ||
float: left; | float: left; | ||
} | } | ||
</style> | </style> | ||
Line 47: | Line 46: | ||
$('.ss_prev').click(function(){ | $('.ss_prev').click(function(){ | ||
var loop = $(this).parent().parent().hasClass('loop'), | var loop = $(this).parent().parent().hasClass('loop'), | ||
current = $(this).parent().siblings('. | current = $(this).parent().siblings('.ss_contents:first').children('.ss_content').not(':hidden'), | ||
width = current.width(); | width = current.width(); | ||
if(!current.is(':first-child')){ | if(!current.is(':first-child')){ | ||
current.hide().prev(' | current.hide().prev('.ss_content').fadeIn(500); | ||
} | } | ||
else if(loop){ | else if(loop){ | ||
current.hide().siblings(':last-child').fadeIn(500); | current.hide().siblings('.ss_content:last-child').fadeIn(500); | ||
} | } | ||
}); | }); | ||
$('.ss_next').click(function(){ | $('.ss_next').click(function(){ | ||
var loop = $(this).parent().parent().hasClass('loop'), | var loop = $(this).parent().parent().hasClass('loop'), | ||
current = $(this).parent().siblings('. | current = $(this).parent().siblings('.ss_contents:first').children('.ss_content').not(':hidden'), | ||
width = current.width(); | width = current.width(); | ||
if(!current.is(':last-child')){ | if(!current.is(':nth-last-child(2)')){ | ||
current.hide().next(' | current.hide().next('ss_content').fadeIn(500); | ||
} | } | ||
else if(loop){ | else if(loop){ | ||
current.hide().siblings(':first-child').fadeIn(500); | current.hide().siblings('.ss_content:first-child').fadeIn(500); | ||
} | } | ||
}); | }); | ||
$('.ss_content | $('.ss_content .ss_content:first-child').siblings().hide(); | ||
}); | }); | ||
</script> | </script> |