Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
korzo
@korzo
@moT01 you can use getElementsByTagName('ul')[0].appendChild() as long as you are sure at lest one element exists
Gersho
@Gersho
i usually put id to stuff like that, so you don't get screwed when you add stuff later
Nate Mallison
@NJM8
yup, the tutorial I'm looking at suggested using querySelector but i don't like that, too vague.
Tom
@moT01
yea, that's something to keep in mind - if you add another ul and it's before the one you're trying to target - it will mess things up
Nate Mallison
@NJM8
if the ul has a class can't you do something like querySeletor("ul .insertclassnamehere")
Gersho
@Gersho
don't know that works in js, try it and let us know :p
Nate Mallison
@NJM8
thats a no.
Gersho
@Gersho
thanks @NJM8
CamperBot
@camperbot
gersho sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @njm8 |http://www.freecodecamp.com/njm8
Nate Mallison
@NJM8
I guess if it has a class you would just search for that class with getElementByClassName.
Gersho
@Gersho
plural
you'd have the same issue than getElementsByTagName
Nate Mallison
@NJM8
well, so querySelector(element class) actually searches the children of the found element with that class name
korzo
@korzo
@NJM8 I would say it should work
parameter is CSS selector
Nate Mallison
@NJM8
so if you had a ul, and the first li has a class of first, you can find it with querySelector("ul .first");
korzo
@korzo
@NJM8 yes
Long Nguyen
@longnt80
@NJM8 so it's not vague at all
Gersho
@Gersho
but it would aim the li, not the ul
Usman
@halohah
@khaduch thanks!
CamperBot
@camperbot
halohah sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3334 | @khaduch |http://www.freecodecamp.com/khaduch
Usman
@halohah
@piteto Thanks! This actually helps understands some things.
linkin-park
@linkin-park
hi all
Fabien SHAN
@X140hu4
hi
linkin-park
@linkin-park
damn i'm working all alone again on redoing a page from scratch :) just 1 day left :/
i really need your help on this :)
can use css grid or bootstrap ?
linkin-park
@linkin-park
@X140hu4 any thoughts ?
Umurerwa
@Umurerwa08
Hello Fellow campers,
I am stuck on my first project of building a tribute page, can anyone help me as I am inserting a picture into the codes but it's not displaying.
Henry
@GitHub-Henry
@Umurerwa08 Hope this helps
linkin-park
@linkin-park
:'D
Long Nguyen
@longnt80
@linkin-park what do you mean one day left?
linkin-park
@linkin-park
good question @longnt80 i need to do a reverse engineer some site and i have a day left for my homework
Long Nguyen
@longnt80
@linkin-park what are the requirements?
linkin-park
@linkin-park
they have given a website :)
cant share the link of the website , since its given never share site online for the purpose of homework - guidelines todo homework :(
Long Nguyen
@longnt80
@linkin-park I'd say do it with vanilla css using css grid
don't use bootstrap
linkin-park
@linkin-park
my question is what if the old browser didnt support grid :?
Long Nguyen
@longnt80
how old
linkin-park
@linkin-park
not sure about that :fire:
Long Nguyen
@longnt80
@linkin-park you can apply progessive enhancement method
linkin-park @linkin-park googles progressive enhance......
Long Nguyen
@longnt80
write styles that support old browsers, then ..
use feature query to write css that can make use of css grid
so basically, old browsers that don't support grid will look different
something like this:
/* css for old browsers */

@supports (display: grid) {
    /* css for grid supported browsers */ 
}