How To Create An Image Slider In HTML, CSS & Javascript

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ม.ค. 2025

ความคิดเห็น • 675

  • @akifahmed9610
    @akifahmed9610 ปีที่แล้ว +5

    We need more such tutorials like these. Handling small projects without use of any library is such a great way to learn.

  • @tinycabincreative
    @tinycabincreative 5 ปีที่แล้ว +60

    13:43 "Fired" Relatable. Haha Thanks for such a great tutorial this has been a huge help, you're a wicked coder and I would love to see more.

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว

      @Santino Hector I have followed all instructions, but my carousel isn't working. Would you please kindly send me your code...so that I can find my error. Thanks

  • @mouhamaddiop1144
    @mouhamaddiop1144 4 ปีที่แล้ว +25

    It's always better to do things by yourself, especially if it's for learning purpose. Thank you very much for what you do.

  • @tonysmarks3578
    @tonysmarks3578 5 ปีที่แล้ว +16

    I'm happen to use carousel in my project and I don't want to require bootstrap. So this is a great video for me!!!

    • @InGreed666
      @InGreed666 5 ปีที่แล้ว +3

      same here but somehow the javascript doesnt seem to work on my page at all.. idk what going on

    • @hamzadahmani9489
      @hamzadahmani9489 4 ปีที่แล้ว

      @@InGreed666 make sure if you linked the js file well

  • @kevinariza603
    @kevinariza603 4 ปีที่แล้ว +18

    Hello people! Also, you can add another event listener to check if the screen size changes and update the size variable accordingly, so it becomes responsive. This is what I did:
    I Changed this:
    const size = carouselImages[0].clientWidth;
    By this:
    let size = carouselImages[0].clientWidth;
    And I added this to the script:
    window.addEventListener('resize', () => {
    carouselSlide.style.transition = "none";
    size = carouselImages[0].clientWidth;
    carouselSlide.style.transform = 'translateX(' + (-size * counter) + 'px)';
    });
    Thanks for these tutorials, Ed, you are great!

    • @ihatejart123
      @ihatejart123 4 ปีที่แล้ว +1

      unfortunately doesnt work for me :( Any idea or tips? is there a specific position within the script for the new eventlistener to place it in? help would be much appreciated :)

    • @kevinariza603
      @kevinariza603 4 ปีที่แล้ว +3

      @@ihatejart123 Here is the source code, feel free to explore/fork/download it and use it to your own need:
      github.com/Kevwas/image-slider/
      If you want something a bit more advanced, taste this other image-slider I made with Bootstrap:
      github.com/Kevwas/image-slider-2/
      Here there is another good example:
      w3schools.com/howto/howto_js_slideshow.asp

    • @annaylak2618
      @annaylak2618 3 ปีที่แล้ว +1

      thanks for this! it works on my code. Issue was, when I click next or prev, it doesn't fully show the full picture.

    • @kevinariza603
      @kevinariza603 3 ปีที่แล้ว

      @@annaylak2618 Glad it helped you :)

    • @stormyandink8549
      @stormyandink8549 3 ปีที่แล้ว

      thank you so much! You've saved me!

  • @eymeen
    @eymeen 3 ปีที่แล้ว

    I was searching in youtube about this, I opened this video and when I see your intro I was like "YEEEEEEEEESSSSS" I missed your tutorials a lot, I'm now a laravel guy...

  • @Rob-cq1nf
    @Rob-cq1nf 2 ปีที่แล้ว

    oldie but goldie :) I really enjoy your "older" content. Keep up the good work

  • @quangtoanta8577
    @quangtoanta8577 3 ปีที่แล้ว

    There're many tutorials out there but only you have videos giuding me with your voice and It's really understandable and really useful. Again, thank you alot!

  • @taruntomar7947
    @taruntomar7947 3 ปีที่แล้ว

    Thanks for saving my job.I now feel confident.After looking more than 50 videos I finally got what I was looking for..(subscription-Done).
    Love from India

  • @developedbyed
    @developedbyed  6 ปีที่แล้ว +34

    Thanks for the positive feedback on these tutorials so far. Let me know if you want to see something else!

    • @Student-fd4go
      @Student-fd4go 6 ปีที่แล้ว +5

      Works well, unless you use a page that's not full screen or resize the page during use, can you explain how to make it mobile/resize friendly?

    • @sugandharao4221
      @sugandharao4221 5 ปีที่แล้ว +2

      Can you show how to add radio buttons at the bottom and control navigation of slides with that?

    • @armanhanda
      @armanhanda 5 ปีที่แล้ว

      Hey! Great tutorial man! Any idea how we can use touch gestures like swipe left and swipe right to fire the previous and next events?
      Also, will this be responsive to viewport size? Thanks 🙏🏼

    • @ayyubayyyub9415
      @ayyubayyyub9415 5 ปีที่แล้ว

      How old are you ed please tell me

    • @kulumwangu3366
      @kulumwangu3366 4 ปีที่แล้ว

      Hi Dev I have a query my buttons do not want to work please assist

  • @codenamegrant
    @codenamegrant 4 ปีที่แล้ว +5

    8:46; I found that making changes to the code and refreshing the page responds with the incorrect clientWidth, and so my slider remains on the lastClone image.
    I dont know why this happens, but to fix it, I have to use Ctrl+F5 to refresh the page instead of a normal refresh/reload.

    • @mayankkumar1417
      @mayankkumar1417 3 ปีที่แล้ว

      It also happening with me , did you solve the problem now?

    • @mayankkumar1417
      @mayankkumar1417 3 ปีที่แล้ว +1

      I think the first carouselSlide.style.transform = 'translateX(' + (-size * counter) + 'px)'; is not working everytime.

  • @dCoder92
    @dCoder92 2 ปีที่แล้ว

    The noises your mic is doing is real ASMR for me, thanks!

  • @eshendetesia3776
    @eshendetesia3776 2 ปีที่แล้ว

    Ed, you are the best teacher on the internet. The way you explain the things are very easy to understand!

  • @lefka2523
    @lefka2523 3 ปีที่แล้ว +1

    console.log(counter)
    error
    does not work. everything is working but the counter does not work.
    can someone tell me why?

  • @gejohans
    @gejohans 3 ปีที่แล้ว +1

    My get often stuck when I open the page but when I refresh, it's ok. What have I done wrong?

  • @alexlowe9863
    @alexlowe9863 4 ปีที่แล้ว +9

    This is one of the best tutorials on this topic. It's short and sweet. Thanks for the great video. It was exactly what I was looking for.

  • @marcjosephmanarin778
    @marcjosephmanarin778 6 ปีที่แล้ว +9

    my problem is this
    Cannot read property 'id' of undefined.
    at this line
    if (carouselImages[counter].id === 'lastClone') {
    please help me

    • @chrisj.2611
      @chrisj.2611 4 ปีที่แล้ว

      Yap, same here.

    • @chrisj.2611
      @chrisj.2611 4 ปีที่แล้ว

      I dont know why but after I used this part (found it way below in the comments) and just renamed the variable names (b/c i gave it different ones) it worked for me:
      carouselSlide.addEventListener('transitionend', () => {
      if(carouselImages[counter].id === 'lastClone') {
      carouselSlide.style.transition = "none";
      counter = carouselImages.length - 2;
      carouselSlide.style.transform = 'translateX(' + (-size * counter) + 'px)';
      }
      else if(carouselImages[counter].id === 'firstClone') {
      carouselSlide.style.transition = "none";
      counter = carouselImages.length - counter;
      carouselSlide.style.transform = 'translateX(' + (-size * counter) + 'px)';
      }
      });

  • @Richard-wh6wg
    @Richard-wh6wg 5 ปีที่แล้ว +4

    I've used the same code as you did, but that didn't work out. So, I have made mine one following the same logic, and it worked out. Thx my man

    • @andreistar0533
      @andreistar0533 4 ปีที่แล้ว

      can u tell me the code it doesn't work for me either

  • @Photo-Ninja
    @Photo-Ninja ปีที่แล้ว +2

    For responsiveness don't use the JS solutions posted below, just use this simple css:
    .carousel-container {
    width: 60%;
    margin: auto;
    overflow: hidden;
    }
    .carousel-slide {
    display: flex;
    aspect-ratio: 2 / 1; /*

  • @bazlajter1525
    @bazlajter1525 4 ปีที่แล้ว +1

    God bless you man! After much torment, I found your video and made an infinite carousel. Thanks a lot!

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว

      I have followed all instructions, but my carousel isn't working. Would you please kindly send me your code...so that I can find my error. Thanks

  • @william.darrigo
    @william.darrigo 2 ปีที่แล้ว

    thank you! this was the only tutorial I could find that could do a nice smooth carousel. You explained it awesomingly.

  • @MissDeeJoy
    @MissDeeJoy 5 ปีที่แล้ว +9

    Thank you so much for this tutorial ! It helped me a looooot ! Your explainations are very clear considering JS is soooo complicated haha thanks mate !

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว

      I have followed all instructions, but my carousel isn't working. Would you please kindly send me your code...so that I can find my error. Thanks

    • @tiaan_va
      @tiaan_va 2 ปีที่แล้ว

      @@kazimuntasir maybe learn some more actual JavaScript before you do these tutorials. The point of this is not to copy his code but to see what logic is needed and if you know even basic js you can use this logic to build it without needing to copy code. There is no point to copy code if you don’t know how to debug it.

    • @kazimuntasir
      @kazimuntasir 2 ปีที่แล้ว

      @Tiaan van Aardt Thanks brother.❤️❤️

  • @obelisk2676
    @obelisk2676 4 ปีที่แล้ว +3

    Lovely video, forgot to link the css file and spent 5 minutes reading out each line of code.
    Keep up the good work!

  • @henrycode679
    @henrycode679 2 ปีที่แล้ว

    I always love seeing this my friend coding and learn allot from him.. i wish i see him eye to eye someday 💓💓

  • @geekprobin1456
    @geekprobin1456 4 ปีที่แล้ว

    Great Video about image slider! Especially that sliding effect is really awesome.

  • @EffuseDex
    @EffuseDex 6 ปีที่แล้ว +17

    Loved this, super helpful!

  • @HotDogRacing
    @HotDogRacing 2 ปีที่แล้ว

    For me @8:51 If I check in the console with console.log(carouselImages[0].clientWidth) it returns the correct width, but if I do console.log(size) it returns 0.

  • @seantownz4519
    @seantownz4519 2 ปีที่แล้ว

    Im confused with the first clone and last clone. I have the transition but but the first image doesnt transition back to the last image. It just keeps going till i run out of images

  • @IstvanWeisz_logoby
    @IstvanWeisz_logoby ปีที่แล้ว

    greatest slider video that I see!!!! Thanks Ed!!!!!

  • @tokochagunava5478
    @tokochagunava5478 3 ปีที่แล้ว +1

    guys, how to add auto slide on shits in js? for example after 5-10 second's slide automaticly?

  • @mahdiehsani6993
    @mahdiehsani6993 3 ปีที่แล้ว

    So far you are one of my favorite teacher, also you make me laugh during ur explaining 😅

  • @Pixelyze-tech
    @Pixelyze-tech 8 หลายเดือนก่อน

    Good tutorial, my question is, why clone when you could have reset how you access to display the element would the "transitionend" event still work? I built a slider but everytime I press on the next or prev to reset the position it automatically slides to that original element and not doing what your slider does.

  • @jnnnle
    @jnnnle 5 ปีที่แล้ว +41

    Wonderfully crisp and to the point, thank you for a grwat tutorial. It would be helpful if you linked the source code.

  • @mailomailo
    @mailomailo 4 ปีที่แล้ว

    hi, i'm having the problem that the script is not working at all. i tried various options like external file or inline sricpt - that should not be the problem... please help me

  • @alanhanley214
    @alanhanley214 2 ปีที่แล้ว

    Just came across this video, thank you for a fantastic tutorial, it's just what I needed to help finish my uni project

  • @jorgeartaza9030
    @jorgeartaza9030 5 ปีที่แล้ว +6

    the code doesn't work can you help transitionend section doesn't work.

  • @IshratJahan-bf6fw
    @IshratJahan-bf6fw 3 ปีที่แล้ว

    My images are not fitting into that black box behind the images all the images are cut half in other images it is not a full image ..
    I hope you understood my problem and will able to help me.

  • @ganesha123100
    @ganesha123100 ปีที่แล้ว

    Excellent video. Many thanks for taking the time to create this awesome tutorial.

  • @afyaali4618
    @afyaali4618 4 ปีที่แล้ว +1

    hello ! my prev and next button not working .please why?

  • @andreistar0533
    @andreistar0533 4 ปีที่แล้ว +3

    I have an error it says Uncaught TypeError: Cannot read property 'clientWidth' of undefined

    • @garethbaldwin6413
      @garethbaldwin6413 4 ปีที่แล้ว +1

      same

    • @davidegg1820
      @davidegg1820 4 ปีที่แล้ว +2

      same

    • @Dev-qy7wv
      @Dev-qy7wv 4 ปีที่แล้ว

      the issue is with browser compatibility. Chrome supports clientWidth very well but firefox has issues with this property. As a quick fix I hard coded the value of size.

  • @zdarofMERGAITES
    @zdarofMERGAITES 4 ปีที่แล้ว +2

    Uncaught TypeError: Cannot read property 'clientWidth' of undefined
    I get this kind of headache, and buttons isnt doing anything...

    • @matahoneyy
      @matahoneyy 4 ปีที่แล้ว

      same hereee! help

    • @tahirahmedt9156
      @tahirahmedt9156 4 ปีที่แล้ว +1

      @@matahoneyy check if you are using queryselctor or queryselectorall

    • @rezzailham7682
      @rezzailham7682 4 ปีที่แล้ว

      same here,, help please

    • @mitchellmadden183
      @mitchellmadden183 4 ปีที่แล้ว

      same hereee. i even tried setting the size to #lastClone.clientwidth and nothing happens

  • @mohdsahil226
    @mohdsahil226 ปีที่แล้ว

    Really Thank you so much for this wonder full trick. Please add more components like this!
    I would like to buy a course if you have one

  • @pranaykrmajee1432
    @pranaykrmajee1432 3 ปีที่แล้ว

    My arrows are moving along with the images and disappears after one click. Any solution ?

  • @berintandaniel1643
    @berintandaniel1643 3 ปีที่แล้ว

    the script stops working if u reload from the button but if you ctrl+f5, everything is fine?

  • @gmanpublications
    @gmanpublications 5 ปีที่แล้ว +5

    Hi, I am following along with the video and I noticed a couple of things. First is that there is more than one image instead of only showing one at a time. The second is when I ran the following code...
    carouselSlide.addEventListener('transitionend', () =>{
    console.log('Fired');
    });
    No fired doesn't show up when I click next.

    • @MuhammadShahbaz-fg4jh
      @MuhammadShahbaz-fg4jh 4 ปีที่แล้ว

      For one image at a time, check your css, in parent container, use overflow:hidden

    • @Jehovah77
      @Jehovah77 4 ปีที่แล้ว +1

      i had this problem
      my problem was in this line
      carouselSlide.style.transition = "transform 0.4s ease-in-out"
      0.4s was 0.4 so fired didn't work.

  • @SammyLame
    @SammyLame 2 ปีที่แล้ว

    I just dont undersrand the syntax behind how we write this transform translate, and the way we use qotation marks and closures. Also cant find any information about it

  • @oliverbosnjak4361
    @oliverbosnjak4361 2 ปีที่แล้ว

    My slider didn't work when dimension of my screen in less then 420px(for mobile version) did somebody know why? otherwise it does everything right.

  • @cosmicbeam7505
    @cosmicbeam7505 4 ปีที่แล้ว +1

    Nice Video. Why does clientWidth return 0 when I reload the page? Is there a solution ?

  • @IshratJahan-bf6fw
    @IshratJahan-bf6fw 3 ปีที่แล้ว

    Can you tell me what was the size of the pictures of yours?
    Because it is not matching with mine. I have been trying these pictures resolution code for 2 days but I still can't get it right...
    I hope you can help me ASAP...🙏🙏

  • @udhavkansal3378
    @udhavkansal3378 4 ปีที่แล้ว +1

    Hey Ed,
    I didn't get the counter part.
    what is counter doing and how you shift the original image in the slider??
    plz help me.

  • @rakeshsoni8858
    @rakeshsoni8858 3 ปีที่แล้ว

    I wrote the same code for 1920x1080 resolution pictures but when I am resizing it the site is not looking much responsive

  • @gom4stick
    @gom4stick 4 ปีที่แล้ว +5

    Hi Dev, thanks for this amazinz video. im doing my own webpage and I got a problem with the imgs.
    In your video, the images fill up the container: carrousel-slide.
    Im trying to do the same, but mines doesnt. when i code display:flex, they go one beside the other, but they dont fill up the container. I gave them the exactly width and height on PS, but the same.
    is there something you could recomend. please...!!!
    thanks
    Cristian

    • @Tien-Tjie
      @Tien-Tjie 4 ปีที่แล้ว +2

      did you figure it out im having the same problem

    • @yourpaldrewdle3893
      @yourpaldrewdle3893 4 ปีที่แล้ว +2

      set the width and height of the image to the same width and height of the container

    • @tunaralyarzada
      @tunaralyarzada 2 ปีที่แล้ว +1

      i have also same issue)

    • @cyntheatimothy5812
      @cyntheatimothy5812 2 ปีที่แล้ว

      Try increasing just the height..in my case setting height to 700px fixed the issue

  • @mandyjeans
    @mandyjeans 2 ปีที่แล้ว

    Actually I based my slider on my website off this tutorial but I have a problem with the slider not actually working on my website until the page is refreshed. Help?

  • @0bbie610
    @0bbie610 5 ปีที่แล้ว +11

    Oof how would you make this mobile responsive. It sizes down my images when i size my window down

    • @anaisrevellat5692
      @anaisrevellat5692 5 ปีที่แล้ว +8

      Try to do this like me: you add max-width: xxx px and min-width: xxx px on your .carousel-container, you can test it using Firefox Developer Tool for instance

    • @freddy7304
      @freddy7304 4 ปีที่แล้ว

      just declare the elements as a flex box

    • @arindam1249
      @arindam1249 4 ปีที่แล้ว +1

      media query

  • @BJJNathanSK8
    @BJJNathanSK8 4 ปีที่แล้ว

    const carouselSlide = document.querySelector('.carousel-slide'); syntax error at that part :( Someone know why?

  • @RonyPrime
    @RonyPrime 2 ปีที่แล้ว

    Now i can create a carousel ......
    // Thanks A lot brother......

  • @mantech560
    @mantech560 2 ปีที่แล้ว

    great stuff mahn.. learnt a lot

  • @vincentvalentine3221
    @vincentvalentine3221 4 ปีที่แล้ว

    Hi!
    I was not able to understand this at 19:35 :-
    if (counter

  • @mastercoder6197
    @mastercoder6197 4 ปีที่แล้ว

    I get error saying cannot read property 'clientWidth' of undefined

  • @diegovillamil7999
    @diegovillamil7999 4 ปีที่แล้ว

    Thanks man for this great tutorial, thumbs up and I hope to see more

  •  4 ปีที่แล้ว +1

    everytime I reload the page, only my clone picture appears and I can't move forward. I think that the counter messes up or something like that. Pls help!

    •  4 ปีที่แล้ว +1

      Fixed it! Just needed to change clientwidth to naturalwidth!

    • @Jazir-Sanchez
      @Jazir-Sanchez 4 ปีที่แล้ว

      @ thanks for the advice i have the same problem.

    • @Jazir-Sanchez
      @Jazir-Sanchez 4 ปีที่แล้ว

      never mind did't work for me

  • @longnhat6405
    @longnhat6405 2 ปีที่แล้ว

    That's very nice video! Really easy to understand.Thanks very much

  • @mosdev1663
    @mosdev1663 3 ปีที่แล้ว +1

    doesn't Work for me.. Uncaught TypeError: Cannot read property 'id' of undefined / .id === 'firtsClone' and for lastClone.. Can you explane me please ? Thank you..

  • @dustedskaters
    @dustedskaters 4 ปีที่แล้ว

    Thanks Man I look forward to Watching more of your videos

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว

      I have followed all instructions, but my carousel isn't working. Would you please kindly send me your code...so that I can find my error. Thanks

  • @avess100
    @avess100 5 ปีที่แล้ว +6

    Do you have a github repo link for this?

  • @gurejalectures
    @gurejalectures 5 ปีที่แล้ว

    the same coding is not working. .... all the images are displaying in one div .....

  • @kapitankurek
    @kapitankurek 4 ปีที่แล้ว

    hey I have a problem with the photos being stretched or tightened-up when there is not enough space or too much space. How to fix that?

    • @pedramkarimi1819
      @pedramkarimi1819 4 ปีที่แล้ว

      object-fit:cover ; write this into your css code.

  • @cp0bo593
    @cp0bo593 2 ปีที่แล้ว

    thank you very good explanation learned a lot of mechanics just from this video

  • @iqronegoro1538
    @iqronegoro1538 2 ปีที่แล้ว

    this is what i search for a week

  • @Matancy
    @Matancy 5 ปีที่แล้ว +2

    Thanks for the tutorial !
    It was so simple and fast than the other on the Web :)

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว

      I have followed all instructions, but my carousel isn't working. Would you please kindly send me your code...so that I can find my error. Thanks

    • @Matancy
      @Matancy 3 ปีที่แล้ว

      @@kazimuntasir Sorry, i made it 1 year ago. But you need to try and get help from Discord servers or forums

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว

      @@Matancy I have been trying this for the last 4 days, but unsuccessful. I can't find my error.
      I'm trying to find that.
      Thanks for replying bro

  • @g-thangm6221
    @g-thangm6221 4 ปีที่แล้ว +2

    perfect tutorial. Keep up the good work! :))

  • @曰_曰
    @曰_曰 ปีที่แล้ว +1

    amazing tutorial!

  • @kevinsing8948
    @kevinsing8948 5 ปีที่แล้ว +3

    the code is messed up the moment you add carouselSlide.style.transform= 'translateX(' + (-size*counter)+ 'px)' the following happens :
    scroll with mouse to zoom in and out and you will see multiple images within the frame(60% width border). images dont fit border, only works with 100% zoom, change the zoom and enjoy your headache.

    • @tadas4785
      @tadas4785 5 ปีที่แล้ว +1

      It happens because size property is set upon page load. It is constant and doesn't change if you zoom or resize window. You can zoom page and then refresh, after that it should work fine. In fact this carousel is responsive, because it is not so common to change window size during use-time. If you want to make it 100% clean, just add an event, which would change 'size' property if page is resized. Like this:
      window.onresize = () => {
      size = carouselImages[0].clientWidth;
      carouselSlide.style.transition = "none";
      carouselSlide.style.transform = "translateX(" + -size * counter + "px)";
      };
      And don't forget to set size as 'let' variable, since you can't change value of constant.

    • @kevinsing8948
      @kevinsing8948 5 ปีที่แล้ว

      @@tadas4785 thanks for the replay, yah i figured that later,

    • @TheJFMR
      @TheJFMR 4 ปีที่แล้ว

      hahahaaha enjoy your headache

  • @ghjafary1304
    @ghjafary1304 5 ปีที่แล้ว +2

    It was fabulous...Thank you for making it.

  • @andreiairinei1659
    @andreiairinei1659 4 ปีที่แล้ว

    You are genuinely an awesome and funny guy

  • @programmerboy2810
    @programmerboy2810 2 ปีที่แล้ว

    great explanation and logic🔥🔥

  • @mostafarawash9595
    @mostafarawash9595 5 ปีที่แล้ว +1

    i who press like number 1000 and this first video i watched to u and i want to say your amazing

  • @rakibhasanrahad6994
    @rakibhasanrahad6994 4 ปีที่แล้ว +8

    dev ed bro u are a little bit fast! You are awesome no doubt! But it would be helpful if you add more explanations!

  • @robzlegz
    @robzlegz 4 ปีที่แล้ว

    Uncaught TypeError: Cannot read property '0' of null
    at main.js:27
    at this line: const size = carouselImages[0].clientWidth;

  • @nielfollero5
    @nielfollero5 4 ปีที่แล้ว

    That transform = translate in js is bothering me. You used + in both previous and next, it should be moving in the same direction whichever button you click but wasn't. I'm mind blown but I'm sure I misunderstood this. Can someone explain?

  • @ghostkiller_ftw1014
    @ghostkiller_ftw1014 3 ปีที่แล้ว

    transitionend doesnt work for me, do u know maybe how can I fix it

  • @YounghoHan
    @YounghoHan 4 ปีที่แล้ว

    super thanks!!! i was so touched by your lecture and kindness

  • @jaimemachado4667
    @jaimemachado4667 ปีที่แล้ว

    Melhor carrossel visto por mim até hoje, parabéns, agradeço, pois me ajudou em uma tarefa dificil de um carrossel com 40 imagens. Brasil

  • @stefanmrvic4652
    @stefanmrvic4652 3 ปีที่แล้ว

    how to make it draggable left and right with hand icon?

  • @sharriceowens913
    @sharriceowens913 4 ปีที่แล้ว

    my images only take up 50% of the container..so 2 pics are seen at once..what i do?

  • @sir.buttersworth
    @sir.buttersworth 4 ปีที่แล้ว

    I can’t see the arrows. When I inspect the page it’s says the arrows are there, but you just can’t see them.

  • @pro-truth
    @pro-truth 2 ปีที่แล้ว

    Do you have similar for videos? like if you want to replace those images with video clips

  • @TWspk66
    @TWspk66 3 ปีที่แล้ว

    Thank you for the tutorial ! I would like to know how to solve the error :
    it keep saying that : "app.js:11 Uncaught TypeError: Cannot read properties of undefined (reading 'clientWidth')" @@
    it makes i press prev or next btn , it doesn't work :(

  • @marcozoni9116
    @marcozoni9116 2 ปีที่แล้ว

    Uncaught TypeError: Cannot read properties of undefined (reading 'clientWidth')

  • @outpost31737
    @outpost31737 ปีที่แล้ว

    Your code doesn't work I've copied every single line and the main container div shows two images side by side and the buttons do not work unless I set the img to 100%.

  • @leolowe22
    @leolowe22 5 ปีที่แล้ว +1

    transitionend not working in chrome and the code doesnt work in firefox

  • @alirezafazeli231
    @alirezafazeli231 3 ปีที่แล้ว

    thats great my friend, thank you for this video

  • @Learnwithrakibbhai
    @Learnwithrakibbhai 4 ปีที่แล้ว

    This is very effective tutorial for me.Thanks you dev ed.

  • @adeebr6639
    @adeebr6639 5 ปีที่แล้ว +4

    Amazing tutorial! thank you for making it!

    • @kazimuntasir
      @kazimuntasir 3 ปีที่แล้ว +1

      I have followed all instructions, but my carousel isn't working. Would you please kindly send me your code...so that I can find my error. Thanks

  • @nathanielperez453
    @nathanielperez453 4 ปีที่แล้ว

    I cant find the same fontawesome link that you entered. what can I do???

  • @adelminwer2675
    @adelminwer2675 4 ปีที่แล้ว

    hey dude ,can you help me out i want to make a smaller version of this to put in a page but it doesnt seem to work how can you help me out?'

  • @hebasalem949
    @hebasalem949 5 ปีที่แล้ว +1

    thank you very much .... i need to add a pagination or bullets at the bottom , do you think you could help me in a simple way like that video?
    thanks ..

  • @PaulCresswellcom
    @PaulCresswellcom 4 ปีที่แล้ว +1

    Can anyone help me, its driving me mad. I cant get "const width = carouselImages[0].clientWidth;" to return anything but 0.

    • @andrey7757
      @andrey7757 4 ปีที่แล้ว +1

      my problem was that I wrote document.querySelector('img') but instead of this we need to write document.querySelectorAll('img'), maybe it'll help you

    • @mauricio_vargas
      @mauricio_vargas 4 ปีที่แล้ว +1

      Your script tag needed to be at the end of the html of the not at the top

  • @haykrandeksikik
    @haykrandeksikik 6 ปีที่แล้ว

    Sorry i can't understand this part of code ? can you help me a little... how is the first or last picture appearing in left or right when i am sliding ...please help :)
    if(carouselImages[counter].id==='lastclone'){
    carouselSlide.style.transition='none';
    counter = carouselImages.length-2;
    carouselSlide.style.transform = 'translateX('+ (-size *counter)+ 'px)';
    }

  • @RafiqulIslam-kt6bx
    @RafiqulIslam-kt6bx 3 ปีที่แล้ว

    i copied the hole thing but it is not working. After last img 1st img is not coming