Good day.
It took me recently to find the image slider, but only very simple.
All that was needed: the left / right buttons and that when switching images, the pictures did not immediately switch / darken / brighten, but they seemed to 'stick together' and follow each other. Here's how, for example. See you They are supposedly glued together when switching.
In general, I did not find such a slider, everyone has too many frills .. I decided to write my own. So far, it has riveted it:
var imgNum=0; //ΡΡΠ΅ΡΡΠΈΠΊ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ var separated=[ΡΡΡ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ]; //ΠΌΠ°ΡΡΠΈΠ² Ρ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡΠΌΠΈ $('#go_left').on('click',function(){ //ΠΏΡΠΎΡΠΌΠ°ΡΡΠΈΠ²Π°Π΅ΠΌ ΠΏΡΠ΅Π΄ΡΠ΄ΡΡΡΡ ΠΊΠ°ΡΡΠΈΠ½ΠΊΡ imgNum--; //Π»ΠΈΡΡΠ°Π΅ΠΌ Π½Π°Π·Π°Π΄ ΡΡΠ΅ΡΡΠΈΠΊ if(imgNum<0){ //Π΅ΡΠ»ΠΈ ΠΎΠ½ ΠΌΠ΅Π½ΡΡΠ΅ 0 imgNum=separated.length-1; //ΠΈΠ΄Π΅ΠΌ Π² ΠΊΠΎΠ½Π΅Ρ ΠΌΠ°ΡΡΠΈΠ²Π° } $('#here').attr('src','content/'+separated[imgNum]); }); $('#go_right').on('click',function(){ //ΠΏΡΠΎΡΠΌΠ°ΡΡΠΈΠ²Π°Π΅ΠΌ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠ°ΡΡΠΈΠ½ΠΊΡ imgNum++; //Π»ΠΈΡΡΠ°Π΅ΠΌ ΡΡΠ΅ΡΡΠΈΠΊ Π²ΠΏΠ΅ΡΠ΅Π΄ if(imgNum>=separated.length){ //Π΅ΡΠ»ΠΈ Π±ΠΎΠ»ΡΡΠ΅ ΡΠ΅ΠΌ Π΅Π»Π΅ΠΌΠ΅Π½ΡΠΎΠ² Π² ΠΌΠ°ΡΡΠΈΠ²Π΅ imgNum=0; //ΠΊΠΈΠ΄Π°Π΅ΠΌ Π² ΡΠ°ΠΌΠΎΠ΅ Π½Π°ΡΠ°Π»ΠΎ ΠΌΠ°ΡΡΠΈΠ²Π° } $('#here').attr('src','content/'+separated[imgNum]); }); The easiest way to switch images, this option works, but it just switches them instantly.
I want to get a "slip effect", where all the images will be somehow bonded to each other during movement. How to achieve this at all? Maybe someone knows where there are examples?