Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the js special effects of common photo albums by clicking on the left and right side of the photo album and switching between them?

Shulou Source: shulou.com Published: 2022-06-01 05:54:36 10月02日 Update

This article mainly explains the "commonly used photo album pictures around click to switch rotation js special effects how to achieve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "common photo album pictures around click to switch rotation js special effects how to achieve" it!

Click on the left and right side of commonly used photo albums to switch the js special effects of roulette.

$(document) .ready (function () {

/ / Click the small image to switch to the larger image.

$("# thumbnail li a") .click (function () {

$(".zoompic img") .hide () .attr ({"src": $(this) .attr ("href"), "title": $("> img", this) .attr ("title")})

$("# thumbnail li.current") .removeClass ("current")

$(this) .salary ("li") .addClass ("current")

Return false

});

$(".zoompic > img") .load (function () {

$(".zoompic > img:hidden") .show ()

});

/ / Scroll the small picture left and right

Var $slider = $('.slider ul')

Var $slider_child_l = $('.slider ul li') .length

Var $slider_width = $('.slider ul li') .width ()

$slider.width ($slider_child_l * $slider_width)

Var slider_count = 0

If ($slider_child_l

< 5) { $('#btn-right').css({cursor: 'auto'}); $('#btn-right').removeClass("dasabled"); } $('#btn-right').click(function() { if ($slider_child_l < 5 || slider_count >

= $slider_child_l-5) {

Return false

}

Slider_count++

$slider.animate ({left:'- ='+ $slider_width + 'px'},' fast')

Slider_pic ()

});

$('# btn-left') .click (function () {

If (slider_count = $slider_child_l-5) {

('# btn-right') .css ({cursor: 'auto'})

$('# btn-right') .addClass ("dasabled")

}

Else if (slider_count > 0 & & slider_count

/span美女配奥迪spanA4L/spanspan墙纸/spanspan01

/spanspan美女配奥迪/spanspanA4L/span墙纸span02

/spanspan美女配奥迪/spanspanA4L/span墙纸span03

/spanspan美女配奥迪/spanspanA4L/span墙纸span04

/spanspan美女配奥迪/spanspanA4L/span墙纸span05

/spanspan美女配奥迪/spanspanA4L/span墙纸span06

/spanspan美女配奥迪/spanspanA4L/span墙纸span01

Thank you for your reading, the above is the "commonly used photo album pictures around click to switch round broadcast js special effects how to achieve" content, after the study of this article, I believe you on the common photo album pictures around click to switch rotation js special effects how to achieve this problem has a deeper understanding, the specific use of the need for you to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Pictures switches photo albums wallpapers beauties Audi commonly used special effects learning content buttons more big pictures merchandise Arial that is bottom ideas situations articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Redmi OPPO Reno Huawei Shulou Technology