Vanilla Javascript Text Animation Tutorial

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

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

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

    Happy new year my gorgeous teacher on the internet

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

    No joke, great tutorial, was just trying to figure this out last month! 👍 It's great to hear you talk the code out, like "this does this and because this is a this it needs a this". Shows me how to think about it next time!

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

    Thanks For Your Support and Education...We Really Appreciate a Teacher like You.. Happy New Year

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

    Hi Ed! This is simply amazing. The way you create these front-end lessons with a practical approach is really inspiring. Keep sharing, my friend!

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

    You've killed it in 2019, see you in 2020! Happy New Year man!

  • @muhd.aidilsyazwanhamdan6815
    @muhd.aidilsyazwanhamdan6815 5 ปีที่แล้ว +1

    6:09 - Since splitText is an array, you can also use splitText.forEach((letter, index) => { // some actions });

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

      I was thinking about that too. How would that look with the "forEach()"?

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

    Good tutorial Ed, at 11:40 adding display: inline-block; removes the space between two word.

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

      I came up with a quick fix of using min-width on inline-block'ed span.

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

      Yes that is very good, but in case we change the font size then maybe we have to change again the min width, also all letters have no same width unless the font is a mono space font.
      I think more universal approach would be converting the the space character to the HTML entity   using javascript.
      char = (char === " ") ? " " : char;

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

      Fix =>
      if (textSplitted[i] === " ") {
      text.innerHTML += "" + " " + "";
      continue;
      }

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

      @@Nimgimli ops, didn't see yours

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

      @@Nimgimli Thanks, it works !

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

    I research on w3school and found a short way to write the setInterval code:
    let char = 0;
    let timer = setInterval(onTick, 50);
    function onTick(){
    const span = text.querySelectorAll('span') [char];

    if (char === splitText.length){
    clearInterval(timer)
    }else{
    char++
    span.classList.add('fade');
    }
    }
    I am noob and new to JS but I tried this , it works!

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

      thaaaaaaanks !!!!! you great !

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

    When it comes to your videos, I usually click the "like" button first before watching. :D

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

    I don't know if you gonna see this comment, i only wanna thank you for teaching me Coding i was blank but with you i have now some knowledge........May God give you more years so we can learn more from the tutor.........Happy New Year ED...

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

    This is something on my todo list so thank you for this.
    I wish you a great 2020!

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

    For everyone who's trying to seperate the words from each other: just insert ' ' (without qotation marks) wherever you want the space to be in your html document.

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

      Thanks for that !! What I don't understand is why the spaces were showing for me early in the tutorial, but then they disappeared for the final product. Even in Ed's example at the end, sometimes the spaces are displaying, but then they are gone in the next cut.

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

    Amazingly helpful video! This was well worth 14 minutes; the explanations were brief, but thorough and the main example was easy to follow. Hope to see more from you soon!

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

    Damn i had known html for years but i only typed in the tags and was boring when i first tried using it. Now i got to learn css and javascript.
    BOOO! 🔥 a vast new world of web development has been opened up for me...
    Thank you so much for making this kind of videos and please keep it coming (especially would appreciate if its tagged with javascript based content). :D

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

    YES I DID WATCH YOUR COURSE YES I DID BUY YOUR TUTORIAL AND YES IT IS AWESOME. ZHANK you.
    Happy new year!!!!! We are real tech. Get this thing going my man!

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

    congrats on 500k sub

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

    You are hilarious; I love when teachers are vibrant.

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

    "The knowledge in our soul. What?" Hilarious!

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

    Wish you a very happy new year Ed and thanks for making 2018 so exciting by creating these videos. Love you man!

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

    I never get bored watching your videos 😊❤️

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

    I love the way you said : Who need that?

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

    How can you be so funny and productive at the same time ? 😅😅😅😅😅 Legendary man hahaha

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

    I would like to donate 1000 Likes for this tiny but quite creative project. That's the knowledge in our soul that how we use javaScript in creative way. Thank you Ed.

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

    12:06 the whitespace between Fancy and Schemnzy disappeared. Any reason for it ??

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

    This is AMAZING !!
    Thank you so much for the great fun content ❤️

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

    If for some reason the animation doesn't work, use this line in your code
    .fade:not(.show) {
    opacity: 1;
    }
    i wish that help someone!
    pd: Thank for share this knowledge Dev Ed

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

      Thanks buddy it hepled me😁😃🌝

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

      tks, very helpfull, i have the same issue. I dont know why, so im very pleased if someone explains me that.

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

    I love how enthusiastic you are. Thanks man great tuts.

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

    Great video as always!
    Thanks, and happy new year!

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

    Happy new year bro... thank you so much for everything 🥳🎉 love the way you speak...feels like Jim Carrey teaching Javascript lol 😀

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

    Happy New Year our gorgeous friend!! 🤩
    See you in 2020!

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

    Happy holidays Ed! Ty for all of your tuts! 🎉🎉

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

    ED you are amazing. All the best in New Year, happy holiday and I cant w8 for new video.

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

    happy holiday ed and thank you for your education, it really help me to understand about web design.. keep going mate

  • @DavronFrontedDeveloper-
    @DavronFrontedDeveloper- 11 หลายเดือนก่อน +1

    Thank you bro i will do this it amazing bro : )

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

    10:06 " Compiler error : an expecting ; is missing x) ", thank you for the explanation you are the best

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

    I always love your tutorial! Thank you very much. You're a great developer

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

    Happy New Year Ed! Keep up the good work.

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

    You really made an impressive work man! Keep doing bud. Happy new year!

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

    Happy holidays and happy New year to you , Sir.

  • @AnonymousUser-vd2st
    @AnonymousUser-vd2st 5 ปีที่แล้ว

    Thank you so much! Happy New Year Fancy Teacher! 🙏

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

    You are a very good teacher and i love all of your videos =) Happy New Year and best wishes from my little island, Reunion Island in Indian Ocean =)

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

    I'm learning to code and the same time learning English with you haha
    Gracias por tus clases
    Thank you for everything
    Happy New Year

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

    I missheard tech channel to pet channel. I got so excited..

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

    Your ending was great....

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

    I'm in love with gsap, but this is way cool. Happy New Year friend, new sub looking forward to your work into 2020.

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

    That was gorgeous :3

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

    Awesome video... When it comes to css we need to constantly watch and practice and keep these projects in shelf

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

    Happy New Year , my friend

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

    i am a new fan! Love your videos!

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

    With use of inline-block..The space has been lost between the names..!!! Very very good content..!! Lots of love from india..!! 😍😍😍😍

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

    thanks for making more javascript tutorials

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

    nice short practical tutorial ed my georgous friend

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

    My Christmas presents were empty too... until you posted this video :)

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

    Well happy New year to you too mate hope it's a blast for you🎉🎊

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

    wow, it was super interesting! thank you for all your tutorials!

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

    This is really great Ed. Thank you so much for the time!

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

    Great tutorial, thank you for this! I implemented it on my portfolio website.

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

    Thank you very much ! You are magician ! I love putting animation effect on my website.

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

    🔥👏🏻thank you for all the cool tutorials!

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

    Its works perfectly for my h2 tag but when i tried for my small paragraph its literally joins with my heading and becomes single line . Me trying to fix it but cant can anyone help?

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

    The best thing to start the morning. Thank you :)

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

    I’m astonished that you can type code while talking without any breaks and mistakes. How did you do that?🤩

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

      Practice

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

    You're a role model♥️❤️♥️❤️♥️

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

    I am watching this today and I got a new year wish :))

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

    on my, you make complicated things very easy, thank you so much. You are awesome.

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

    I was following this tutorial very carefully but at the end when you said "fill it in baby", I just lost it then. 😂

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

    Nice hair style deved..👌

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

    best notification...

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

    He needs a t-shirt with a "y u do tis" quote

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

    Happy New Year. Look forward to more shenanigans

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

    Thanks, Happy New year

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

    Would love to see more videos like this. See you in 2020!

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

    working on a project will this will fit in so perfectly! Thanks!!!

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

    give the span a min-width to 2px for the space between words to remain intact

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

    Thanks so much. I learnt a lot from this tutorial.

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

    Thanks for the Inspiration! Legendary videos!

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

    You are just simply Superb✌Great work🙌

  • @空白-o9q5z
    @空白-o9q5z 5 ปีที่แล้ว +1

    いつも日本から観てます。
    thank you!!

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

    13:17 "WOW! ...Like, share & subscribe..." 😂😂😂

  • @쎄쌤독일어
    @쎄쌤독일어 4 ปีที่แล้ว

    Vielen Dank für deine tollen Videos. Your passion and devotion are contagious and your awesome videos and they are sooo very helpful =D

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

    Love the wolverine hairstyle

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

    display inline-block eats up the space we had between the two words. Kept banging my head for 30 mins but later saw it's happening in your case too. Any reason on why this is happening?

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

    thanks dude it's really worked :)

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

    I love this tutorial. How would you create a space between the words? I noticed towards the end steps that the text was all together.

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

      add   between the words

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

    you are amazing and hilarious💙 jingle bells!

  • @patrickc.6183
    @patrickc.6183 5 ปีที่แล้ว

    Awesome effect!

  • @ManojSingh-of5ep
    @ManojSingh-of5ep 5 ปีที่แล้ว

    You are the best.. Love your videos

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

    Thanks eds but i think we can do it with keyframe animation as well and it would be more simple
    Create span for each letter and then set positions and into keyframes we can set position top with opacity for our effect.

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

    Thank you for this tutorial!

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

    Thanks. But any fix for those spaces between text?

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

    Flipping awesome.

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

    sir please teach the detailed version of the famous vanilla tilt js 3d pralax effect and all that

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

    this was great thank you so much!!

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

    GREAT TUTORIAL! I loved every second of it! :) :)
    Anyone knows how to put spaces between the words??

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

    Whats the music starting at 1:37? Great song, but I definitely think you should include credits for your vids.

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

    thank bro, u saved my 2hours ))

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

    Hey Ed. I really like your style and videos. But, like, I don't know how skillful you are in JS, because you used *3* different variables in order to get the into an array of chars.... you could literally just do it all on the same variable: const splitedText = document.querySelector('.fancy').textContent.split('');
    It may be a little verbose, but it's actually way easier and more efficient.
    Anyways, I love your videos - looking forward for 2020!!
    Tomer.

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

      Not sure about your proficiency as well. You need to have your code reusable and readable
      In this particular example your approach will work, however it’s not really the recommended one.

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

      @@karlmalks3787 How come? My code works, and it's way more concise and efficient..

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

      Tomer Shechner working does not necessarily mean it’s readable and reusable. if(var.toString().len() == 4) {
      return true;}
      This will check the Boolean true, it’s working
      Is it good though ? :)

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

      @@karlmalks3787 No, because you could've just do: return var.toString().len() === 4;

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

      Tomer Shechner haha
      You could if(var) and that’s it.

  • @alberto.polini
    @alberto.polini 5 ปีที่แล้ว

    Great, i was looking for some nice text animation effect😊

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

    That's really cool.

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

    "fill it in baby, fill it right up"