Download the slideshow effect package based on Jquery_jquery
Parts to be improved
1. Large images can be automatically scaled according to the browser resolution. Currently, they are displayed according to a fixed width and height, and the excess part is hidden.
2. All large pictures are now loaded directly. If there are many pictures, the experience is not good. It can be changed to asynchronous loading or lazy loading. This can be achieved with the jquery control lazyload.
3. The thumbnail is generated directly based on the parameters set when uploading. If it is a vertical image, it will be compressed. You can change it to show only part of it and hide the rest.
4. The jcarousellite plug-in is used to slide the thumbnail list. If the slides are extracted as plug-ins, they need to be integrated into one.
5. At present, the large image area and the thumbnail area are relatively independent. The advantage is that it is relatively intuitive and you can change the display position at will. The disadvantage is that the amount of HTML code is large, unlike some plug-ins, which only require $("# ID") and that's it.
JS code
< ;script type="text/javascript">
var currentImage;
var currentIndex = -1;
//Display the large image (the parameter index starts counting from 0)
function showImage(index) {
//Update the current picture page number
$(".CounterCurrent").html(index 1);
//Hide or show left and right mouse gestures
var len = $(' #OriginalPic img').length;
if (index == len - 1) {
$("#aNext").hide();
}
else {
$( "#aNext").show();
}
if (index == 0) {
$("#aPrev").hide();
}
else {
$("#aPrev").show();
}
//Show large image
if (index < $('#OriginalPic img').length) {
var indexImage = $('#OriginalPic p')[index];
//Hide the current image
if (currentImage) {
if (currentImage != indexImage) {
$(currentImage). css('z-index', 2);
$(currentImage).fadeOut(0, function () {
$(this).css({ 'display': 'none', 'z-index ': 1 })
});
}
}
//Display the image selected by the user
$(indexImage).show().css({ 'opacity': 0.4 } );
$(indexImage).animate({ opacity: 1 }, { duration: 200 });
//Update variables
currentImage = indexImage;
currentIndex = index;
/ /Remove and add highlight
$('#ThumbPic img').removeClass('active');
$($('#ThumbPic img')[index]).addClass('active') ;
//Set the height of the left and right mouse gesture area
//var tempHeight = $($('#OriginalPic img')[index]).height();
//$( '#aPrev').height(tempHeight);
//$('#aNext').height(tempHeight);
}
}
//Next
function ShowNext () {
var len = $('#OriginalPic img').length;
var next = currentIndex < (len - 1) ? currentIndex 1 : 0;
showImage(next);
}
//Previous picture
function ShowPrep() {
var len = $('#OriginalPic img').length;
var next = currentIndex == 0 ? (len - 1 ) : currentIndex - 1;
showImage(next);
}
//Next event
$("#aNext").click(function () {
ShowNext() ;
if ($(".active").position().left >= 144 * 5) {
$("#btnNext").click();
}
} );
//Previous event
$("#aPrev").click(function () {
ShowPrep();
if ($(".active").position( ).left <= 144 * 5) {
$("#btnPrev").click();
}
});
//Initialization event
$(". OriginalPicBorder").ready(function () {
ShowNext();
//Bind thumbnail click event
$('#ThumbPic li').bind('click', function (e) {
var count = $(this).attr('rel');
showImage(parseInt(count) - 1);
});
});
script>
Online demo:http://demo.jb51.net/js/2011/Gallery/index.html
Package download:/201102 /yuanma/Gallery_jb51.rar

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











On Windows 11/10 systems, some users claim that the slideshow on the desktop background has stopped working. Users are confused as to why photos on their laptop's background screen no longer slide. The reasons for this issue where slideshows are not working are described below. A third-party desktop customization application is installed. In power options, the desktop background slideshow setting is paused. The folder containing the background images is deleted. The screen may turn off after the slideshow is complete. After investigating the above reasons, we have created a list of fixes that will undoubtedly help users resolve the issue. Workaround – A deactivated window may be one of the causes of this issue. So, try activating Windows and check if the issue is resolved. Try to apply it via Settings

How to Convert PowerPoint to Google Slides One of the easiest ways to convert a complete PowerPoint presentation to Google Slides is to upload it. By uploading a PowerPoint (PPT or PPTX) file to Google Slides, the file will automatically be converted into a format suitable for Google Slides. To convert PowerPoint to Google Slides directly, follow these steps: Sign in to your Google account, go to the Google Slides page, and click on the blank space under the "Start a new presentation" section. In the new presentation page, click File&g

1. Open the PPT slide document, and in the [Outline, Slide] column on the left side of the PPT, click to select the slide where you want to insert the basic [shape]. 2. After selecting, select the [Insert] menu in the function menu bar above the PPT and click. 3. After clicking the [Insert] menu, the [Insert] submenu bar pops up below the function menu bar. Select the [Shape] menu in the [Insert] submenu bar. 4. Click the [Shape] menu to pop up the preset shape type selection page. 5. In the shape type selection page, select the [Heptagon] shape and click. 6. After clicking, move the mouse to the slide editing interface, press the mouse to draw, and release the mouse after the drawing is completed. Complete the insertion of the [heptagon] shape.

Slideshows are a great way to organize pictures on your Windows 11 computer. Sometimes, Windows users may face some kind of hardware limitation or system update and they need a way to store their files so that they are not accidentally deleted or lost. Additionally, it makes sorting and displaying photos much easier than having to manually show them to people by scrolling through them one by one. Slideshows are also a great way to bring together photos from different sources (camera, phone, USB drive) into an easy-to-enjoy format. Fortunately, you can use some useful third-party applications to create these slideshows without being forced to use tools like PowerPoint. The app is suitable for business presentations, but Pow

There may be black borders in the full-screen slideshow due to screen resolution mismatch, image size mismatch, incorrect zoom mode settings, monitor settings issues, slide design issues, etc. Detailed introduction: 1. Screen resolution does not match. A common reason for black borders is that the screen resolution does not match the slide size. When the size of the slide is smaller than the screen resolution, black borders will appear during playback. The solution is to adjust Size the slide so that it matches the screen resolution. In PowerPoint, you can select the "Design" tab, then click "Slide Size" and so on.

How to hide text before any click in PowerPoint If you want text to appear when you click anywhere on a PowerPoint slide, setting it up is quick and easy. To hide text before clicking any button in PowerPoint: Open your PowerPoint document and click the Insert menu. Click on New Slide. Choose Blank or one of the other presets. Still in the Insert menu, click Text Box. Drag a text box onto the slide. Click the text box and enter your

Slideshows are a great way to organize pictures on your Windows 11 or 10 computer. Sometimes, Windows users may face some kind of hardware limitation or system update, and they need a way to store their files so they don't get accidentally deleted or lost. Additionally, it makes sorting photos and displaying them much easier than showing people one by one by manually scrolling. Slideshows are also a great way to bring together photos from different sources (camera, phone, USB drive) into an easy-to-enjoy format. Fortunately, you can use useful third-party applications to create these slideshows without being forced to use something like PowerPoint. These third-party apps are more advanced: Canva –

How to use PHP to implement image carousel and slideshow functions In modern web design, image carousel and slideshow functions have become very popular. These features can add some dynamics and appeal to web pages and improve user experience. This article will introduce how to use PHP to implement image carousel and slideshow functions to help readers master this technology. Creating the Infrastructure in HTML First, create the infrastructure in the HTML file. Let's say our image carousel has a container and several image elements. The HTML code is as follows
