Комментарии:
Hi NetNinja! I have a question, can I change CSS style changing it with textContent instead of .style property? Like add for example: backgroundColor = "limegreen"; using textContent instead of style = "background-color: limegreen"?
ОтветитьAwesome!
ОтветитьThanks man
ОтветитьIf you have a video on that question, please tell me
ОтветитьBut I wanted change CSS after pressing a button
ОтветитьAm getting uncaught typeerror cannot set property display of undefined when I use :
todo.style.display='flex';
I used querySelector to get the div and stored it in const todo.
Where am I going wrong??? Please help me please... I've been stuck on this for the past 10 days.. am going crazy.
Thank you very much for this video! It was really clear and helpful! Great to see how it shows how Javascript converts the properties with "-" (e.g. background-color) to camel case. Didn't know that till now! :)
ОтветитьBig Ninja
Ответитьsir, setAttribute cannot be used for a class? if no what is to be used to change the styles. As I am getting a constant error as class.setAttribute(my defined function) is not a function... you have only told about ids
ОтветитьYou are worthy of your title, "The Net Ninja"
ОтветитьMy only question is THANK YOU
Ответитьjust a small comment (as I don't think it can be fixed), but the last several video when you're typing it can't be seen because it below the bottom of the screen. Still thumbs way up (because it doesn't let me click it 2x) for great explanations.
ОтветитьThanks lot...
Ответитьthanks a lot , just i have question , could you recommend me a book for a js
Ответитьhow to dynamically change css file using javascript ?????
ОтветитьCouldn't thank you enough Sir!
ОтветитьYou have made me feel so much more confident man about JavaScript, I'm pretty good at Html/Css(steady improving), have always been really afraid I couldn't understand the logic of JavaScript, thank you so much man!
Ответитьgreat 👌
Ответитьthank you this is a very helpful video
Ответитьhow to give hover style in js
also how to fix parentelement undefined problem
You are awesome.
At last, I understand JS.
Quickly and simply, this is that what i needed
Net Ninja just makes these videos as an excuse to teach us and do some development of his website at the same time XD
ОтветитьFor adding classes instead of replacing them, we can use
title.className += " " + "your_class_name_here"
The space preceding is important because js concatinates it with the previous class
Thanks for the clear short tutorials. What would be a practical use for this? Apart from changing elements in the console window?
ОтветитьBest net ninja teacher ever. JS so simple thanks to u. THANK YOU
ОтветитьI had been beating my head up against a rock trying to comprehend the basics of JS and your channel helps tremendously. Thank you! And lovely accent.
Ответитьsuper tutorials-- THANK YOU
ОтветитьWhen viewing the "text" list for style, the property is referenced as "background-color," but when setting the attribute it's camel cased without a hyphen (which is logical as attribute names cannot have hyphens as these would be minus signs). Is inconsistency here to keep the riff-raff out?
ОтветитьFor the first example, would it be the same to put "title.style.position = 'relative';" ?
ОтветитьThanks for this! Quick question though - if your CSS is stored in a linked .css file, will this update it there or just enter the new styles in the HTML?
Ответить