How to use the DATA attribute with JavaScript, HTML and CSS.

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ • 35

  • @abcdabcd8605
    @abcdabcd8605 9 місяців тому +1

    amazing explanation on Data attribute

  • @RenoBasque
    @RenoBasque 2 роки тому +5

    Something basic which is explained just the way it's supposed to be. Thanks a lot 👍👍👍

  • @StrikingCommoner
    @StrikingCommoner Рік тому +2

    very neatly explained. Keep it up dude 👍👍

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

    I swore those events would've been 7 months apart :) Seriously though - here's place where we could also attach the HTML "hidden" attribute. Nice tut - thanks.

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

    Nice work J! I'm a fan of data attributes. I believe we've even worked together on something a lot like the example in this video.

  • @sumdev4983
    @sumdev4983 2 місяці тому

    Great video! I subscribed instantly.

  • @maskman4821
    @maskman4821 Рік тому +2

    Great tutorial 👍

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

    I like the way you do your tuto simple explanation

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

    great explanations about DATA attribute thanks

  • @iannelson2521
    @iannelson2521 2 роки тому +1

    best teacher👌

  • @bryanDevsJS
    @bryanDevsJS 2 роки тому +1

    great video man thanks

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

    Great video thank you!

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

    Nice one! Thanks keep it up.

  • @mjylove2
    @mjylove2 20 днів тому +1

    so gooood

  • @isakwberg
    @isakwberg 10 місяців тому +1

    i understood how to use the data-attributes in the javascript. but not why you would like to set (or hardcode?) things into the html. i assume this is super logical but i dont get it XD.
    is it for when you dont have access to the database from the front-end?

    • @PujaAdhikari-t3h
      @PujaAdhikari-t3h 4 місяці тому

      you can still dynamically set the attribute using a backend language

    • @mervinmarias9283
      @mervinmarias9283 Місяць тому

      By using data attributes you make information relevant instead of having strings that mean nothing. That means you can target information much easier. It also allows you to overload(as in set alternative meanings) to other attributes. For example you can't start id attributes with numbers, however there's nothing preventing you from creating data-id's that store actual ID or social security numbers. Essentially you are working with information that is already present in the html, so there's no need to go back to the server to retrieve or manipulate it. It is an extremely powerful tool that is only limited by your imagination.

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

    Fantastic 👍👏

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

    how are you bringing up that pop up stuff in vs code while coding?

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

    thank you so mush bro

  • @sabbir099
    @sabbir099 Рік тому +2

    Teach me web design bro. I will give you my one years of earning.

  • @محارب-ه4ذ
    @محارب-ه4ذ 8 місяців тому

    thanks dude

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

    Thanks Bro. Please spend a bit more time on combining the datasets and Event Handling. Please.

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

    hey whats ur chrome theme

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

    Farang speak Thai to me.