Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report