Event listener in javascript

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 59

  • @HiteshCodeLab
    @HiteshCodeLab  4 роки тому +5

    Full course is FREE and will be available here
    courses.learncodeonline.in/learn/Complete-Javascript-course

    • @manasraikaushik864
      @manasraikaushik864 4 місяці тому

      We dont have access to any of the attachments you provided, what is the need to keep video free ? just do it paid too ...

  • @saibhanumathurthi903
    @saibhanumathurthi903 4 роки тому +6

    Hitesh sir, I'm a fan of the way you teaches everything✋

  • @dinesh0743
    @dinesh0743 4 роки тому +1

    Best javascript series ever.., on UA-cam.

  • @aarushgoyal
    @aarushgoyal 4 роки тому +1

    Signs that you have become a Pro UA-camr :
    You start finding innovative methods for Subscribe Appeal

  • @afamsval
    @afamsval 4 роки тому +2

    Thank you so much for this video. I am really enjoying the quality of the video .

  • @techiesrikanth2447
    @techiesrikanth2447 4 роки тому +1

    Thanks for Amazing course Hitesh !!

  • @rajkumarv.b565
    @rajkumarv.b565 Рік тому +1

    Here's my version of the logic :
    const red = document.querySelector(".red")
    const cyan = document.querySelector(".cyan")
    const violet = document.querySelector(".violet")
    const orange = document.querySelector(".orange")
    const pink = document.querySelector(".pink")
    const center = document.querySelector(".center")
    const getElementBGColor = (Element) => {
    return window.getComputedStyle(Element).backgroundColor
    }
    const magicColorChanger = (element) => {
    element.addEventListener("mouseenter",() => {
    center.style.background = getElementBGColor(element)
    })
    }
    magicColorChanger(red)
    magicColorChanger(cyan)
    magicColorChanger(violet)
    magicColorChanger(orange)
    magicColorChanger(pink)
    magicColorChanger(center)

  • @gauravnag9046
    @gauravnag9046 4 роки тому +2

    Hi SIr,
    Thank you for explaining concept.
    But please clarify if there are 10 colors, then we need to write magicColorChanger() 10 times. Instead of it can we pick the colors dynamically with less number of code lines. If yes, pls guide on that

  • @gunvantchandratre8333
    @gunvantchandratre8333 4 роки тому +1

    Really Nice Video Sir 👌

  • @redemption4836
    @redemption4836 2 роки тому +2

    What exactly does the element in magiccolorchanger does if the color part grabs the actual color?

  • @monusingh3719
    @monusingh3719 4 роки тому +2

    Sir you told to always use return while using curly braces in arrow and callbacks so here at 6:05 at line 17 you are not using return keyword......pls tell

    • @meetsakhareliya755
      @meetsakhareliya755 3 роки тому +2

      In function we do not always return. Whenever there is case in which function returns something , if we put braces we have to write return. if there is nothing to return , no need to write return weather it is a simple function or arrow function. I hope you understand my point

  • @soumeshk
    @soumeshk 4 роки тому +3

    Which VS Code theme do you use?

  • @vivekhridayanandverma854
    @vivekhridayanandverma854 4 роки тому +2

    Hitesh sir doing good with your current running course with js thanks for this.
    In this project I am getting type error like failed to execute getComputedStyle on Windows...parameter 1 is not type of element #error
    I used setBGColor but i am able garb first only rest of not able to grab...please suggest about error

  • @bobcoderz
    @bobcoderz 4 роки тому +3

    Hey Sir can you share how you configure vscode :)

    • @aarushgoyal
      @aarushgoyal 4 роки тому

      @Unique Rohit Patil I guess he is talking about the custom color scheme of Hitesh sir

  • @sivasai6890
    @sivasai6890 4 роки тому

    Thanks a lot sir for free course

  • @manojkumarm8398
    @manojkumarm8398 4 роки тому +1

    hearty thanks fr this

  • @Ravi-oh8xz
    @Ravi-oh8xz Рік тому

    Enjoyed the project ❤️❤️

  • @ankushladani496
    @ankushladani496 Рік тому

    Thank you sir...

  • @robot67799
    @robot67799 2 роки тому

    Amazing

  • @sreeramp6688
    @sreeramp6688 3 роки тому

    Nice nd Easy!!

  • @milankbudha
    @milankbudha 4 роки тому +1

    plz provide source code also..It will be more easy for us to copy in our text editor directly rather than making a note in a copy .It will save our time..Thank you

  • @JoyKimaiyo
    @JoyKimaiyo 9 місяців тому

    Hi, Hitesh I cannot access your website. Is it location wise or just the website cannot be accessed for everyone?

  • @somitdas7740
    @somitdas7740 4 роки тому +1

    Hi!
    @hitesh sir
    As i can see this playlist contains videos till the number 37 and further from 38 its private. WHhy is that so?

    • @aarushgoyal
      @aarushgoyal 4 роки тому

      he has made the entire playlist but is releasing one video a day

  • @vraj3115
    @vraj3115 4 роки тому

    #10minutesJS day 35! and not sleepy anymore !!

  • @darkalpha6530
    @darkalpha6530 3 роки тому +2

    Sir can we use the CSS property ":hover" to make it do all the things you told in this video?

    • @rellaraffick
      @rellaraffick 3 роки тому

      Technically, yes we can. As we can see Tooltips on hover, Popups on hover works that way too. Sir has performed like in the video just for an example. That's a great question mate ! Keep it up & All the best

  • @rajeshveeranki3517
    @rajeshveeranki3517 Рік тому +1

    HI this is CSS content.!!
    body {
    background: rgb(66, 66, 66);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    }
    .red {
    background: #e44236;
    margin-right: 5px;
    }
    .cyan {
    background: #25ccf7;
    margin-right: 5px;
    }
    .violet {
    background: #8b78e6;
    margin-right: 5px;
    }
    .orange {
    background: #ea7773;
    margin-right: 5px;
    }
    .pink {
    background: #bb2cd9;
    }

    .center {
    min-width: 400px;
    height: 400px;
    background: rgb(66, 66, 66);
    border-radius: 100%;
    transition: 0.2s ease-in-out all;
    }
    .color-hover {
    position: absolute;
    top: 10%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    display: flex;
    justify-content: center;
    flex-direction: row;
    }
    .text {
    padding: 10px;
    color: #ffffff;
    }
    .color {
    width: 120px;
    height: 30px;
    border-radius: 5%;
    margin-bottom: 30px;
    }
    .color:hover {
    cursor: pointer;
    }
    .color:last-child {
    margin-bottom: 0;
    }

  • @vijaynavale3919
    @vijaynavale3919 4 роки тому

    Keep going 👍

  • @anbazhagan6826
    @anbazhagan6826 4 роки тому

    This is... This is .. awesome.😍

  • @ajaypathak2214
    @ajaypathak2214 4 роки тому

    Why getComputedStyle not working with getElementsBy---. ?

  • @willowayya
    @willowayya 4 роки тому

    Dear sir with only one programming language can be job get or not ? I m on JavaScript

  • @NIDHISHARMA-ep6nc
    @NIDHISHARMA-ep6nc 3 роки тому

    Tysm sir

  • @tusharvashisht5
    @tusharvashisht5 4 роки тому +1

    day 3 still stuck on this

  • @wasimrajamiddya7560
    @wasimrajamiddya7560 2 роки тому

    Sir will I get certificate after completing this course?

  • @085-vaibhavgusain9
    @085-vaibhavgusain9 3 роки тому

    same funtionality
    const colorName = [".red",".cyan",".violet",".orange",".pink"]
    colorName.forEach((item) => {
    document.querySelector(item).addEventListener("mouseenter",() =>{
    document.querySelector(".center").style.backgroundColor = window.getComputedStyle(document.querySelector(item)).backgroundColor;})
    });

  • @unboxinggadgets4105
    @unboxinggadgets4105 4 роки тому

    they not show me same color, they show black color why?

  • @manyasingh7112
    @manyasingh7112 4 роки тому

    Love u pajji

  • @sufism48
    @sufism48 4 роки тому

    from where i can get this code file?

  • @kunalahuja4307
    @kunalahuja4307 4 роки тому

    Something on Post messages please!

  • @unboxinggadgets4105
    @unboxinggadgets4105 4 роки тому

    sir plz show your div center css properties

    • @sudarshanjha6737
      @sudarshanjha6737 3 роки тому +1

      Make body flex and add align item and justify content center ..
      Fir normal .center{
      Height : 5rem;
      Width : 5rem
      Border-radius: 50%}

  • @VikramSingh-qg3nh
    @VikramSingh-qg3nh 3 роки тому

    this was the 1st one i was unable to get output :( can you help me

  • @AgarwalAnup95
    @AgarwalAnup95 4 роки тому +1

    First

  • @Mrvijay-z7k
    @Mrvijay-z7k 8 місяців тому

    plz turn of add's

  • @rajeshbagguva3005
    @rajeshbagguva3005 4 роки тому +1

    second

  • @gurdeepsinghjohar1761
    @gurdeepsinghjohar1761 4 роки тому

    Bro i need core java tutorial.🙂

  • @udittyagi9238
    @udittyagi9238 4 роки тому

    Third

  • @abhichi
    @abhichi 2 роки тому

    Mr beast and u look so much similar 🤔😂

  • @riteshpuley2891
    @riteshpuley2891 4 роки тому

    Amazing