These are chat archives for FreeCodeCamp/HelpFrontEnd

3rd
Oct 2017
@Zerka1982 without looking at the code - make a class and add or toggle it when its clicked
class that keeps it the full width
Lucci Paula
@luccipaula
Oct 03 2017 00:25 UTC
@Zerka1982 I think maybe you could do with less divs for each anchor item
anyone wanna test out my snake game? https://s.codepen.io/moT01/full/eGvXqq/
Lucci Paula
@luccipaula
Oct 03 2017 01:09 UTC
@moT01 It's cool but too fast for me haha
My highest score was only 900 😅
thanks @caixeta-paula , keep practicing
CamperBot
@camperbot
Oct 03 2017 01:12 UTC
mot01 sends brownie points to @caixeta-paula :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @caixeta-paula |http://www.freecodecamp.com/caixeta-paula
Gersho
@Gersho
Oct 03 2017 01:12 UTC
1600, isn't the grid smaller than usual snake ? i don't really remember
i dont know
you can play with the numbers if you want
dimensions would change the size - just make sure you can divide the skale into dimensions or it might break
framerate at the bottom will change the speed
korzo
@korzo
Oct 03 2017 01:17 UTC
@moT01 You should focus canvas on load, otherwise keys doesn't work unless you click on the body
i noticed
im looking into it
@korzo @Gersho thanks for checking it out
CamperBot
@camperbot
Oct 03 2017 01:23 UTC
mot01 sends brownie points to @korzo and @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 570 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 497 | @gersho |http://www.freecodecamp.com/gersho
Gersho
@Gersho
Oct 03 2017 01:24 UTC
checking videogames ? always
did you have one of those old nokia's with snake?
Gersho
@Gersho
Oct 03 2017 01:31 UTC
of course, snake2
i maybe should have made it light ugly green and dark ugly green to stay true
Gersho
@Gersho
Oct 03 2017 01:34 UTC
had a 31 10, then a 33 30
only need to charge it once a week anyway
korzo
@korzo
Oct 03 2017 01:37 UTC
After this I had Erricson t68, then Nokia 7650, Nokia 6600
thats some classic stuff right there
does that thing even have two colors? or is it just one on a static background
Gersho
@Gersho
Oct 03 2017 01:38 UTC
it did levels of gray, like a gameboy iirc
but maybe only black and white
korzo
@korzo
Oct 03 2017 01:39 UTC
@moT01 It has only levels of grey. It was revolution anyway.
Nate Mallison
@NJM8
Oct 03 2017 01:39 UTC
Hello, I have a basic DOM manipulation question. I am trying to find an element like and ordered list then add another list item to it using appendChild. If I search for the list using getElementByTagName, appendChild does not work, I get a type error (appendChild is not a function). However if I select the list using querySelector then appendChild works just fine. What is the difference?
Gersho
@Gersho
Oct 03 2017 01:39 UTC
i did have one where the "wallpaper" was an image behind the screen, visible even when phone off
do you have multiple of that tag?
@NJM8
korzo
@korzo
Oct 03 2017 01:42 UTC
@NJM8 getElementByTagName returns collection
@NJM8 querySelector first element
Gersho
@Gersho
Oct 03 2017 01:43 UTC
so getElementsByTagName[0] ?
mdn is showing me it's getElementsByTagName
Gersho
@Gersho
Oct 03 2017 01:44 UTC
plural
korzo
@korzo
Oct 03 2017 01:44 UTC
yep, I was copypasting
Nate Mallison
@NJM8
Oct 03 2017 01:44 UTC
I see, getElementsByTagName is an array of those elements with that tag, and querySelector is the actual elements
*element
not sure that syntax would work but, maybe if you did it on the var or after you put the tag in @Gersho
korzo
@korzo
Oct 03 2017 01:45 UTC
@moT01 As it returns collection, it works..as long as collection is not empty
var tags = getElementsByTagName('ul');
tags[0].append...
something like that maybe?
Nate Mallison
@NJM8
Oct 03 2017 01:46 UTC
that seems to work
korzo
@korzo
Oct 03 2017 01:46 UTC
@moT01 you can use getElementsByTagName('ul')[0].appendChild() as long as you are sure at lest one element exists
Gersho
@Gersho
Oct 03 2017 01:47 UTC
i usually put id to stuff like that, so you don't get screwed when you add stuff later
Nate Mallison
@NJM8
Oct 03 2017 01:48 UTC
yup, the tutorial I'm looking at suggested using querySelector but i don't like that, too vague.
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
Oct 03 2017 01:50 UTC
if the ul has a class can't you do something like querySeletor("ul .insertclassnamehere")
Gersho
@Gersho
Oct 03 2017 01:51 UTC
don't know that works in js, try it and let us know :p
Nate Mallison
@NJM8
Oct 03 2017 01:52 UTC
thats a no.
Gersho
@Gersho
Oct 03 2017 01:52 UTC
thanks @NJM8
CamperBot
@camperbot
Oct 03 2017 01:52 UTC
gersho sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @njm8 |http://www.freecodecamp.com/njm8
Nate Mallison
@NJM8
Oct 03 2017 01:53 UTC
I guess if it has a class you would just search for that class with getElementByClassName.
Gersho
@Gersho
Oct 03 2017 01:54 UTC
plural
you'd have the same issue than getElementsByTagName
Nate Mallison
@NJM8
Oct 03 2017 01:55 UTC
well, so querySelector(element class) actually searches the children of the found element with that class name
korzo
@korzo
Oct 03 2017 01:55 UTC
@NJM8 I would say it should work
parameter is CSS selector
Nate Mallison
@NJM8
Oct 03 2017 01:56 UTC
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
Oct 03 2017 01:57 UTC
@NJM8 yes
Long Nguyen
@longnt80
Oct 03 2017 01:57 UTC
@NJM8 so it's not vague at all
Gersho
@Gersho
Oct 03 2017 01:57 UTC
but it would aim the li, not the ul
Usman
@halohah
Oct 03 2017 05:54 UTC
@khaduch thanks!
CamperBot
@camperbot
Oct 03 2017 05:54 UTC
halohah sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3334 | @khaduch |http://www.freecodecamp.com/khaduch
Usman
@halohah
Oct 03 2017 05:55 UTC
@piteto Thanks! This actually helps understands some things.
linkin-park
@linkin-park
Oct 03 2017 06:50 UTC
hi all
Fabien SHAN
@X140hu4
Oct 03 2017 06:53 UTC
hi
linkin-park
@linkin-park
Oct 03 2017 06:57 UTC
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
Oct 03 2017 07:04 UTC
@X140hu4 any thoughts ?
Umurerwa
@Umurerwa08
Oct 03 2017 07:08 UTC
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
Oct 03 2017 07:13 UTC
@Umurerwa08 Hope this helps
linkin-park
@linkin-park
Oct 03 2017 07:16 UTC
:'D
Long Nguyen
@longnt80
Oct 03 2017 07:17 UTC
@linkin-park what do you mean one day left?
linkin-park
@linkin-park
Oct 03 2017 07:19 UTC
good question @longnt80 i need to do a reverse engineer some site and i have a day left for my homework
Long Nguyen
@longnt80
Oct 03 2017 07:19 UTC
@linkin-park what are the requirements?
linkin-park
@linkin-park
Oct 03 2017 07:20 UTC
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
Oct 03 2017 07:22 UTC
@linkin-park I'd say do it with vanilla css using css grid
don't use bootstrap
linkin-park
@linkin-park
Oct 03 2017 07:23 UTC
my question is what if the old browser didnt support grid :?
Long Nguyen
@longnt80
Oct 03 2017 07:23 UTC
how old
linkin-park
@linkin-park
Oct 03 2017 07:24 UTC
not sure about that :fire:
Long Nguyen
@longnt80
Oct 03 2017 07:25 UTC
@linkin-park you can apply progessive enhancement method
linkin-park @linkin-park googles progressive enhance......
Long Nguyen
@longnt80
Oct 03 2017 07:26 UTC
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 */ 
}
Markus Kiili
@Masd925
Oct 03 2017 07:30 UTC
@longnt80 @supports is not supported by IE ;)
Long Nguyen
@longnt80
Oct 03 2017 07:31 UTC
that's why you put it under / css for old browsers /
@linkin-park btw, depends on your goal
if you're into front end and css then use vanilla css and grid
otherwise, you can use bootstrap to make a quick website
linkin-park
@linkin-park
Oct 03 2017 07:37 UTC
well i thought of using grid - its f! cool .
then got scared of old browsers
Long Nguyen
@longnt80
Oct 03 2017 07:37 UTC
@linkin-park that's why I asked about the requirement
if there's no requirement to support old browser, just use grid
I think grid will become mainstream next year, IE's gonna adopt grid by the end of this year
linkin-park
@linkin-park
Oct 03 2017 07:49 UTC
thanks @longnt80 @Masd925
CamperBot
@camperbot
Oct 03 2017 07:49 UTC
linkin-park sends brownie points to @longnt80 and @masd925 :sparkles: :thumbsup: :sparkles:
:cookie: 577 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 4518 | @masd925 |http://www.freecodecamp.com/masd925
Zerka1982
@Zerka1982
Oct 03 2017 07:49 UTC
Back to you friends :)
@longnt80 how are you doing ?
Ariana Giroux
@EclectickMedia
Oct 03 2017 08:00 UTC
anybody able to help me out with a problem?
Coy Sanders
@coymeetsworld
Oct 03 2017 08:07 UTC
what's up @EclectickMedia ?
linkin-park
@linkin-park
Oct 03 2017 08:09 UTC
i'm going through elm , well is it better if i go with React / Vue ?
elm its great i came across Elm from a fellow camper :)
Long Nguyen
@longnt80
Oct 03 2017 08:27 UTC
@Zerka1982 I'm good, how are you?
Zerka1982
@Zerka1982
Oct 03 2017 08:47 UTC
@longnt80 Can I ask you a question please ;)
@longnt80 Im doing very well, thank you!
CamperBot
@camperbot
Oct 03 2017 08:49 UTC
zerka1982 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 578 | @longnt80 |http://www.freecodecamp.com/longnt80
Fabien SHAN
@X140hu4
Oct 03 2017 09:09 UTC
@Zerka1982 If you have a question do not hesitate to ask :) not everyone is looking at the chat constinuously ^^;
The question is: When I hover the anchor (the left side of the page). When I click I want to keep it displayed
linkin-park
@linkin-park
Oct 03 2017 09:20 UTC
later :)
Fabien SHAN
@X140hu4
Oct 03 2017 09:25 UTC
@Zerka1982 I managed to keep the width on the active button by having another class selector "[...] anchor-item .active" with the width set to 150px (the hover width)
The text does not show unless you hover, but you will be able to figure out that I imagine :)
Zerka1982
@Zerka1982
Oct 03 2017 09:26 UTC
Can you send me the sample
thanks in advance
Long Nguyen
@longnt80
Oct 03 2017 09:30 UTC
@Zerka1982 you need JavaScript to do that
BuntyBru
@BuntyBru
Oct 03 2017 09:31 UTC
By any chance does anyone knows a person working in retail?
Area manager?
kirbyedy
@kirbyedy
Oct 03 2017 09:32 UTC
@BuntyBru which side of the planet ?
BuntyBru
@BuntyBru
Oct 03 2017 10:02 UTC
Asia
India
You?
@kirbyedy
Shvetal
@verv0eren
Oct 03 2017 10:04 UTC
Hello campers!!
jamiebutt16
@jamiebutt16
Oct 03 2017 10:34 UTC
hi guys
Markus Kiili
@Masd925
Oct 03 2017 10:37 UTC
@jamiebutt16 Yo.
Hills
@Hillsie
Oct 03 2017 11:03 UTC
Hi there, does anyone have experience using stylus. I’m trying to get it to watch and auto build css styles. I’m using webpack. when I run npm start, I don’t get stylus watching the styles.styl pack so no changes propgate to the style.css file. Any help appreciated.
Not exactly sure who the whole thing hangs together.
Fabien SHAN
@X140hu4
Oct 03 2017 11:06 UTC
Ugh, I have a problem with the Exact Change in the advanced scripting...
Markus Kiili
@Masd925
Oct 03 2017 11:07 UTC
@X140hu4 Ask away.
Fabien SHAN
@X140hu4
Oct 03 2017 11:07 UTC
I am always short of one nickel because of the lack of precision of float
Markus Kiili
@Masd925
Oct 03 2017 11:08 UTC
@X140hu4 The robust way is to use penny amounts that are safe integers.
Fabien SHAN
@X140hu4
Oct 03 2017 11:10 UTC
hmm starting reading on this. Thanks @Masd925
CamperBot
@camperbot
Oct 03 2017 11:10 UTC
x140hu4 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4519 | @masd925 |http://www.freecodecamp.com/masd925
Hills
@Hillsie
Oct 03 2017 11:11 UTC
my request earlier….nevermind, I think I worked it out.
Markus Kiili
@Masd925
Oct 03 2017 11:12 UTC
@X140hu4 Some rounding scheme or margin of error on comparisons can also work but it is much harder to prove that it works on every situation.
Chris Rutherford
@cjrutherford
Oct 03 2017 12:26 UTC
Is anyone here experienced with Electron?
Brian
@Cornielle
Oct 03 2017 13:05 UTC
Hello im having a problem with a jquery button target , needs to be clicked twice to work
Alex Boquist
@aplchian
Oct 03 2017 13:06 UTC
@Cornielle post your code if you want
Brian
@Cornielle
Oct 03 2017 13:08 UTC
@aplchian how can I post my code with a dark background format?
Alex Boquist
@aplchian
Oct 03 2017 13:08 UTC
are you using codpen you could link to that
Brian
@Cornielle
Oct 03 2017 13:08 UTC
okey
but isn't work in codepe is a big proyect
Alex Boquist
@aplchian
Oct 03 2017 13:09 UTC
idk
if you arent using codepen just post your code here
put it liek this
```
your code here
```
wrapped up in three back ticks
Brian
@Cornielle
Oct 03 2017 13:10 UTC
thanks
@if(!isset($collateral))
    @if(isset($data))
        @if($data['basicInfo']->globalStatus == 'Collateral' && Auth::user()->department != 'Collateral')
        @elseif($data['basicInfo']->globalStatus == 'Collateral' && Auth::user()->department == 'Collateral')
        <button type="button" id="reviewApp" data-toggle="tooltip" data-placement="top"   title="@lang('util.review')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 75px; z-index: 9999;">
            <i class="material-icons" style="color: white;">note_add</i>
        </button><button type="button" id="saveLoan"  data-toggle="tooltip" data-placement="top"  title="@lang('util.savebtn')" data-trigger ="hover" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
            <i class="material-icons" style="color: white;">save</i>
        </button>
        @elseif($data['basicInfo']->globalStatus == 'declined' || $data['basicInfo']->globalStatus == 'cancelled')
        <button type="button" id="reviewApp" data-toggle="tooltip" data-placement="top"   title="@lang('util.review')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
            <i class="material-icons" style="color: white;">note_add</i>
        </button>
        @elseif($data['basicInfo']->globalStatus != 'Collateral')
        <button type="button" id="reviewApp" data-toggle="tooltip" data-placement="top"   title="@lang('util.review')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 75px; z-index: 9999;">
            <i class="material-icons" style="color: white;">note_add</i>
        </button><button type="button" id="saveLoan" data-toggle="tooltip" data-placement="top"  title="@lang('util.savebtn')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
            <i class="material-icons" style="color: white;">save</i>
        </button>        
        @endif
        @else
        <button type="button"  id="saveLoan" data-toggle="tooltip" data-placement="top"   title="@lang('util.savebtn')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
            <i class="material-icons" style="color: white;">save</i>
        </button>
    @endif
    @endif
this is a laravel/html side and jquery is :

``````
``````
Alex Boquist
@aplchian
Oct 03 2017 13:13 UTC
i have no idea lol
Brian
@Cornielle
Oct 03 2017 13:13 UTC
$('#saveLoan').click(function(){
        // $('[data-toggle="popover"]').popover();  
        var objects = {};
        if(checkForEmpty()){
            swal('@lang("util.youmust")');
            return;
        }
        for(var k in ents){
            objects[ents[k]] = convertToArray(ents[k]);
        }
        @if(isset($collateral))
        objects['collateral'] = true;
        objects['loanIdNumber'] = '{{$data["basicInfo"]["loanIdNumber"]}}';
        objects['transit'] = '{{$data["basicInfo"]["transit"]}}';
        objects['cifkey'] = '{{$data["basicInfo"]["CifKey"]}}';
        @endif
        $.ajax({
            type : 'Post',
                data : {
                    _token : '{{csrf_token()}}',
                    data: objects,
                },
                url : '{{url("autosave/app")}}',
                dataType : 'json',
                success: function(data){
                    if (data.message == 'success') {
                        @if(isset($collateral))
                        window.history.back();
                        @else
                        window.location = '{{url("DRT/LoanRegister")}}';
                        @endif
                    }
                },
                error: function (jqXHR, exception) {
                  console.log(jqXHR.responseText);
                }
        });
    });
this is the jquery code
thanks anyway @aplchian
CamperBot
@camperbot
Oct 03 2017 13:14 UTC
cornielle sends brownie points to @aplchian :sparkles: :thumbsup: :sparkles:
:cookie: 374 | @aplchian |http://www.freecodecamp.com/aplchian
Brian
@Cornielle
Oct 03 2017 13:15 UTC
the last button after an else conditional is the only button that have this problem I try to copy the same code and specifiy a differente target but still happend
LordKrishna
@Pradeep7695
Oct 03 2017 13:28 UTC
hello guys
hey @Pradeep7695
Kaz Baig
@kbaig
Oct 03 2017 14:16 UTC
Hey folks, any idea why the simulation gets held up by scrolling by mouse wheel? https://codepen.io/kbaig/pen/wrqbNb?editors=1010
Adeel Salim
@adeelsalim
Oct 03 2017 14:18 UTC
Hi! I have tried to make this game for practicing on javascript. It malfunctions at some points i am unable to debug that. But more that i am stuck on how to make it work on a mobile phone as on computer i am handling the paddle by both keypress and mousemove event but which event i am suppose to look at when trying to make it work for mobile. any suggestions
https://codepen.io/adeelsalim/pen/QqqBgj
@adeelsalim there must be some sort of touch event for phones
get the touch location and move the piece
@kbaig i couldn't reproduce that, it seems to be working for me
the thing that says a freeCodeCamp project by kbaig is in the middle of the board though
Sorin Ruse
@sorinr
Oct 03 2017 14:31 UTC
@Cornielle when and where is the laravel blade rendering the js code? in the head or body? is the DOM ready?
Kaz Baig
@kbaig
Oct 03 2017 14:34 UTC
@moT01 I was implementing the footer when you opened it I think, should be fine now
@moT01 When I use the mouse wheel, the timeout seems to be paused for me
@kbaig yea, still no problems with the mouse wheel, try fixed position on the footer, it's still in the way for me
Kaz Baig
@kbaig
Oct 03 2017 14:53 UTC
@moT01 hmm it's position absolute bottom 0 atm...
@kbaig shrink the window and refresh
then scroll down or enlarge the window
maybe it's my browser, but i don't think so
Kaz Baig
@kbaig
Oct 03 2017 15:06 UTC
@moT01 It's not, I think it's because it's positioning the div before the app mounts
@moT01 Quick fix would be to just stick the footer into the app I guess
HowdyHero
@HowdyHero
Oct 03 2017 16:01 UTC
Hello guys, is there anyone present at this moment ?
whats up
if you just ask, someone might come along and answer
or if you're just taking a roll call, im here
piteto
@piteto
Oct 03 2017 16:08 UTC
@HowdyHero present :hand:
Aman Kumayu
@aman-kumayu
Oct 03 2017 16:10 UTC
hello guys
piteto
@piteto
Oct 03 2017 16:11 UTC
hello @aman-kumayu
HowdyHero
@HowdyHero
Oct 03 2017 16:13 UTC
:) so happy to receive answer guys, thanks. I have a little situation. Last month I started to build a website and I bought a domain name and hosting with SiteGround. After few days of trying to set up my wordpress website I decided to just write myself the code, and Im almost finnished
Now after I uploaded my site (the code) with filezilla, when I check the website I get the live the website from wordpress and not the one that I've coded. What should I do ? Do you guys have any suggestions ?
I don't want live the wordpress website which is not even created but instead I want live the website that I created myself
piteto
@piteto
Oct 03 2017 16:16 UTC
@HowdyHero You probably need to talk to SiteGround support - we don't know how your server is configured, what hosting package you have, etc.
Aman Kumayu
@aman-kumayu
Oct 03 2017 16:17 UTC
@HowdyHero may be you should switch to another web hosting service.
piteto
@piteto
Oct 03 2017 16:17 UTC
This isn't something that has an easy, obvious answer
HowdyHero
@HowdyHero
Oct 03 2017 16:18 UTC
@piteto thanks for suggestion
CamperBot
@camperbot
Oct 03 2017 16:18 UTC
howdyhero sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 183 | @piteto |http://www.freecodecamp.com/piteto
Sorin Ruse
@sorinr
Oct 03 2017 16:19 UTC
@HowdyHero have you deleted the wordpress files and folders? what file do your web server point to? some index.php or your uploaded index.html?
Ian Gracia
@iangracia
Oct 03 2017 16:39 UTC
whats up folks

// Setup
var collection = {
    "2548": {
      "album": "Slippery When Wet",
      "artist": "Bon Jovi",
      "tracks": [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    "2468": {
      "album": "1999",
      "artist": "Prince",
      "tracks": [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    "1245": {
      "artist": "Robert Palmer",
      "tracks": [ ]
    },
    "5439": {
      "album": "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function updateRecords(id, prop, value) {

 /* if (prop==="tracks") {
    id.tracks.push(value);
  }*/
  var get = collection["2468"].prop;
  return get;
}

// Alter values below to test your code
updateRecords(5439, "tracks", "kukhövve");
why is this not returning an array with "1999" and "little red corvette?"
Jorge
@flawedLogic506
Oct 03 2017 16:42 UTC
hey whats up guys
Moisés Man
@moigithub
Oct 03 2017 16:42 UTC
prop is a variable... NO dot notation with variables @iangracia
CamperBot
@camperbot
Oct 03 2017 16:42 UTC
moigithub sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 346 | @iangracia |http://www.freecodecamp.com/iangracia
Jorge
@flawedLogic506
Oct 03 2017 16:43 UTC
lol .. cbot is crazy, giving out brownies to everyone
Ian Gracia
@iangracia
Oct 03 2017 16:43 UTC
how do you mean ? @moigithub
piteto
@piteto
Oct 03 2017 16:43 UTC
@iangracia With variables, we have to use bracket notation: var get = collection["2468"][prop];
CamperBot
@camperbot
Oct 03 2017 16:43 UTC
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @iangracia |http://www.freecodecamp.com/iangracia
Ian Gracia
@iangracia
Oct 03 2017 16:44 UTC
its still returning the whole collection object @piteto
piteto
@piteto
Oct 03 2017 16:44 UTC
It should return ["1999", "Little Red Corvette"]
Moisés Man
@moigithub
Oct 03 2017 16:44 UTC
@OrangeKulture its cuz his name have "thanks" on it
Ian Gracia
@iangracia
Oct 03 2017 16:44 UTC
i want it just to return the array with "1999" and "little red corvette?"
piteto
@piteto
Oct 03 2017 16:44 UTC
What are you hoping to return?
Ian Gracia
@iangracia
Oct 03 2017 16:44 UTC
@piteto
piteto
@piteto
Oct 03 2017 16:44 UTC
Yeah, that's what it returns
Ian Gracia
@iangracia
Oct 03 2017 16:45 UTC
not for me
piteto
@piteto
Oct 03 2017 16:45 UTC
  var get = collection["2468"][prop]; // ["1999", "Little Red Corvette"]
Ian Gracia
@iangracia
Oct 03 2017 16:45 UTC
ill try refreshing the page
Jorge
@flawedLogic506
Oct 03 2017 16:45 UTC
@moigithub no it doesnt
Moisés Man
@moigithub
Oct 03 2017 16:45 UTC
@OrangeKulture gracia
CamperBot
@camperbot
Oct 03 2017 16:45 UTC
moigithub sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 471 | @orangekulture |http://www.freecodecamp.com/orangekulture
Ian Gracia
@iangracia
Oct 03 2017 16:45 UTC
nope still returning the whole object
Moisés Man
@moigithub
Oct 03 2017 16:45 UTC
see ?? well missing an "s"
Jorge
@flawedLogic506
Oct 03 2017 16:45 UTC
gracia is not thanks
gracias is
Ian Gracia
@iangracia
Oct 03 2017 16:46 UTC
exactly @OrangeKulture
CamperBot
@camperbot
Oct 03 2017 16:46 UTC
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
piteto
@piteto
Oct 03 2017 16:46 UTC
Yes it is :) lol
Jorge
@flawedLogic506
Oct 03 2017 16:46 UTC
so ... @moigithub thank
CamperBot
@camperbot
Oct 03 2017 16:46 UTC
orangekulture sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3651 | @moigithub |http://www.freecodecamp.com/moigithub
piteto
@piteto
Oct 03 2017 16:46 UTC
I don't know where you're looking at the code
Jorge
@flawedLogic506
Oct 03 2017 16:46 UTC
lol
Moisés Man
@moigithub
Oct 03 2017 16:46 UTC
but bot takes that as a thanks..
Jorge
@flawedLogic506
Oct 03 2017 16:46 UTC
@moigithub than
hahah .. oh man .. lets send him back to class
Moisés Man
@moigithub
Oct 03 2017 16:46 UTC
some1 had a name with "danke" on it.. he got free brownies too
Ian Gracia
@iangracia
Oct 03 2017 16:46 UTC
im looking at it on challenge 347, "Record Collection"
@piteto
Jorge
@flawedLogic506
Oct 03 2017 16:47 UTC
cbot
CamperBot
@camperbot
Oct 03 2017 16:47 UTC
you called?
piteto
@piteto
Oct 03 2017 16:47 UTC
That black box on the freecodecamp challenges isn't a valid console
Jorge
@flawedLogic506
Oct 03 2017 16:47 UTC
learn spanish
Moisés Man
@moigithub
Oct 03 2017 16:47 UTC
:P
Ian Gracia
@iangracia
Oct 03 2017 16:47 UTC
how can i pass the challenge then :cry:
piteto
@piteto
Oct 03 2017 16:48 UTC
it only outputs the results of the tests they run against your code - with the more complicated challenges, you need to use an environment with an actual developer console. codepen, repl.it, or your own local environment
It helps a lot with the debugging
Ian Gracia
@iangracia
Oct 03 2017 16:49 UTC
ok, then when im finished i can just paste the code and pass the challenge?
piteto
@piteto
Oct 03 2017 16:49 UTC
Yes, exactly
Ian Gracia
@iangracia
Oct 03 2017 16:49 UTC
i mean, maybe i need to access something with the method im using right now
maybe it wont work then either
but alright, ill finish the challenge on codepen
i get the feeling that fcc black box have betrayed me in the past and i thought it was something wrong with my code
piteto
@piteto
Oct 03 2017 16:50 UTC

It looks like there are some conditions to consider to pass that challenge

If prop isn't "tracks" and value isn't empty (""), update or set the value for that record album's property.

I hit the same problem as you when I started the challenges - surprised you made it to the advanced algorithms without using an actual coding environment
I applaud your perseverance :p
Ian Gracia
@iangracia
Oct 03 2017 16:52 UTC
haha yeah.. the secret is to rage quit every once and then and take a break from coding for a couple of weeks and tell yourself you suck at coding, then come back more motivated than ever
piteto
@piteto
Oct 03 2017 16:54 UTC
Great advice !
Ian Gracia
@iangracia
Oct 03 2017 17:00 UTC
Hey, what is "" equal to?
nvm
Kaz Baig
@kbaig
Oct 03 2017 17:07 UTC
Hey folks, would appreciate some feedback on my Game of Life so far https://codepen.io/kbaig/full/wrqbNb/
Markus Kiili
@Masd925
Oct 03 2017 17:29 UTC
@iangracia Equal can mean many things.
CamperBot
@camperbot
Oct 03 2017 17:29 UTC
masd925 sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 348 | @iangracia |http://www.freecodecamp.com/iangracia
Nickey Pickorita
@Pickorita
Oct 03 2017 17:35 UTC
Hi, anyone online?
Ian Gracia
@iangracia
Oct 03 2017 17:40 UTC
yeah
i also want to live in london
Nickey Pickorita
@Pickorita
Oct 03 2017 17:45 UTC
@iangracia then move to london lol :D
CamperBot
@camperbot
Oct 03 2017 17:45 UTC
pickorita sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 349 | @iangracia |http://www.freecodecamp.com/iangracia
Nickey Pickorita
@Pickorita
Oct 03 2017 17:45 UTC
btw could anyone pm me please, I need quick help with CSS
Zerka1982
@Zerka1982
Oct 03 2017 17:46 UTC
put your code in codepen
piteto
@piteto
Oct 03 2017 17:47 UTC
Feel free to ask your question here @Pickorita plenty willing to help. If it's a lot of code, put it in a codepen or jsfiddle
Nickey Pickorita
@Pickorita
Oct 03 2017 17:47 UTC
I can't put it in codepen
its quite large and in dreamweaver
There are just 3 elements that I need to align but I think I messed up something so its just aligning wrongly
anyone willing to check screenshots?
Ian Gracia
@iangracia
Oct 03 2017 17:52 UTC
var collection = {
    "2548": {
      "album": "Slippery When Wet",
      "artist": "Bon Jovi",
      "tracks": [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    "2468": {
      "album": "1999",
      "artist": "Prince",
      "tracks": [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    "1245": {
      "artist": "Robert Palmer",
      "tracks": [ ]
    },
    "5439": {
      "album": "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function updateRecords(id, prop, value) { 
  if (value=="") {
    delete collection[id][prop];
    return collection;
  }
  switch(prop) {
    case "tracks":
      if (collection.hasOwnProperty(prop)) {
        collection[id][prop].push(value);
      }
      else {collection[id][prop]= [value];}
      break;     
    default:
      collection[id][prop] = value;      
             }

  return collection.hasOwnProperty(prop);
}

// Alter values below to test your code
console.log(updateRecords(2468, "tracks", "Free"));
guys why is it returning false
when it obv should return true because 2468 has a property called tracks
no need to look at the whole code, just tell me why the returned boolean is false
Justine Diza
@JustineDiza
Oct 03 2017 17:53 UTC
Hi! Does anyone here use UI Router? I have a problem with my code, been trying to find other solutions for about an hour now, help is pretty much appreciated!
wnghero
@wnghero
Oct 03 2017 17:56 UTC
@iangracia heres how I did that problem
CamperBot
@camperbot
Oct 03 2017 17:56 UTC
wnghero sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 350 | @iangracia |http://www.freecodecamp.com/iangracia
wnghero
@wnghero
Oct 03 2017 17:56 UTC
// Setup
var collection = {
    2548: {
      album: "Slippery When Wet",
      artist: "Bon Jovi",
      tracks: [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    2468: {
      album: "1999",
      artist: "Prince",
      tracks: [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    1245: {
      artist: "Robert Palmer",
      tracks: [ ]
    },
    5439: {
      album: "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function updateRecords(id, prop, value) {
  if(value !== "" && prop !== "tracks"){
    collection[id][prop] = value;
  }  else if(prop=="tracks"&&value!==""&&collection[id][prop]===undefined){
    collection[id][prop] = [];
    collection[id][prop].push(value);
  } else if(prop=="tracks"&&value!==""){
    collection[id][prop].push(value);
  } else if(value===""){
    delete collection[id][prop];
  }

  return collection;
}

// Alter values below to test your code
updateRecords(5439, "tracks", "Take a Chance on Me");
Ian Gracia
@iangracia
Oct 03 2017 17:56 UTC
i found the problem
i was missing [id]
wnghero
@wnghero
Oct 03 2017 17:56 UTC
ahhh
Ian Gracia
@iangracia
Oct 03 2017 17:57 UTC
wrong : collection.hasOwnProperty(prop);
right: collection[id].hasOwnProperty(prop);
dont you just love coding? :coding:
:cry:
wnghero
@wnghero
Oct 03 2017 17:57 UTC
lmao it sucks but the money thoooo
Ian Gracia
@iangracia
Oct 03 2017 17:58 UTC
right? @wnghero
Sorin Ruse
@sorinr
Oct 03 2017 17:59 UTC
@Pickorita do u have it some place where we can see it live?
Nickey Pickorita
@Pickorita
Oct 03 2017 17:59 UTC
@sorinr yea, I will send you a dm
Justine Diza
@JustineDiza
Oct 03 2017 18:12 UTC

@JustineDiza
Hi! Does anyone here use UI Router? I have a problem with my code, been trying to find other solutions for about an hour now, help is pretty much appreciated!
Here's my HTML base:

<ul class="formSteps uk-margin-large-top">
            <li ui-sref-active="active">
                <a ui-sref=".substep" class="removeLink">Basic Information</a>
            </li>
            <li ui-sref-active="active">
                <a ui-sref=".step_four" class="removeLink">Business Information</a>
            </li>
            <li ui-sref-active="active">
                <a ui-sref=".step_five" class="removeLink">Business Activity</a>
            </li>
            <li>
                <a class="removeLink">Documents</a>
            </li>
            <li>
                <a class="removeLink">Gallery</a>
            </li>
            <li>
                <a class="removeLink">Employee</a>
            </li>
            <li>
                Complete
            </li>
        </ul>

        <!-- Substeps for step1 go here -->
        <div ui-view="substep"></div>

<div class="br-form-container">
            <div class="page-header text-center">
                <!-- Our nested state views will be injected here -->
                <div ui-view></div>
            </div>
        </div>

Here's my route.js:

// Adding state for substeps
            .state('business_registration.substep', {
                url: '/1-sub',
                data: { activeTab: 'business'},
                controller: 'AccountBusinessController',
                params: {
                    businessType: null
                },
                controllerAs: 'abc',
                views: {
                    '': {
                        templateUrl: 'business/step1.html'
                    },
                    'substep@business_registration.substep': {
                        templateUrl: 'business/substep.html'
                    }
                }
            })

What I'm trying to do is to have 2 separate step progress counter, where the substep consists of substeps for different views, but it doesn't show up in the page.

Ian Gracia
@iangracia
Oct 03 2017 18:57 UTC
var x = 0;

x += 1.01;
x += 2.05;

console.log(x);

//why does this equal 3.0599999999999996
//and not 3,06???
CamperBot
@camperbot
Oct 03 2017 18:58 UTC
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @iangracia |http://www.freecodecamp.com/iangracia
Ian Gracia
@iangracia
Oct 03 2017 18:59 UTC
@piteto thx, will study
CamperBot
@camperbot
Oct 03 2017 18:59 UTC
iangracia sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 185 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Oct 03 2017 18:59 UTC
var x = 0;

x += 1.01;
x += 2.05;

console.log(Number(x.toFixed(2)));
// or
console.log(Number(parseFloat(x).toPrecision(12)));
Ian Gracia
@iangracia
Oct 03 2017 19:01 UTC
can't belive simple math has to be so complicated
Dennis Daubney Jr
@MrOolong
Oct 03 2017 19:05 UTC
Hi all, i'm trying to get my freecodecamp quote gen to post the quotes to twitter, but i'm currently stuck with the javascript. Could anyone take a look at my code and lend a hand?
Ian Gracia
@iangracia
Oct 03 2017 19:10 UTC
@piteto why do you have to use parsefloat if the variables aren't strings?
i'm having a hard time wrapping my head around this simple problem
piteto
@piteto
Oct 03 2017 19:11 UTC
@iangracia You don't have to in that example - it works with numbers or strings
CamperBot
@camperbot
Oct 03 2017 19:11 UTC
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
piteto
@piteto
Oct 03 2017 19:14 UTC
You could do something like this to facilitate:
var x = 0;

x += 1.01;
x += 2.05;
x = preciseValue(x);

console.log(x);

function preciseValue(num) {
  return Number(parseFloat(num).toPrecision(12));
}
@MrOolong To use the official twitter share button, you'll need to use their code for generating the button and specifying the text: https://dev.twitter.com/web/tweet-button/javascript-create
If you don't care how the button looks, make it a hyperlink, style it like a button, and link to:
https://twitter.com/intent/tweet?text="your quote text"
Ian Gracia
@iangracia
Oct 03 2017 19:19 UTC
you are just confusing me when you're using a function without the need of it
lmao
but shouldnt toPrecision(3) be the correct use?, should 12 give me like 11 decimals
Dennis Daubney Jr
@MrOolong
Oct 03 2017 19:24 UTC
@piteto and if I don't want to manually specify the text to tweet? What if I want to tweet the quote in the DOM element that's generated from an array in the JS file?
piteto
@piteto
Oct 03 2017 19:24 UTC
@MrOolong You would replace "your quote text" in that example above with a variable representing the text you want to tweet
In your case, the "textToTweet" variable
basically, to make your current window.open code work, you'll need to remove your html that pulls in the twitter widget code: //platform.twitter.com/widgets.js
Dennis Daubney Jr
@MrOolong
Oct 03 2017 19:27 UTC
i think I just figured out another way
Ian Gracia
@iangracia
Oct 03 2017 19:32 UTC
var x = 3.0599999999999996;

console.log(Number(x.toPrecision(1)));  //  3
console.log(Number(x.toPrecision(2)));  // 3.1
console.log(Number(x.toPrecision(3)));  // 3.06
console.log(Number(x.toPrecision(4)));  // 3.06 ????
console.log(Number(x.toPrecision(7)));  // 3.06????
console.log(Number(x.toPrecision(9)));  // 3.06???
why does it stop at 2 decimals
piteto
@piteto
Oct 03 2017 19:34 UTC
@iangracia because there are only 2 significant digits after the decimal point. Try it with a different number, like: var x = 3.12345999999996;
CamperBot
@camperbot
Oct 03 2017 19:34 UTC
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
Dennis Daubney Jr
@MrOolong
Oct 03 2017 19:37 UTC
@piteto thank you for steering me in the right direction with the link to the twitter button. I got it to work with this twttr.widgets.createShareButton(
'/',
document.getElementById('quotebox'),
{
text: document.getElementById('quotebox').innerHTML
}
);
CamperBot
@camperbot
Oct 03 2017 19:37 UTC
mroolong sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 186 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Oct 03 2017 20:42 UTC
@MrOolong No problem! I think you would want to use textContent instead of innerHTML, but it may not matter based on the content of your quotes.
Nickey Pickorita
@Pickorita
Oct 03 2017 20:48 UTC
anyone knows how to align these 3 in the center? http://prntscr.com/gsws0e
All 3 elements are in 1 div element and are lists
Kaz Baig
@kbaig
Oct 03 2017 20:57 UTC
@Pickorita could just use flexbox and margins
Nickey Pickorita
@Pickorita
Oct 03 2017 20:58 UTC
but now when I resize it to smaller size
it is not centered
do you know how to fix it?
http://prntscr.com/gswver
http://prntscr.com/gswvnc
code:
.wrapperimages {
display:flex;
justify-content:center;
margin: 0 auto;
}
Kaz Baig
@kbaig
Oct 03 2017 20:59 UTC
@Pickorita would have to make flex-direction column below a certain width
@Pickorita if you don't want to let the size of the image change
@Pickorita with align-items: center and your choice of justify-content
Nickey Pickorita
@Pickorita
Oct 03 2017 21:00 UTC
doesn't work when I add flex direction
Kaz Baig
@kbaig
Oct 03 2017 21:01 UTC
With a media query for the width?
Like
@media (max-width: 500px) {
     .wrapperimages-parent {
         flex-direction: column;
         justify-content: space-around;
         align-items: center;
    }
}
Nickey Pickorita
@Pickorita
Oct 03 2017 21:04 UTC
let me test 1sec
not working
Kaz Baig
@kbaig
Oct 03 2017 21:06 UTC
@Pickorita would be a lot more helpful to have your code in a pen or something
piteto
@piteto
Oct 03 2017 21:06 UTC
we really need a live demo to help you debug this - it can depend on a lot of things
Nickey Pickorita
@Pickorita
Oct 03 2017 21:07 UTC
.wrapperimages {
    display:flex;
    justify-content:center;
    margin:auto;
}
@kbaig I don't have code pen
I'm doing it in dreamweaver
Kaz Baig
@kbaig
Oct 03 2017 21:08 UTC
@Pickorita wrapperimages is the class for the children right? flex has to go on the parent of the items flex is being applied to
piteto
@piteto
Oct 03 2017 21:08 UTC
You don't need an account - create an anonymous pen: https://s.codepen.io/pen?editors=1101
Nickey Pickorita
@Pickorita
Oct 03 2017 21:09 UTC
yea its a class for a div
and there are 3 lists
this is how it looks
Kaz Baig
@kbaig
Oct 03 2017 21:10 UTC
Are each of the boxes in that screenshot a div with class wrapperimages?
Nickey Pickorita
@Pickorita
Oct 03 2017 21:10 UTC
no each box is a list
there is 1 UL
and then 3 LI items
each li item is 1 image
Can you see @kbaig
screenshot above
let me paste code

```

<div class="wrapperimages">
<section class="portfolio">
<ul class="portfolio-grid portfolio-galery-3 clearfix masonry" id="portfolio-grid">

            <li class="portfolio-item mix cat1">
                <div class="portfolio-style-1 entry wow fadeIn" data-wow-duration="1s" data-wow-delay="0.2s" style="visibility: visible; animation-duration: 1s; animation-delay: 0.2s; animation-name: fadeIn;">
                    <img src="img/work-img3.png">
                    <div class="magnifier">
                        <div class="visible-title">
                            <h4><a href="#">Project Name</a></h4>
                            <small>
                                <a href="#">Category</a>
                            </small>
                        </div>
                        <!-- end visible title -->
                        <div class="visible-title1 clearfix">
                            <span class="pull-left">
                                <a data-rel="prettyPhoto" href="img/screencapture-file-C-Users-Pickorita-Desktop-ITA-DW-Honey-20Cake-20Site-index-html-1506611749492.png">
                                <i class="fa fa-search"></i>
                                </a>
                            </span>
                            <span class="pull-right">
                                <a href="#">
                                    <i class="fa fa-heart"></i>
                                300</a>
                            </span>
                        </div>
                    </div>
                </div>
            </li>

```

Kaz Baig
@kbaig
Oct 03 2017 21:14 UTC
ul {
    display: flex;
    justify-content: space-around;
}

@media (max-width: 500px) {
    ul {
        flex-direction: column;
        align-items: center;
    }
}
Nickey Pickorita
@Pickorita
Oct 03 2017 21:16 UTC
I can't change ul
since I have more ul's on other pages
Gersho
@Gersho
Oct 03 2017 21:16 UTC
give it an id ?
Kaz Baig
@kbaig
Oct 03 2017 21:16 UTC
So put a class on that ul and replace
or id
Nickey Pickorita
@Pickorita
Oct 03 2017 21:17 UTC
1 sec let me try
Kaz Baig
@kbaig
Oct 03 2017 21:17 UTC
Highly recommend reading up on flexbox https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Gersho
@Gersho
Oct 03 2017 21:18 UTC
@kbaig nice cheat sheet, thanks
CamperBot
@camperbot
Oct 03 2017 21:18 UTC
gersho sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
Oct 03 2017 21:19 UTC
@Gersho no prob, there is a grid equivalent too ;) https://css-tricks.com/snippets/css/complete-guide-grid/
Nickey Pickorita
@Pickorita
Oct 03 2017 21:19 UTC
thanks I'll check
I added this code
but this is how it looks now
Kaz Baig
@kbaig
Oct 03 2017 21:20 UTC
Is that not what you wanted
Nickey Pickorita
@Pickorita
Oct 03 2017 21:21 UTC
no
I want it to be centered when smaller
but not all 3 in a row
Petru Alin Gheorghe
@palingheorghe
Oct 03 2017 21:22 UTC
Hi gu
Kaz Baig
@kbaig
Oct 03 2017 21:22 UTC
Not sure what you mean by that, can I get an example?
Nickey Pickorita
@Pickorita
Oct 03 2017 21:23 UTC
yes
look
Petru Alin Gheorghe
@palingheorghe
Oct 03 2017 21:23 UTC
Is it ok if I can ask here something not related to code but related to life as a front end developer or the path to this job?
Nickey Pickorita
@Pickorita
Oct 03 2017 21:23 UTC
so this website was inspiration pretty much
I tried to make that for practice
so next thing is alignment
and I can't get it right
@kbaig
Kaz Baig
@kbaig
Oct 03 2017 21:25 UTC
@Pickorita If you want to copy the exact functionality of that page, you need to use css transitions, grid, and media queries
Or flexbox instead of grid
Nickey Pickorita
@Pickorita
Oct 03 2017 21:26 UTC
ok I see
Kaz Baig
@kbaig
Oct 03 2017 21:28 UTC
@Pickorita for some guidance: https://codepen.io/ramenhog/pen/MpORPa
Nickey Pickorita
@Pickorita
Oct 03 2017 21:31 UTC
thank you
did you just make it?
or is it ramenhog's?
Nickey Pickorita
@Pickorita
Oct 03 2017 21:49 UTC
nvm
I fixed it with media queries
Ghost
@ghost~55a04b725e0d51bd787af54c
Oct 03 2017 21:50 UTC
Hey guys
How do you append a class to another class with js?
Eric Weiss
@eweiss17
Oct 03 2017 22:03 UTC
displaying some previews to additonal sites, have the 'pens' set into a flexbox, is it better to just use html image tags or use css background-image: url()
well i figured it out , using image tags just worked instantly, guess background-image is only real good for the background.... who would've though
piteto
@piteto
Oct 03 2017 22:06 UTC
@eweiss17 use <img> if they're all the same aspect ratio. Use background-image if they're different aspect ratios, you don't want to resize, and don't mind some truncation
@palingheorghe You might have better success in the main chat room or on a front-end related subreddit
rooms
CamperBot
@camperbot
Oct 03 2017 22:10 UTC

freeCodeCamp rooms:

:point_right: Here is a list of our official chat rooms
Eric Weiss
@eweiss17
Oct 03 2017 22:12 UTC
/freecodecamp is the most active of the chatrooms