Image Comparison Slider (HTML, CSS and JavaScript)

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2024
  • Learn how to create an Image Comparison Slider with HTML, CSS and JavaScript. This component, is ideal for comparing before and after images. For example, it could be used to compare images before and after compression or editing or to demonstrate the effect of a product or service etc. As usual, we are implementing this component from scratch!
    00:00 - Introduction
    01:12 - HTML
    07:45 - CSS
    37:22 - JavaScript
    Enjoy 😊
    Don’t forget to like, share, subscribe and I would love to hear your thoughts in the comments section below!
    Vanilla-tilt.js - GitHub Pages: micku7zu.github.io/vanilla-ti...
    Code: codepen.io/Coding_Journey/pen...
    Support the Channel 💙☕🙏
    PayPal: paypal.me/CodingJourney
    Suggested Videos:
    Tilt Effect on Mouse Over (HTML, CSS and JavaScript): • Tilt Effect on Mouse O...
    Modal with HTML, CSS and JavaScript: • Modal with HTML, CSS a...
    CSS box-shadow Editor: • CSS box-shadow Editor
    Simple Auto-Playing Image Slideshow (HTML, CSS and JavaScript): • Simple Auto-Playing Im...
    Coding Memes: • Coding Memes
    Codepen: codepen.io/Coding_Journey/
    Twitter: / codingjrney
    Email: codingjourney123@gmail.com
    Subscribe 💖
    / @codingjourney

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

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

    Finally you are back!!! Glad that I kept notifications on 😌

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

      Yaaay 🙂 Thanks mate! Glad to see you here 🙂 Hope you are doing well...and coding 😉💙

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

    Flawless! Thank you Sir.

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

    Outstanding tutorial!! 💯👨‍💻

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

      Thanks mate! Cheers 🍻💙

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

    if someone get the slider kind of more right side of normal add or subtract a value of variable bellow:
    let mouseX = (event.clientX || event.touches[0].clientX) - sliderLeftX " - 300 or +300 ";

  • @georgeorfanidis6055
    @georgeorfanidis6055 3 ปีที่แล้ว +2

    One more great video.
    Thank you very much!

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

      One more lovely comment! Thank you FRIEND!! 😉🍻💙

  • @James-dh6gt
    @James-dh6gt 3 ปีที่แล้ว +1

    Love it mate!! 🙏💯🍻

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

      Thank you mate! Cheers!! 🍻🙂

  • @caninan652
    @caninan652 หลายเดือนก่อน +1

    thank you for source code.

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

    Look who's back :D Great project idea, I will follow this tutorial thank you :D

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

      Heh! My favorite scientist 😉 What's up man?! I don't think 2x speed will be fast enough for you...maybe 10x 😁 Looking forward to catch up with the wizardry in your channel 🙂 Your canvas crash course seems like a good starting point!!

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

      @@CodingJourney thanks man, glad you found motivation to make another video, your fans obviously missed you. It's a lot of hard work to make tutorials like this isn't it. I usually do just projects that are fun to make. Makes it easier :D Congratulations on 5k btw

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

      Thanks Frank! Absolutely! Great advice 🙂 I had to make this video because I promised it in the previous one, but I was kind of dragging my feet to be honest 🙂 Thanks again man, keep up the superb work!! 😉💙

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

    Very interesting and amazing, thank you bro

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

      Oh thanks bro! Very glad you liked it!! 💙

  • @stepanoff7587
    @stepanoff7587 9 หลายเดือนก่อน +1

    Great thanks for your help!!

    • @CodingJourney
      @CodingJourney  8 หลายเดือนก่อน

      Superb! My pleasure friend 💙💙

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

    Congratulations for 5k

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

    It's Great! But if I put more then 1 I can't. :( I would like to have more then one in a page.
    I saw you put the id selector but changing it in class is not working anyway. It would be wonderful to have a code for multiple images.

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

      Same

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

      I've recreated the code that allows multiple sliders on one page. To achieve this, assign a distinct class name for the second slider in the HTML, CSS code, and repeat this in the corresponding JavaScript code. To streamline the process and minimize the code length, you can implement a loop in js code.

    • @vivekwalnekar5369
      @vivekwalnekar5369 10 หลายเดือนก่อน

      @@ahmadhussain3275 can u provide me code of it, please?