No video

JavaScript Tip: Using Data Attributes

  Рет қаралды 29,567

All Things JavaScript, LLC

All Things JavaScript, LLC

Күн бұрын

Пікірлер: 42
@niloofar9113
@niloofar9113 2 жыл бұрын
I finally understand thanks to you thank you🙌
@AllThingsJavaScript
@AllThingsJavaScript 2 жыл бұрын
Glad I could help!
@davorperic3577
@davorperic3577 3 жыл бұрын
Great explanation, thank you sir :)
@liyan542
@liyan542 5 жыл бұрын
Great tutorial! The forEach() should use lis_array instead of lis. Array.prototype.forEach() can only apply to arrays, not array-like objects.
@AllThingsJavaScript
@AllThingsJavaScript 5 жыл бұрын
You are correct. I converted to an array and then used the wrong variable.
@jessicaryan9820
@jessicaryan9820 3 жыл бұрын
Brilliant, thank you! This is going to make web animation a lot easier
@AllThingsJavaScript
@AllThingsJavaScript 3 жыл бұрын
Glad it helped!
@MultiNAME69
@MultiNAME69 2 жыл бұрын
Thank you very much.
@nixonnelson8856
@nixonnelson8856 6 жыл бұрын
Sir you are great . But had a doubt , U converted Node list into array but you didnt use forEach on the new array still it worked ??
@AllThingsJavaScript
@AllThingsJavaScript 6 жыл бұрын
I rewatched that portion of the tutorial and you are correct. That is a mistake. I used the wrong variable. It looks like forEach will function on a nodeList, which I was not aware of, but I believe other Array methods will not. Sorry about the confusion.
@usmanabdurehman97
@usmanabdurehman97 5 жыл бұрын
Nodelist,HTML collection and normal array etc are iterable using any loop may it be for, while or the forEach method
@BryanGranseDevs
@BryanGranseDevs 7 ай бұрын
Still good video this 2024
@joshrandall3663
@joshrandall3663 4 жыл бұрын
Clear explanation!
@gbbowler
@gbbowler 4 жыл бұрын
Curious about first couple of lines in your JS file. They are: let lis = document.querySelectorAll('li'); let lis_array = Array.from(lis); You never use the variable lis_array anywhere in your code after that, so why did you define it? I"m working on something now using the data- attribute. I left that second variable out of my code, and it works just fine. BTW, I love your vids. I'm also taking one of your courses on Udemy.
@AllThingsJavaScript
@AllThingsJavaScript 4 жыл бұрын
Great question. I think I just forgot to use it. Basically that line is converting the list of elements to an array. This would be very helpful if you needed to use array methods, so it is a common practice for me. However, many things work on the array-like collection like forEach, so it was unnecessary.
@mickwhyte4204
@mickwhyte4204 3 жыл бұрын
Always very helpful. Many thanks.
@akira557
@akira557 6 жыл бұрын
thank you!
@phanindrakumarpulletikurti
@phanindrakumarpulletikurti 6 жыл бұрын
awesome lecture.
@somashekarbagurthippeshapp2389
@somashekarbagurthippeshapp2389 3 жыл бұрын
Thank you sir
@rogerh2694
@rogerh2694 5 жыл бұрын
You used the forEach() method on the node list (lis) not the array (lis_array) but your event listeners still worked...?? Update: still works on the node list lol
@AllThingsJavaScript
@AllThingsJavaScript 5 жыл бұрын
forEach will work on any iterator. A node list is one, so that is why it still worked.
@NixTheG0at
@NixTheG0at 5 жыл бұрын
For NodeList , forEach works, but for HtmlCollection doesnt
@jainshilpi3
@jainshilpi3 6 жыл бұрын
Could you pls make video for call bind apply methods?
@NedumEze
@NedumEze 2 жыл бұрын
Thank you sir. So helpful. I must be doing something wrong. Can't get my own code to work. Could I share it with you? Maybe, you'd spot my mistakes. Please.
@AllThingsJavaScript
@AllThingsJavaScript 2 жыл бұрын
Sure, post it here.
@NedumEze
@NedumEze 2 жыл бұрын
@@AllThingsJavaScript Ah! Bless you sir. I've got sorted now. Thrilling to see it working. Thank you so much for offering to help sir. I hope I can reach out to you if I run into any more brick walls?
@muhammadsafiullah8428
@muhammadsafiullah8428 5 жыл бұрын
Thanks!
@seenuvasanv
@seenuvasanv 6 жыл бұрын
Thanks
@YoungmeePark1103
@YoungmeePark1103 3 жыл бұрын
Super!!
@adicide9070
@adicide9070 3 жыл бұрын
a bit faster, though, would be greeeeaaaat. cheers.
@rayna.v
@rayna.v 3 жыл бұрын
change the playback speed.
@jainshilpi3
@jainshilpi3 6 жыл бұрын
Can u please make some video related with javascript datastructure?
@AllThingsJavaScript
@AllThingsJavaScript 6 жыл бұрын
Can you explain what you are referring to for javascript datastructure videos?
@jainshilpi3
@jainshilpi3 6 жыл бұрын
data structures like queues an stacks, etc using objects and arrays?
@AllThingsJavaScript
@AllThingsJavaScript 6 жыл бұрын
I have a number of tutorials on both objects and arrays. I have a specific playlist on objects and there are numerous other tutorials on both objects and array.
@jainshilpi3
@jainshilpi3 6 жыл бұрын
means topic relater with linked list stack queue?
@ironhide9955
@ironhide9955 4 жыл бұрын
@@jainshilpi3 could you please share me the links if you have found some useful videos related to javascript datastructure?
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
The other day I heard from a c++ coder that web coders are not programmers, or not even developers! Because he asserted web doesn't have logic and algorithms have nothing to do with web! I don't know under which rock he was all these years or in which cave he was been hiding! Anyway, I hope he sees this channel, and comes out of his grave delusion. And choose a photo for channel icon or whatever it is for god sake! It looks darn bad like this!
@AllThingsJavaScript
@AllThingsJavaScript 4 жыл бұрын
I think most people have been corrected of that misperception, but I guess there are still some out there. Google keeps wiping my channel photo. It is a bit frustrating. Not sure what is going on.
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
@@AllThingsJavaScript Thanks for answering me. The removal of your channel photo might be due to copy right infringement. Just put some original photo which you've made it yourself. For example your beautiful face! You have a beautiful voice and because you're contributing to humanity a great deal your soul must be beautiful too. So I'm sure your face is beautiful! Then putting your own face for the icon of your channel is a good option bro!
@AllThingsJavaScript
@AllThingsJavaScript 4 жыл бұрын
Thanks for the suggestion. I don't know how beautiful my face is, but that was the picture I've had up and have tried to load multiple times again. I'm not sure what is going on, but still trying to figure it out.
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
@@AllThingsJavaScript So maybe you're too good looking that it raises powerful people jealousy, so they remove your picture! Like snow white and seven dwarfs and that darn magic mirror and that nasty queen who couldn't bear someone more beautiful than her!😂 Take care of yourself bro!
JavaScript Tip: Loading an External XML File
13:04
All Things JavaScript, LLC
Рет қаралды 27 М.
Understanding JavaScript Callbacks
15:39
All Things JavaScript, LLC
Рет қаралды 115 М.
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 45 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН
Learn JavaScript DOM Traversal In 15 Minutes
14:44
Web Dev Simplified
Рет қаралды 223 М.
JavaScript Problem: Creating a JavaScript Tooltip: Part 1
18:20
All Things JavaScript, LLC
Рет қаралды 14 М.
Using HTML5 Data Attributes in JavaScript and CSS Tutorial
8:26
OpenJavaScript
Рет қаралды 3,2 М.
JavaScript Problem: Combining and Sorting Objects in an Array
21:39
All Things JavaScript, LLC
Рет қаралды 4,7 М.
JavaScript Tip: Understanding the Mutability of JavaScript Objects
11:43
All Things JavaScript, LLC
Рет қаралды 10 М.
How to use the DATA attribute with JavaScript, HTML and CSS.
10:10
iEatWebsites
Рет қаралды 14 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 353 М.
JavaScript: Data Attributes
16:05
WebDevTube
Рет қаралды 8 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 45 МЛН