Image Comparison Slider - Before After Images Wordpress - Free HTML - No Plugins - No Codepen

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Image Comparison Sliders can be done with lengthy Codepens or Plugins, but what about a really simple way of adding to any Wordpress Website without much effort?
    Code: websquadron.co...
    Book your 1-2-1 Consultation: websquadron.co...
    Image Comparison Slider - Before After Images Wordpress - Free HTML - No Plugins - No Codepen
    We love to create - share - respond - and deliver.
    🧐 Learn with our Mastery Modules: websquadron.co...
    🔗 All of our Important Links: websquadron.co...
    😃 Join our Facebook Group: / 3309523509284305
    😃 Get Code Snippets Pro: r.freemius.com...
    😃 Get Elementor Pro: be.elementor.c...
    😃 Boost your RUclips Analysis: www.tubebuddy....
    👕 Get our Merchandise: websquadron.co...
    🥹 Support us: paypal.me/Webs...
    Hire us to work on your Website!
    💌 info@websquadron.co.uk
    👩‍💻 Visit websquadron.co.uk

Комментарии • 58

  • @johnnada
    @johnnada 26 дней назад +1

    Love your channel. You're my guy!! Bought your company docs too. Good stuff!!

  • @danplumadore647
    @danplumadore647 Год назад +2

    Amazing!
    More and more we are getting the opportunity to reduce the amount of plugins needed and just stick with the basics.
    Thanks, Mate

  • @HossamKhalaf-sr1oo
    @HossamKhalaf-sr1oo Год назад

    That's great!!!
    And the community here is also great, I've been reading the comments for other use cases and wow!!

  • @meisterleise
    @meisterleise Год назад +3

    Very cool, thank you.
    The only thing: I was missing the curser properties on mouseover. So I've implemented it:
    Change the first line:
    Extend the code:
    .my-image-grab {
    cursor: grab;
    }
    .my-image-grab:active {
    cursor: grabbing;
    }
    😉 cheers

    • @timbaxter31
      @timbaxter31 20 дней назад +1

      Thanks a bunch. Just used your code addition. Much appreciated!

  • @paulburgess4954
    @paulburgess4954 Год назад

    Another day, another gem! Just implemented this on two of my pages, they look great, thanks again Imran!

    • @Calebseyemedia
      @Calebseyemedia 6 месяцев назад

      how do you make your photos show up because for some reason mine did not

  • @DavideCastellani
    @DavideCastellani Год назад +2

    Great tip!
    I would like to add something to this guide: use ACF image fields to set images.
    I know, this adds a plugin, but being able to have different images for different posts can help.
    To make this possible we need to install a plugin that allows the use of PHP code inside Elementor.
    Now, copying the code into the PHP widget and replacing the image URLs with PHP code that returns the image URL:
    // get the 2 ACF fields value
    $before = get_field('before_img_id');
    $after = get_field('after_img_id');
    //replace in the html code the img src tag with this (before or after):
    src=""
    done!
    You now have a template for single posts with parameterized images

  • @alimuzahid8938
    @alimuzahid8938 Год назад

    amazing. Thank you so much. I was facing lots of issues with elementor addons then I found your video. This is really fantastic. I'm so happy. Thank you again and again

  • @Sebastien_Dottin-SDOweb
    @Sebastien_Dottin-SDOweb Год назад

    Another great find ! Thanks for sharing with us 🍻

  • @christianlecuyer6380
    @christianlecuyer6380 Год назад +1

    Great tip :)

  • @user-jm5dh8zo4k
    @user-jm5dh8zo4k 11 месяцев назад

    This is so easy to use! thanks man!

  • @steveg7380
    @steveg7380 7 месяцев назад +1

    Excellent!

  • @ForPeace333
    @ForPeace333 7 месяцев назад

    Really cool thanks ! look likes it doesn't work on Adobe Portfolio website 😥

  • @naimislam4316
    @naimislam4316 Год назад

    want to more this type video!

  • @peoples.say.masoom
    @peoples.say.masoom 3 месяца назад

    U didn't told, How to navigate the slider because I tried tooo long to figure out that the Slider slides with the Right Mouse button not the Left (Regularly Used).
    I want to make it work with the Left Mouse Button, Could u please tell me is it possible by doing some changes in the linked Script?

  • @youtub4082
    @youtub4082 6 месяцев назад +1

    tnx

  • @Melissa_Lawrence
    @Melissa_Lawrence Год назад

    Wow this is so cool!!!!

    • @websquadron
      @websquadron  Год назад +1

      Told you !!!!!!!
      Spent a week trying to find the best solution and I refined the code by adding the width and height to get around how one of my Page Speed Snippets affected it.

    • @Melissa_Lawrence
      @Melissa_Lawrence Год назад

      @@websquadron it always amazes me that you come up with this stuff! Loved this one so much tho and exactly what I was looking for without knowing it! I can't ever wrap my head around all the coding snippet stuff, thank god for code snippets plugin and ppl like you supplying us with the codes! 💛💛

  • @SHOM3ON
    @SHOM3ON 3 месяца назад

    Amazing keep it up, but it doesn't go for a full width with a parent container with 100% full width !!

    • @websquadron
      @websquadron  3 месяца назад

      No, that will need refining of the backend code.

  • @CFALJokeer
    @CFALJokeer Год назад

    Thxxx!

  • @MelTaylor
    @MelTaylor Год назад

    Greetings Imran.

  • @BeppeRoncari
    @BeppeRoncari Год назад

    Thank you for this! Is it possible to add some code to add a line of text to the image or would it be necessary to add it manually on the image?

    • @websquadron
      @websquadron  Год назад +1

      Refined code for that from here: img-comparison-slider.sneas.io/examples.html
      .before,
      .after {
      margin: 0;
      }
      .before figcaption,
      .after figcaption {
      background: #fff;
      border: 1px solid #c0c0c0;
      border-radius: 12px;
      color: #2e3452;
      opacity: 0.8;
      padding: 12px;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      line-height: 100%;
      }
      .before figcaption {
      left: 12px;
      }
      .after figcaption {
      right: 12px;
      }

      Before

      After

    • @BeppeRoncari
      @BeppeRoncari Год назад

      @@websquadron Thanks again, you're a life (and time) saver!

  • @meisterleise
    @meisterleise Год назад

    Ah - one more thing:
    I would recommend to store the linked js localy. Otherwise you've got a GDPR issue if you're located in europe.

  • @MuhammadZain-he5kf
    @MuhammadZain-he5kf Год назад

    Please make a tutorial about any content included (text, slider, and video ) before and after rather than the image.

  • @florecimicaelalecaros5535
    @florecimicaelalecaros5535 Год назад

    Hi, can i use this in kajabi platform?

    • @websquadron
      @websquadron  Год назад

      Because it’s just html code I would think so

  • @SparklyWis
    @SparklyWis 9 месяцев назад

    Hi!
    First, I have to say that everytime I search for some tutorial, I always hope it something you had made because your tutorials are always so perfect and easy to do! So... THANK YOU!
    With my slider, I would need for it to have on each ''hidden'' side of the picture an hyperlink or a button. Im struggling to figure out where or how to place it. Do you have an easy solution for me? Im using Elementor Pro. I tried with the code you gave to BeppeRoncari, no luck. Maybe I'm blind, but I don't understand where to put the code?? I put the html code from your video in the HTML widget, but the code you shared to BeppeRoncari has html and css... So I don't know where to put it?? I tried in advance CSS within the HTML widget settings, and it's not working..
    Thank you SO MUCH!!

    • @websquadron
      @websquadron  9 месяцев назад +1

      I’ll double check on adding the html and css bit

  • @justindouglas3659
    @justindouglas3659 Год назад

    Hey imran, just wanted to know if you have a video about a music chart list. I need something where i can add the top 40 songs of the week but i want to do it like a real music chart list. Any thoughts?

    • @justindouglas3659
      @justindouglas3659 Год назад

      Love the vid btw. Very usefull

    • @websquadron
      @websquadron  Год назад +1

      That would take some thought to feed through as an rss feed

  • @TheExpressionTiger
    @TheExpressionTiger Год назад

    Great Video. Thanks for your hard work. What is the site url for Image-Comparison-Slider please?

    • @websquadron
      @websquadron  Год назад

      Hi
      It’s in the code link - I added the url there

    • @TheExpressionTiger
      @TheExpressionTiger Год назад

      @@websquadron You’re awesome Thank you. I was referring to the website inside the video mentioned. It was Image-comparison-slider. I did see the code link. You mentioned checking out that site. (it had yellow logo?). Thank you.

    • @websquadron
      @websquadron  Год назад +1

      @@TheExpressionTiger Yup, it's the video link :)
      Sourced from:
      img-comparison-slider.sneas.io/

    • @TheExpressionTiger
      @TheExpressionTiger Год назад

      @@websquadron Thank You!!! :)

  • @marketmitch
    @marketmitch 5 месяцев назад

    anyone know how I can get it to optimize for desktop and mobile? I can only make one or the other look good right now since it's not built into shopify already

    • @websquadron
      @websquadron  5 месяцев назад

      Depends on how you've built it.

  • @chelofonte
    @chelofonte 10 месяцев назад

    HOW do you use it in Bricks? I'm trying with a code element inside a div, but it doesn't work.

    • @websquadron
      @websquadron  10 месяцев назад

      I’ll try it out and confirm

    • @peoples.say.masoom
      @peoples.say.masoom 3 месяца назад +1

      @@websquadron Oh It's been 6 months since you're trying out. Hurry Up Man!
      Hey Wait, Are you making a separate language for this script, Braaahhhh!!

  • @petitskarab
    @petitskarab Год назад

    Thanks a lot but I can't get the code from image comparison to work on WIX. Not sure if there are restriction as it's possible to embed your own code in WIX. It just shows 2 pictures on top of each other in and no slider. If anyone knows anything would be appreciated :)

    • @websquadron
      @websquadron  Год назад

      I suspect that Wix may limit what you can do. Have you asked them?

    • @petitskarab
      @petitskarab Год назад

      @@websquadron Apologies I missed to copy the js file . I now copied the whole code you provided in video description and it works perfectly. Thanks a lot for your video I was searching for a long time for this slider since a lot are out there but obviously with a branding and you have to pay to remove it.

  • @DepilacionLaserBA
    @DepilacionLaserBA Год назад

    is it ok for pagespeed having to load js from other website ?

  • @kaisaryerdenbekov1588
    @kaisaryerdenbekov1588 Год назад

    Сode works when you editing in the Elementor. But when you open the page in the browser, it just shows two pictures side by side. Does everyone have this problem or is it just me?

    • @websquadron
      @websquadron  Год назад

      Have you inspected the page for any JS issues?
      Works for me. Any JS optimisation applied?

  • @Calebseyemedia
    @Calebseyemedia 6 месяцев назад

    why did my photos not show up

  • @coffeebot3000
    @coffeebot3000 Год назад

    Noice!