Build a Slider with One Line Of Javascript Code

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

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

  • @lundeveloper
    @lundeveloper  День назад +7

    Next video will continue to be about three JS, it will be a truly impressive video 😁😁

  • @maksymdemchenko
    @maksymdemchenko 2 дня назад +11

    Gosh, a slider without sliding, incredible!

  • @shaiksuleman1324
    @shaiksuleman1324 2 дня назад +4

    Warning ⚠️!!The title of the video is not a clickbait! Bro is really delivering what he is promising in the title

  • @lundeveloper
    @lundeveloper  3 дня назад +12

    Don't forget to like and subscribe to watch many interesting videos about programming and web design 😍

    • @Samarsinghxs
      @Samarsinghxs 2 дня назад

      hey bro i am high school student if i learn mern that can add value to me and i can earn from it

  • @MdMamun-xl6iq
    @MdMamun-xl6iq 3 дня назад +9

    Sliders were my nightmare, really. But because of this video it is so simple and easy for me now, i thank you very much...keep making simplified videos like this one ❤❤❤

  • @mr.kunjrami9026
    @mr.kunjrami9026 День назад +1

    I mean its unbelievable that you dont need to write a bunch of LOC to make the slider...Hats off👍🙌

  • @hemantduttacodes
    @hemantduttacodes 2 дня назад +4

    That's a carousel, not a slider. But still a very informative video. I like the way you're teaching people to learn to code in unique ways rather than following the norm. Keep it up!

  • @BeastGuru52
    @BeastGuru52 3 дня назад +6

    best web creator i have seen in my life keep it bro

  • @lundeveloper
    @lundeveloper  3 дня назад +12

    Maybe if I were more concise, it would only take us 1 minute because it's really only one line of logic code 🤣

    • @Starchild2077
      @Starchild2077 2 дня назад

      Great video as always❤,how did you develop this creative way of thinking for coding man?

    • @alamanshaikh5009
      @alamanshaikh5009 2 дня назад

      long explanation better

  • @migliorelli
    @migliorelli 2 дня назад

    what do you think about sliders with a scrolling div and an tag?

    • @FACKDAWURLD
      @FACKDAWURLD День назад

      It would be same code, just replace the Img query selectors with a

  • @altero7461
    @altero7461 3 дня назад +3

    Ur briliant developer

  • @prajapati.19
    @prajapati.19 День назад +1

    Bro you use which theme in vs code I really like it

  • @ipa_stor
    @ipa_stor День назад

    As always, thanks for a new video - simple and creative. The idea of a couple answers in the end is great.
    Threejs video gonna be epic🔥

  • @lundeveloper
    @lundeveloper  3 дня назад +3

    Variable declaration and function declaration are obvious so we will not count, we will only count the logical lines of code.

    • @Samarsinghxs
      @Samarsinghxs 2 дня назад

      as a js easy loops it helps so much u solve my problem

  • @Graphicstopprod.o
    @Graphicstopprod.o 2 дня назад

    King web dev never seen these solutions ❤

  • @joel-rg8xm
    @joel-rg8xm 2 дня назад

    Time to change my coding mindset ... and the JS documentation

  • @virenkhokhar6305
    @virenkhokhar6305 День назад

    Your videos are also unique 🎉

  • @DimitriMasson
    @DimitriMasson 2 дня назад

    Wow, an interesting side effect of the DOM being a tree, appending the element forces it to be removed from its original place, creating the moving effect. Very nice, what's mind-boggling is that from a javascript perspective, we expect the variable ul to be an array since you use append on it. But ul is an Element. The behavior should probably documented on MDN

  • @khouchanemahmoud9475
    @khouchanemahmoud9475 3 дня назад

    Wow, a slider in less than 5 minutes😅 .This is why i like this chanel always a simple trick can do the work.Keep up the good work

  • @4arliEdinorog
    @4arliEdinorog 3 дня назад +2

    Быстро и круто! Пригодится

  • @PicSta
    @PicSta 2 дня назад

    Amazing slider and soo soo simple. Thanks man. Liked as always.

  • @FACKDAWURLD
    @FACKDAWURLD День назад

    Simplicity of this is insane! Awesome tip. Is there a way to style the transition? Maybe so it actually looks like it’s sliding?

    • @isaacvr
      @isaacvr День назад

      Yes. You can use the Web Transition API to let the browser handle the transition for you, with a couple lines more.

  • @waleedbinshabbir1542
    @waleedbinshabbir1542 3 дня назад

    I love your videos, they are so simple and break down the concepts amazingly.

  • @ATHARVALANDGE-u4e
    @ATHARVALANDGE-u4e 2 дня назад

    Love your content, cant wait for the next awesome trick!!!!

  • @AJ-Pixelyze
    @AJ-Pixelyze 2 дня назад +1

    I think the biggest issue is how to animate this correctly so it slides or fades from both sides. Would be great if you can do tutorial on animation with CSS like correctly targeting the right elements and explaining the logic.

    • @SergeyNeskhodovskiy
      @SergeyNeskhodovskiy 2 дня назад

      The catch is that you can't animate this or apply a transition to this. Transitions are applied to properties and this trick does not deal with any properties so oops

    • @AJ-Pixelyze
      @AJ-Pixelyze 2 дня назад

      @@SergeyNeskhodovskiy You can animate, is just targeting the right properties.

    • @SergeyNeskhodovskiy
      @SergeyNeskhodovskiy 2 дня назад

      @@AJ-Pixelyze What property will we be using in this case?

    • @AJ-Pixelyze
      @AJ-Pixelyze 2 дня назад

      @@SergeyNeskhodovskiy You can't animate display none as it takes the element out of DOM so that needs to be set to visibility and what I mean by properties is child element in CSS and HTML.

  • @MustaPha-s4i
    @MustaPha-s4i 3 дня назад

    Really you are from the best creator, i love your Channel and i was happy when i see notification

    • @lundeveloper
      @lundeveloper  3 дня назад

      Thanks for watching my content brother 😍

  • @amaizingcode
    @amaizingcode 3 дня назад

    Thank you for your videos and the effort you put into them! Best regards!

  • @ASulaymon
    @ASulaymon 2 дня назад

    that's great. You always help me to make projects bro 🔥🔥🔥

  • @tahmidmasud6149
    @tahmidmasud6149 2 дня назад +1

    Does this approach limit the ability to animate it or is there a work around?

    • @Saulbez
      @Saulbez 11 часов назад

      That is what I would like to know, I just managed to use for multiple items, however I cannot figure out how we could create a slide animation..

  • @rifatmunna
    @rifatmunna 2 дня назад

    yeah you can do it to with only display:block based on active index . and use index = (index + 1) % array.length

  • @JanMitLuca
    @JanMitLuca 2 дня назад

    Awesome! Now add transitions and we're all set!

  • @berdinazarov6972
    @berdinazarov6972 2 дня назад

    It is very helpful, thanx a lot❤️

  • @callowindia
    @callowindia 2 дня назад

    Which browser you are using because last mock up are great and i also want to test my website responsiveness

  • @timirbarangayen625
    @timirbarangayen625 2 дня назад

    Keep posting all these dude❤

  • @AttachmentStudios
    @AttachmentStudios 2 дня назад

    Wow, I learned something new today

  • @huus5682
    @huus5682 2 дня назад

    you dont have to upload everyday, but every 1 hour😁

  • @chetanmajumdar5518
    @chetanmajumdar5518 2 дня назад

    What an idea sir ji 👏👏👏👏

  • @dhanush21128
    @dhanush21128 2 часа назад

    How to change the mobile or tab background? Do you have used which software

  • @ahtishamchaudhary436
    @ahtishamchaudhary436 21 час назад

    Amazing bro btw which theme are you using?

  • @gachawings
    @gachawings 3 дня назад +3

    Is it possible to add animations too with that slider? I mean that looks Perfect to use, but ig its only for low scale products, or maybe someone who is really into that effect...😊
    But i wanted to do with some good animation effects too for my new project, was thinking if its doable and well u did show me a new way to do.
    Ig i will try this and maybe find if i can do changes to suit my style...😂
    Thanks lun ❤✨

  • @virenkhokhar6305
    @virenkhokhar6305 День назад

    Great 🎉

  • @herosova
    @herosova 2 дня назад

    this is amazing i was trying to simplify slider but you did it like hold my beer

  • @qklduh18d9
    @qklduh18d9 2 дня назад

    Amazing!!! Thanks a lot

  • @SergeyNeskhodovskiy
    @SergeyNeskhodovskiy 2 дня назад

    The catch is that you won't be able to apply any sort of animation or transition to this slider, because all animations and transition rely on properties and in this case, there is no property to be targeted, the element just appears in the DOM tree or disappears from the DOM tree. Thinking about it further, you could try something like @starting-style which doesn't yet have wide browser support.

  • @teckycat7858
    @teckycat7858 4 часа назад

    which theme you used in visual studio code

  • @ahammedshajmeer
    @ahammedshajmeer 2 дня назад

    Can you share what extension used in the last to check responsiveness.

  • @Meco_1164
    @Meco_1164 3 дня назад +1

    Thanks man came first to watch this 😅❤

  • @satyeshnmerwade5029
    @satyeshnmerwade5029 2 дня назад

    Hey, can I know the name of the chrome extension used in the end of this video that you used to display the developed website in different screen sizes?
    Thank you in advance.

  • @ibraheemmudasser4810
    @ibraheemmudasser4810 2 дня назад +1

    thanks

  • @utsavjaiswal007
    @utsavjaiswal007 2 дня назад

    Good One... Can you tell me what's that extension in which you see responsiveness ?

    • @Hieupv2412
      @Hieupv2412 2 дня назад

      Mobile simulator - responsive testing tool

  • @shubhampal5633
    @shubhampal5633 2 дня назад

    Bro it is amazing video for me and i want to know which extension you used to view on different devices in this video 😊

  • @Migueltorrejas-el7jd
    @Migueltorrejas-el7jd 2 дня назад

    bro how you check the responsiveness of your product what extension did you use?

    • @joel-rg8xm
      @joel-rg8xm 2 дня назад

      I'm guessing it's a Chrome extension called MOBILE SIMULATOR

  • @leaovulcao
    @leaovulcao День назад

    Awesome!

  • @farooghahsan1412
    @farooghahsan1412 2 дня назад

    thanks bro u done a huge favor
    please also do animation using framer-motion

  • @topalek
    @topalek 2 дня назад

    awesome info, thx

  • @qweasdzxcms
    @qweasdzxcms 2 дня назад

    Thanks man that's interesting.. how do we make the slider move smoothly?

  • @sdajmathulla6893
    @sdajmathulla6893 2 дня назад

    Very good L'un dev❤

  • @omni2852
    @omni2852 День назад

    At 4:37 is that an extension? Those phone sizes, i know the dev tools has it but this one looks different

  • @Respectgod2
    @Respectgod2 2 дня назад

    Sir please make a website that no one thought so as a college student we can practice some really new project

  • @ibraheemmudasser4810
    @ibraheemmudasser4810 2 дня назад +1

    thanks i want this video highly appreciate your content and poo voice in editing🤣

  • @wassim2863
    @wassim2863 2 дня назад

    bro can you talk about Rive !! , i love your content ❤

  • @userTarasK
    @userTarasK День назад

    Very cool video, thanks,🤟💪. But how to add smoothness or animation when changing slides using such a slider implementation?

  • @MuhammadAdnan2.0
    @MuhammadAdnan2.0 6 часов назад

    What about transition for slides ?

  • @ASulaymon
    @ASulaymon 2 дня назад

    I've a question: Can I make this slider with no button for phone-mode?

  • @donaldpetervicente8351
    @donaldpetervicente8351 2 дня назад

    is it possible to work with other tags? or just an image? ill experiment later if its work. 😅

  • @manthankanani188
    @manthankanani188 2 дня назад

    Can you please help with the carousel the same way? It should pause on the interactions, with time function, autoplay slide in just 5 lines. I know the same we can do in the same way.

  • @ZhengChooZhengYouTube-yj7gj
    @ZhengChooZhengYouTube-yj7gj 2 дня назад

    What is that tools to test responsive screen?

  • @diogogptb
    @diogogptb 2 дня назад

    Can we animate the transition on this logic?

  • @groovebird812
    @groovebird812 2 дня назад

    Hi, could you make a video how we can handle the hover effect on mobile devices?

  • @PicSta
    @PicSta 2 дня назад

    Is there a way to get slides to fade smoothly? I tried transition .slider img { } but sadly as we work with pseudo-elements it's not working. Is there a solution I might not see?

  • @hemantduttacodes
    @hemantduttacodes 2 дня назад

    Try using Audacity to clean up the audio a little bit, it sounds distorted.

  • @gokulkkd
    @gokulkkd 3 дня назад +1

    Video is amazing, can u please give me the plugin name used for the responsive views

    • @Warface
      @Warface 3 дня назад

      It's "Mobile simulator - responsive testing tool"

    • @gokulkkd
      @gokulkkd 3 дня назад

      @@Warface where do I can download?

    • @gokulkkd
      @gokulkkd 3 дня назад +1

      @@Warface thank bro got it in chrome webstore

    • @Warface
      @Warface 3 дня назад +1

      @@gokulkkd Love the fact that my comment where to download got deleted...

    • @lundeveloper
      @lundeveloper  3 дня назад

      @@Warface I don't do that 😐 😥😥

  • @tanim_mahbub
    @tanim_mahbub 3 дня назад

    Awesome!
    I tried it with opacity, visibility, and transition, the NEXT items are getting the transition but the PREV items are not, any idea why?

    • @iamarbazmulla
      @iamarbazmulla 2 дня назад

      please share your code here lets analyze it

    • @tanim_mahbub
      @tanim_mahbub 2 дня назад

      @@iamarbazmulla I tried to share the Codepen link, but RUclips is not allowing it.

    • @enkvadrat_
      @enkvadrat_ 2 дня назад

      @@tanim_mahbub write you codepen username and your id. Then we can assemble the link

  • @refeals
    @refeals 2 дня назад

    What is that chrome extension that shows the page inside a phone, tablet, etc?

    • @Hieupv2412
      @Hieupv2412 2 дня назад +1

      Mobile simulator - responsive testing tool

    • @refeals
      @refeals 2 дня назад

      @@Hieupv2412 thanks!

  • @kirillzlobin7135
    @kirillzlobin7135 34 минуты назад

    Did this channel had more videos? On the banner it is 2000+

  • @zainuldin9095
    @zainuldin9095 3 дня назад

    you can also use index and then % on it and can you show us how to apply animation to this

  • @musicvibes7174
    @musicvibes7174 2 дня назад

    Crazy Developer ☠️☠️

  • @quocthai5560
    @quocthai5560 7 часов назад

    Good vl

  • @Applecitylightkiwi
    @Applecitylightkiwi 3 дня назад

    Awesome

  • @prithivimagar126
    @prithivimagar126 3 дня назад

    Nice video ❤❤❤

  • @ukeshrestha
    @ukeshrestha 3 дня назад

    What are you using to emulate all those devices?
    BTW awesome video!

    • @vinayjhalani139
      @vinayjhalani139 3 дня назад

      it's a extension named as "Mobile simulator - responsive testing tool"

  • @Deimosks7
    @Deimosks7 День назад

    where is that community post ? or how can i join ?

    • @lundeveloper
      @lundeveloper  День назад

      You will see it as soon as you click on my youtube page

  • @CodewithIk1177
    @CodewithIk1177 3 дня назад

    Sir please create one project on react js and using the vite framework ❤❤

  • @nischa.
    @nischa. День назад

    Hey, whats the IDE theme?

  • @MDHabibulIslamHredoy
    @MDHabibulIslamHredoy 2 дня назад

    Why don't you make a course end front end development in detail?

  • @MedoRose
    @MedoRose День назад

    how can i add a transition on this function ? :(

  • @phuctran6559
    @phuctran6559 День назад

    So how can we animate it after click?

    • @lundeveloper
      @lundeveloper  День назад

      We just need to create animation moving from left to right or vice versa for the first and last item with CSS

  • @AsafBilal-tn4ub
    @AsafBilal-tn4ub 3 дня назад

    I love you bro ❤

  • @uni_media
    @uni_media 3 дня назад

    Can you do detail playlist beginniler ti advance three js

  • @velocity0212
    @velocity0212 3 дня назад

    Js god❤

  • @CalyHache-sn8pe
    @CalyHache-sn8pe 3 дня назад

    Can you make a video about a modern border raduis style ? Please 🥺

  • @yashwanthrocky6311
    @yashwanthrocky6311 2 дня назад

    Threejs ??

  • @bobin5480
    @bobin5480 3 дня назад +2

    Can you share this code

  • @Nothwarren
    @Nothwarren 2 дня назад

    Main issue is that it's lacking animations :x

  • @havefun5519
    @havefun5519 2 дня назад

    Ok, cool

  • @35C4N0R
    @35C4N0R 3 дня назад

    bruh you sent me back to optimise my slider

  • @Cj_Opi
    @Cj_Opi 2 дня назад

    Where were you 2 days ago 😭😭

  • @nathaishik
    @nathaishik 3 дня назад +1

    me at the end of every lun dev video: What the fuck?

  • @AlThePal78
    @AlThePal78 3 дня назад

    doesn't those images have copyright situations

  • @rashidshahriar7913
    @rashidshahriar7913 2 дня назад

    man, no comment :)