These are chat archives for FreeCodeCamp/HelpFrontEnd

23rd
Aug 2016
Tomás G. Martínez
@TomGM
Aug 23 2016 00:00
http://codepen.io/GMATom/pen/AXkQJy?editors=1111 ok this is where I am now, could you guys help me understand the execution order for these functions? what I'm trying to do is make it so that when the document is ready it:
-assigns the streamer array to the streamers variable
-runs streamerCards, consequently creating a materialize.css card with stream info for each of the streams. Within this function, it calls streamerStatus to fill the relevant data in the cards
it;s not working, it think it has to do with hoisting, but I'm not sure
Stephen James
@sjames1958gm
Aug 23 2016 00:03
@TomGM Yeah you cannot return a value from getJSON like you are doing. That callback is returning back into getJSON which throws that away.
Add the HTML inside the getJSON callback.
Tomás G. Martínez
@TomGM
Aug 23 2016 00:06
btw this is what I'm trying to create for each channel http://codepen.io/GMATom/pen/BzZwYN in case my description isn't visual enough
Stephen James
@sjames1958gm
Aug 23 2016 00:09
@TomGM NO, more like http://codepen.io/silgarth/pen/akAVmr?editors=0010 (I forked yours)
John
@jden3725
Aug 23 2016 00:10
Can you guys please give me feedback on the tribute page project in codepen?http://codepen.io/John9167/pen/GqLYkb/
nik0505
@nik0505
Aug 23 2016 00:10
does anyone know how to center this?
<iframe width="560" height="315" src="https://www.youtube.com/embed/rD7xGyD1hwM" frameborder="0" allowfullscreen></iframe>
vincentwue
@vincentwue
Aug 23 2016 00:12
@jden3725 its pretty nice
John
@jden3725
Aug 23 2016 00:13
@VincentWue thank you
CamperBot
@camperbot
Aug 23 2016 00:13
jden3725 sends brownie points to @vincentwue :sparkles: :thumbsup: :sparkles:
:cookie: 194 | @vincentwue |http://www.freecodecamp.com/vincentwue
John
@jden3725
Aug 23 2016 00:14
@nik0505
@nik0505 Did you try using the <center></center> tags
Tomás G. Martínez
@TomGM
Aug 23 2016 00:15
@sjames1958gm Thanks for the code. So just to make sure I understand, if I attempt to return a value like that from getJSON (url, function) it is discarded because what I'm supposed to receive is the JSON api response?
CamperBot
@camperbot
Aug 23 2016 00:15
tomgm sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: tomgm already gave sjames1958gm points
nik0505
@nik0505
Aug 23 2016 00:15
@jden3725 Yep that worked. Thanks!
CamperBot
@camperbot
Aug 23 2016 00:15
nik0505 sends brownie points to @jden3725 :sparkles: :thumbsup: :sparkles:
:cookie: 119 | @jden3725 |http://www.freecodecamp.com/jden3725
Tomás G. Martínez
@TomGM
Aug 23 2016 00:15
as in, it's already returning something so I have to separate those two things?
John
@jden3725
Aug 23 2016 00:17
@nik0505 best regards
Derek
@DTJ357
Aug 23 2016 00:17
Hello, I am on the Wikipedia Viewer Challenge, and I am having trouble with what URL to send. Could someone take a look at my code?
My codepen: http://codepen.io/Code4Jesus/pen/LkXQRN?editors=1111
Aaron
@apalm1341
Aug 23 2016 00:19
http://codepen.io/ap1341/pen/YWbPOv Can you guys give me feedback on what you think about my project. Any improvements, etc would be greatly appreciated. Also, can someone tell me how I make sure I am not hotlinking the two images I got from pixabay? I want to be able to display the images on codepen by being able to download the image files and then using file directory to reference it
nik0505
@nik0505
Aug 23 2016 00:29
Someone peep my Harambe tribute page: http://codepen.io/delganm0505/full/JKqOjz/
Stephen James
@sjames1958gm
Aug 23 2016 00:36
@TomGM Your callback is called long after the getJSON call returns, so there is no way to "return" a value back to your code. You have to manipulate data in the callback.
Toni Shortsleeve
@KoniKodes
Aug 23 2016 00:44
@VincentWue Sorry, I was off for a while. Cross-origin issues are coming for some us who had http links instead of https links, especially from Codepen or on Chrome. It's a fairly recent occurrence, but basically as security issue. My codepens are https, so I need to make sure my links and image sites are also secure. So if you begin to have issues, check you console to see it there is a log on the errror.
Brandon
@Brandons42
Aug 23 2016 00:44
What's wrong with this piece of jquery? I'm trying to change the text of the Tweet on the click of a button. "Hi" is just for testing purposes.
$('#tweet').attr("data-text", "hi");
Toni Shortsleeve
@KoniKodes
Aug 23 2016 01:05
@DTJ357 Where are you placing your results/output? Look at the console log and you will see that the api is working, it just doesn't know what to do next.
Derek
@DTJ357
Aug 23 2016 01:12
Hi, @KoniKodes. Another person helped me, and I fixed that problem. I am sorry for confusing you.
Toni Shortsleeve
@KoniKodes
Aug 23 2016 01:13
@DTJ357 I'm glad it worked out :-)
Derek
@DTJ357
Aug 23 2016 01:13
@KoniKodes , thank you for your help and understanding!
CamperBot
@camperbot
Aug 23 2016 01:13
dtj357 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 361 | @konikodes |http://www.freecodecamp.com/konikodes
Toni Shortsleeve
@KoniKodes
Aug 23 2016 01:15
@DTJ357 We're all in this together, just some are further along than the rest of us. I'm glad you are getting your answers. These challenges were tough, and I'm still trying to update my code on a couple of them. So your questions are helping me to find some of my own answers. Thank you
CamperBot
@camperbot
Aug 23 2016 01:15
konikodes sends brownie points to @dtj357 :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @dtj357 |http://www.freecodecamp.com/dtj357
Mykhaylo (Misha) Ivanovych Kuzma
@mishakuzma
Aug 23 2016 01:25

I'm having a bit of an issue with the Local Weather project. When I call the Open Weather api, it returns this object: {"readyState":0,"status":0,"statusText":"error"}.

This is the function that calls the api. It's passed "position", which has latitude and longitude.

$.ajax({
    url: "https://www.api.openweathermap.org/data/2.5/weather?lat="+ position.coords.latitude + "&lon="+ position.coords.longitude + "&APPID=ab90a10ff5b266ae2955c6d1a48a1aa7",
    success: function(weatherData){
      $("#weatherType").html(weatherData[0]["weather"]["description"]);
    },
    error: function(objectRet){
      console.log(JSON.stringify(objectRet));
    }

  });
Ken Haduch
@khaduch
Aug 23 2016 01:28
@Brandons42 - it's hard to tell without a little more context. Do you have a url?
Stephen James
@sjames1958gm
Aug 23 2016 01:41
@mishakuzma Do you have the actual URL that was sent ? you can see that in the network tab of the devtools.
Mykhaylo (Misha) Ivanovych Kuzma
@mishakuzma
Aug 23 2016 01:49

@sjames1958gm I do, the URL sent was https://www.api.openweathermap.org/data/2.5/weather?lat=43.4013251&lon=-80.5140353&APPID=ab90a10ff5b266ae2955c6d1a48a1aa7

There's a note after the link that says: net::ERR_NAME_NOT_RESOLVED.

Stephen James
@sjames1958gm
Aug 23 2016 01:50
@mishakuzma no www. (also unless you pay https:// isn't going to work either)
Mike
@MikeJSchorah
Aug 23 2016 01:54
For Build a Random Quote Machine, where can I go about finding out how to do JavaScript in regards to width and color adjustments?
encount
@encount
Aug 23 2016 01:55
@MikeJSchorah $(‘.mydiv’).css(‘color’,’green’) - change your div to green
@MikeJSchorah or any other css property like width etc..
Mike
@MikeJSchorah
Aug 23 2016 01:56
@encount Oops. I was looking for a hint, but I guess that works
Brian
@BrianCodes33
Aug 23 2016 01:57
i bought a theme on wordpress for $80 and it wont work. im about to go crazy.
encount
@encount
Aug 23 2016 01:57
@MikeJSchorah sorry :( - hint you need a javascript library
Mike
@MikeJSchorah
Aug 23 2016 01:58
Lol. Why jQuery opposed to hardcore JavaScript?
encount
@encount
Aug 23 2016 01:59
@MikeJSchorah you got it!
Mike
@MikeJSchorah
Aug 23 2016 02:00
@encount So that dynamically changes it to green and I need it to connect to my button, right?
encount
@encount
Aug 23 2016 02:02
@MikeJSchorah yep - so add it to your return click event function if thats when you want to change it
Mykhaylo (Misha) Ivanovych Kuzma
@mishakuzma
Aug 23 2016 02:06
@sjames1958gm I tried that out, but it returned another error. You mentioned https and that gave me an idea to try to find the user's location without navigator (since it needs https). I think that might be the problem, so i'll give it a shot and report back.
Stephen James
@sjames1958gm
Aug 23 2016 02:06
@mishakuzma Yeah, using something like http://ip-api.com/json for location
Toni Shortsleeve
@KoniKodes
Aug 23 2016 02:09
@sjames1958gm @mishakuzma I don't think open weather allows secure access. You may want to look into a different api, such as wunderground. I've seen some campers find work-arounds for this problem, so check out the forums and see if that may help.
Mykhaylo (Misha) Ivanovych Kuzma
@mishakuzma
Aug 23 2016 02:17
@sjames1958gm That worked perfectly. It was an issue with using HTTPS (and www.) Thanks a bunch!
CamperBot
@camperbot
Aug 23 2016 02:17
mishakuzma sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2809 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 23 2016 02:23
@mishakuzma :+1:
Physikeff
@Physikeff
Aug 23 2016 02:42
Say, on the Random quote machine challenge, do I have to make my own library(cause I'll make only 20-40 quotes >_>) or do I have to make it extremely large. Meaning I have to find a way to generate random quotes from Wikipedia or a similar source?
encount
@encount
Aug 23 2016 02:45
@Physikeff i think you can just use an array of 20 or so quotes
Ken Haduch
@khaduch
Aug 23 2016 02:46
@Physikeff - there are many quoteservers out there that you can use - just have to figure out the API and details. You can start with your own library of quotes and keep it all in javascript - that's an easier way to start. There really aren't any requirements for the number of quotes, and i don't think that they've specified using a server to get quotes from. As one of the early projects, it seems that keeping it simple is fine.
Matt K
@mkrump
Aug 23 2016 02:48
@Physikeff like @khaduch mentioned can use api if want to have more less unlimited quotes. http://forismatic.com/en/api/ is the one that i ended up using.
Physikeff
@Physikeff
Aug 23 2016 02:52
@khaduch @encount Oh well. I asked this because I have no idea how to make my website generate and transfer information from another website. But making an array seems reasonable
Mike
@MikeJSchorah
Aug 23 2016 03:00
var count = 1;
    function setColor(btn, color) {
        var property = document.getElementById(btn);
        if (count == 0) {
            property.style.backgroundColor = "#006400"
            count = 1; 
        }
        if (count == 1) {
          property.style.backgroundColor = "#483D8B"
          count = 2;
        }
        if (count == 2) {
          property.style.backgroundColor = "#000080"
          count = 3;
        }
        if (count == 3) {
          property.style.backgroundColor = "#000000"
          count = 4;
        }
        if (count == 4) {
          property.style.backgroundColor = "#6495ED"
          count = 5;
        }
        if (count == 5) {
          property.style.backgroundColor = "#00008B"
          count = 6;
        }
        if (count == 6) {
          property.style.backgroundColor = "#2B8E57"
          count = 7;
        }
        if (count == 7) {
          property.style.backgroundColor = "#FF0000"
          count = 8;
        }
        if (count == 8) {
          property.style.backgroundColor = "#4169E1"
          count = 9;
        }
        if (count == 9) {
          property.style.backgroundColor = "#483D8B"
          count = 10;
        }
        if (count == 10) {
          property.style.backgroundColor = "#20B2AA"
          count = 11;
        }
        if (count == 11) {
          property.style.backgroundColor = "#FFD700"
          count = 12;
        }
        if (count == 12) {
          property.style.backgroundcolor = "#191970"
          count = 13;
        }
        if (count == 13) {
          property.style.backgroundColor = "#800000"
          count = 14;
        }
        if (count == 14) {
          property.style.backgroundColor = "#FFD700"
          count = 15;
        }
        if (count == 15) {
          property.style.backgroundColor = "#006400"
          count = 16;
        }
        if (count == 16) {
          property.style.backgroundColor = "#4B0082"
          count = 17;
        }
        if (count == 17) {
          property.style.backgroundColor = "#483D8B"
          count = 18;
        }
        if (count == 18) {
          property.style.backgroundColor = "#FF4500"
          count = 19;
        }
        else {
            property.style.backgroundColor = "#B22222"
            count = 0;
        }
    }
Could someone please tell me why my button clicks in only two colors?
Thanks for the info earlier @encount
CamperBot
@camperbot
Aug 23 2016 03:01
mikejschorah sends brownie points to @encount :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @encount |http://www.freecodecamp.com/encount
Issac Tomatotan
@issactomatotan
Aug 23 2016 03:09
because you have ELSE at the end of the function, everthing go through here will active the ELSE statement
LPR-309
@LPR-309
Aug 23 2016 03:21
@MikeJSchorah Those if statements aren't chained with else if, so the parser is literally going through all of them and ending with the result in else. Converting to a switch statement here may be a good idea, chaining all of those seems like overkill
Issac Tomatotan
@issactomatotan
Aug 23 2016 03:26
@LPR-309 array is a way to go with ++
LPR-309
@LPR-309
Aug 23 2016 03:26
That too, yeah
NixonRichard
@NixonRichard
Aug 23 2016 03:37
hi there
Tony Rivera
@tonyrivera
Aug 23 2016 03:55
Whoa thats a whole lot of if statements
greg
@wearenotgroot
Aug 23 2016 03:56
@tonyrivera i say not enough :smile:
Issac Tomatotan
@issactomatotan
Aug 23 2016 03:57
beside array, any good shortform out there?
greg
@wearenotgroot
Aug 23 2016 03:58

@MikeJSchorah you could have use an object

key: value

.

var bgColors = {
    0:"#006400",
    ...
}

i dont know if count is going to be a random number or it will just be incremented?

    var count = 1;
    function setColor(btn, color) {
           var property = document.getElementById(btn);
            property.style.backgroundColor = bgColors[count];
            count++;
    }
Henry Cabello
@hacu9
Aug 23 2016 05:05
I neeed heeeeeeelp
http://codepen.io/hacu95/pen/JKqXRv?editors=1000 idk why the navbar has some kind of extra clickable elements
encount
@encount
Aug 23 2016 05:14
@hacu9 what do you mean extra?
Henry Cabello
@hacu9
Aug 23 2016 05:15
I fixed it,i had the a closing tags wrong xD
encount
@encount
Aug 23 2016 05:15
@hacu9 :+1:
Henry Cabello
@hacu9
Aug 23 2016 05:15
hows my page looking tho
encount
@encount
Aug 23 2016 05:17
@hacu9 it looks a little narrow - the standard width is 1200px - you can use bootstrap containers to make it easy and responsive. Like the design looks cool!
Henry Cabello
@hacu9
Aug 23 2016 05:19
do you mean <div> ?
<div class=container>
encount
@encount
Aug 23 2016 05:20
@hacu9 yup
Henry Cabello
@hacu9
Aug 23 2016 05:25
Is it normal that if i float the ul right the elements r backwards?
encount
@encount
Aug 23 2016 05:26
@hacu9 yes - if you think about it the first element get pushed to the far right, the next before and so on
Henry Cabello
@hacu9
Aug 23 2016 05:27
@encount thanks
CamperBot
@camperbot
Aug 23 2016 05:27
hacu9 sends brownie points to @encount :sparkles: :thumbsup: :sparkles:
:cookie: 339 | @encount |http://www.freecodecamp.com/encount
Faisal Zulfiqar
@faisal1337
Aug 23 2016 05:40
http://codepen.io/faisal1337/pen/oLqZzE Help me with this. Only rain and snow icons come out of the box while rest icons don't.
kennyq94
@kennyq94
Aug 23 2016 06:01
hey guys do you know why my app takes a long time to load the temperature?
https://codepen.io/kennyqsoftware/full/yJXwyb/
Issac Tomatotan
@issactomatotan
Aug 23 2016 06:05
Glory Wong Zhaohui
@GloryWong
Aug 23 2016 06:08
Jquery Dialog Stack stays on top of overlay
kennyq94
@kennyq94
Aug 23 2016 06:11
@issactomatotan its to make the api use https its the only way i found to make it work
Issac Tomatotan
@issactomatotan
Aug 23 2016 06:12
@kennyq94 it take too long to respond from this origin https://crossorigin.me
kennyq94
@kennyq94
Aug 23 2016 06:13
@issactomatotan that might be the problem
Issac Tomatotan
@issactomatotan
Aug 23 2016 06:15
@kennyq94 try looking jquery jsonp this may help
sunnyp18
@sunnyp18
Aug 23 2016 06:53
@sunnyp18
Hey guys, i just did my first project! would be great if i could get some feedback ( yes yes i know , i didnt put any fonts haha)
https://codepen.io/sunnyp18/details/wWkLkX/
I was also wondering how i can get the image to resize within the pink background n not pull down (i.e when there is more text )
for example, the text in the buttons leave the button when the screen size is small
how do i prevent that
or even get the text to resize itself as the avaialbe area in the button decreases
Henry Cabello
@hacu9
Aug 23 2016 06:56
It looks pretty nice @sunnyp18
sunnyp18
@sunnyp18
Aug 23 2016 06:57
@hacu9 thanks brother
CamperBot
@camperbot
Aug 23 2016 06:57
sunnyp18 sends brownie points to @hacu9 :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @hacu9 |http://www.freecodecamp.com/hacu9
Henry Cabello
@hacu9
Aug 23 2016 06:57
sunnyp18
@sunnyp18
Aug 23 2016 06:59
@hacu9 looking good man!
Adriana
@Adrianacmy
Aug 23 2016 07:00
anyone got the Show the Local Weather done
I stucked for a whole day already
Henry Cabello
@hacu9
Aug 23 2016 07:03
@sunnyp18 thanks
CamperBot
@camperbot
Aug 23 2016 07:03
hacu9 sends brownie points to @sunnyp18 :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @sunnyp18 |http://www.freecodecamp.com/sunnyp18
Henry Cabello
@hacu9
Aug 23 2016 07:03
and not yet
ive been 2 days on the portfolio lol
sunnyp18
@sunnyp18
Aug 23 2016 07:04
haha is it bad my tribute page took 2 days ? @hacu9
Adriana
@Adrianacmy
Aug 23 2016 07:04
@kennyq94 how did you get the city Id in the weather app
Henry Cabello
@hacu9
Aug 23 2016 07:04
i dont think so,were learning n stuff
Adriana
@Adrianacmy
Aug 23 2016 07:08
aaaaaaaaaaa
anyone is working on the wealther app?
Henry Cabello
@hacu9
Aug 23 2016 07:09
Im wondering how do i make the links in the navbar lead to the actual part of the page ?
Adriana
@Adrianacmy
Aug 23 2016 07:13
just use the same id for those two parts
the doer
@ewathedoer
Aug 23 2016 07:13
@hacu9 give the parts the id and make the links direct to these ids in href
Henry Cabello
@hacu9
Aug 23 2016 07:14
@VenusGrape @ewathedoer thanks c:
CamperBot
@camperbot
Aug 23 2016 07:14
:cookie: 269 | @venusgrape |http://www.freecodecamp.com/venusgrape
:cookie: 466 | @ewathedoer |http://www.freecodecamp.com/ewathedoer
hacu9 sends brownie points to @venusgrape and @ewathedoer :sparkles: :thumbsup: :sparkles:
Mariya
@mariyadiminsky
Aug 23 2016 08:32
Anyone done testing with react and enzyme? Specifically with lifecycles like componentDidMount?
Alexander Domikov
@AlexanderDom
Aug 23 2016 08:54
hello everybody !
Andrew1024
@Andrew1024
Aug 23 2016 09:20
Hello! Could anybody help me with my Local Weather App? My button does not work.
Stephen James
@sjames1958gm
Aug 23 2016 09:21
@Andrew1024 post a l ink.
Stephen James
@sjames1958gm
Aug 23 2016 09:24
@Andrew1024 You are not accessing the correct value from the p tag
var temp = +$('#temperature').html();
BTW, I would put that in a javascript variable rather than pull from the DOM.
Andrew1024
@Andrew1024
Aug 23 2016 09:27
Do you mean that I should
```
var temp = $('#temperature').html()
In the beginning?
Stephen James
@sjames1958gm
Aug 23 2016 09:27
@Andrew1024 In your click handler you are accessing .val() but the temperature is in the html part of the p element
@Andrew1024 I meant you should have a variable that you set when you get the temperature and use that in your handler.
It is personal preference, not required
Andrew1024
@Andrew1024
Aug 23 2016 09:30
Thank you @sjames1958gm. Now it works
CamperBot
@camperbot
Aug 23 2016 09:30
andrew1024 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2812 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 23 2016 09:30
@Andrew1024 :+1:
Andrew1024
@Andrew1024
Aug 23 2016 09:30
But I did not understand why I can not get the #temperature through the val()?
Stephen James
@sjames1958gm
Aug 23 2016 09:31
@Andrew1024 p tag doesn't have a value, not like input or button.
Alexander Domikov
@AlexanderDom
Aug 23 2016 09:31
@Andrew1024 val is for form elements like input or button or select
yes ^^
Andrew1024
@Andrew1024
Aug 23 2016 09:31
Understood :)
Stephen James
@sjames1958gm
Aug 23 2016 09:31
@AlexanderDom :+1: listen to this guy - DOM is in his name :)
Alexander Domikov
@AlexanderDom
Aug 23 2016 09:32
:D thank's @sjames1958gm
CamperBot
@camperbot
Aug 23 2016 09:32
alexanderdom sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2813 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Alexander Domikov
@AlexanderDom
Aug 23 2016 09:32
but @sjames1958gm has js in his ^^
Stephen James
@sjames1958gm
Aug 23 2016 09:32
@AlexanderDom lol - good one - thx
CamperBot
@camperbot
Aug 23 2016 09:32
sjames1958gm sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 356 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
sunxiayi
@sunxiayi
Aug 23 2016 09:34
Hi everyone, can anyone enlighten me on challenge 251, seek and destroy? So I understand the correct solution but cannot figure out why my code like this won't work.
Stephen James
@sjames1958gm
Aug 23 2016 09:34
@sunxiayi post your code.
sunxiayi
@sunxiayi
Aug 23 2016 09:34
blob
function destroyer(arr) { // Remove all the values var args = Array.prototype.slice.call(arguments,1); return arr.filter(function(val) { for (var i = 0; i < args.length; ++i) { return val !== args[i]; } } ); }
Stephen James
@sjames1958gm
Aug 23 2016 09:35
@sunxiayi Your code will return when i == 0 and not check all the values in args. consider the .every function
sunxiayi
@sunxiayi
Aug 23 2016 10:04
thanks it works!
blob
Bhushan Patil
@mrpatil007
Aug 23 2016 10:10

http://techgenz.in/weather/

hey just finish weather application see how is it ...! waiting for feedback

Stephen James
@sjames1958gm
Aug 23 2016 10:10
@sunxiayi :+1
anybody can see results??
mine always geolocation denied even though i already turn on GPS
Sorin Ruse
@sorinr
Aug 23 2016 10:36
@VenusGrape run your pen over https and it will work
Andrew1024
@Andrew1024
Aug 23 2016 10:58
Could anybody help to make .container on the whole screen?
http://s.codepen.io/Andrew1024/debug/akLJjo
encount
@encount
Aug 23 2016 11:00
@Andrew1024 <div class=‘container-fluid’> - bootstrap
Andrew1024
@Andrew1024
Aug 23 2016 11:02
@encount Nothing has changed
encount
@encount
Aug 23 2016 11:03
@Andrew1024 are you using bootstrap?
Andrew1024
@Andrew1024
Aug 23 2016 11:03
yes
encount
@encount
Aug 23 2016 11:04
@Andrew1024 do you have a link to your code?
encount
@encount
Aug 23 2016 11:07
@Andrew1024 you need to remove it from your css - you are overriding bootstrap
Andrew1024
@Andrew1024
Aug 23 2016 11:08
Maybe I asked the wrong question. I need to make the vertical align.
And make the image on the whole screen in vertical
Eamonn
@reesby
Aug 23 2016 11:15
is anyone dabbleing with .net core?
encount
@encount
Aug 23 2016 11:17
@Andrew1024 add body { height: 100%; background: url(your image) no-repeat; background-size:cover} should work on the image
Andrew1024
@Andrew1024
Aug 23 2016 11:24
All the same but I understood what to do next :D
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:25
@Andrew1024 even this works for your question, jumbotron will be centered vertically and horizontally, and background-image will be full height of screen
.container-fluid {
    min-height: 100vh;
   position: relative;
}
.container-fluid .jumbotron{
   position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}
Andrew1024
@Andrew1024
Aug 23 2016 11:25
@vinaypuppal I will try now
Fahrettin Can Mekikoğlu
@fcanmekikoglu
Aug 23 2016 11:27
hi guys
how can i add scrollspy to this site
Andrew1024
@Andrew1024
Aug 23 2016 11:28
@vinaypuppal background-image is not full height of screen
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:28
@Andrew1024 can u share updated pen
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:31
@Andrew1024 add background-size: cover to body then it shld work
@Andrew1024 previously i saw on small screen and did not notice that
Andrew1024
@Andrew1024
Aug 23 2016 11:34
@vinaypuppal Maybe I should add background-image to container-fluid not to body?
No, it does not work
background-size of body is already cover
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:37
This message was deleted
@Andrew1024 well it works for me http://codepen.io/vinaypuppal/pen/vKwAaw
@Andrew1024 i guess the problem is background-size:cover need to be background-size: cover space is required after : for codepen to correctly parse Sass
Andrew1024
@Andrew1024
Aug 23 2016 11:41
Yes, now it works properly. Thank you @vinaypuppal
CamperBot
@camperbot
Aug 23 2016 11:41
andrew1024 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 441 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:41
@Andrew1024 :smile:
Stein-T Dale
@Lofthur
Aug 23 2016 11:45
Hi. Can someone help me with some css. Im trying to align an a tag and a p tag. I have tried for hours but i can't get it to work. Here is my pen: http://codepen.io/Lofthur/pen/9badcf2bd1985cc0ce814761301a08ac
Adriana
@Adrianacmy
Aug 23 2016 11:48
@sorinr Thanks . it worked on https as you said
CamperBot
@camperbot
Aug 23 2016 11:48
venusgrape sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 680 | @sorinr |http://www.freecodecamp.com/sorinr
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:48
@Lofthur the easy way to align is by using flexbox. Use this if u dont find any alternative
.broadcasters li{
    display: flex;
    align-items: center;
}
@Lofthur and read about flexbox here http://css-tricks.com/snippets/css/a-guide-to-flexbox/
Stein-T Dale
@Lofthur
Aug 23 2016 11:51
@vinaypuppal Thanks. It solved it. Will follow the link now and read more about it :D
CamperBot
@camperbot
Aug 23 2016 11:51
lofthur sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 442 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 11:51
@Lofthur :smile: and even this http://flexbox.io/
Stein-T Dale
@Lofthur
Aug 23 2016 11:52
Nice :D
Sorin Ruse
@sorinr
Aug 23 2016 11:55
@VenusGrape welcome
Mike
@MikeJSchorah
Aug 23 2016 12:26
<input type="button" id="button" value = "button" style= "color:white" onclick="setColor('button', '#101010')";/>
If this html sets my button color with each click, how do I set my text with each click?
Imiszkusz
@Imiszkusz
Aug 23 2016 12:27
Hi! I have a little problem with making the tweet button work on the 'random quote machine' .. is there anyone who could help ?
  1. no matter what i do to the button, it always displays my pens url in the tweet.
  2. I can't put the quote and author as tweet text. i am trying it by modifying the href property of the element. but it seems the event handler doesn't do anything when i click on it (i tried console logging some simple stuff and it doesn't even do that.)
    here's the code:
    $(".twitter-share-button").on("click", function(){
    $(this).prop("href", "https://twitter.com/intent/tweet?text=" + quote + " " + author);
    })
and this is the button:
<a href="https://twitter.com/intent/tweet" class="twitter-share-button">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
vínαч puppαl
@vinaypuppal
Aug 23 2016 12:30
@Imiszkusz you cant access that button in JS as you loaded twitter widgets.js , you tag will be replaced by iframe. you can verify that by using inspect element on that button.
@Imiszkusz my advice is use your own a tag (style it as needed) and then add http://twitter.com/share?text=<quote> By <author> as href to this button from javascript like how your doing previously
Ravi Teja
@RviTja
Aug 23 2016 12:39
Hello guys any suggestions to improve this pen http://codepen.io/RviTja/pen/OXYRkA :)
Imiszkusz
@Imiszkusz
Aug 23 2016 12:44
@vinaypuppal Ok, I see. Thank you very much !
CamperBot
@camperbot
Aug 23 2016 12:44
imiszkusz sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 443 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 12:47
@RviTja looks good just one suggestion add width: 100% to img in CSS
encount
@encount
Aug 23 2016 12:47
@RviTja your pen is giving me warning messages - you need to verify your email :) The owner of this Pen needs to verify their email address to enable Full Page View.
vínαч puppαl
@vinaypuppal
Aug 23 2016 12:48
@RviTja and verify your email :smile: to get full features of codepen
Ravi Teja
@RviTja
Aug 23 2016 12:52
@vinaypuppal sure thank you @encount i will verify and let you know now
CamperBot
@camperbot
Aug 23 2016 12:52
rvitja sends brownie points to @vinaypuppal and @encount :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @encount |http://www.freecodecamp.com/encount
:cookie: 444 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Ravi Teja
@RviTja
Aug 23 2016 12:58
done
vínαч puppαl
@vinaypuppal
Aug 23 2016 12:59
@RviTja and no need to use <style> tag in css panel of codepen , this will help u if your new to codepen https://medium.freecodecamp.com/codepen-tips-and-best-practice-cf926ebd0b11?gi=7d8bfa6411f3
Ravi Teja
@RviTja
Aug 23 2016 13:02
Sure , @vinaypuppal how to put the img and its description with a single border?
encount
@encount
Aug 23 2016 13:03
@RviTja put them both in one div and add the border to the div
AhmedA-del
@AhmedA-del
Aug 23 2016 13:05
Hello all
what was your resources to learn responsive web design
encount
@encount
Aug 23 2016 13:06
@AhmedA-del bootstrap is quick and easy to learn
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:07
@AhmedA-del for responsive layouts i would suggest flexbox you can use these resources http://flexbox.io and css-tricks.com/snippets/css/a-guide-to-flexbox/
Ravi Teja
@RviTja
Aug 23 2016 13:07
@encount Okay ty
CamperBot
@camperbot
Aug 23 2016 13:07
rvitja sends brownie points to @encount :sparkles: :thumbsup: :sparkles:
:warning: rvitja already gave encount points
AhmedA-del
@AhmedA-del
Aug 23 2016 13:08
@encount @vinaypuppal thanks
CamperBot
@camperbot
Aug 23 2016 13:08
ahmeda-del sends brownie points to @encount and @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 445 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
:cookie: 346 | @encount |http://www.freecodecamp.com/encount
Ravi Teja
@RviTja
Aug 23 2016 13:08
Building portfolio seems a bit hard any suggestions on what to use most?
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:09
@RviTja your using .box class on image right ? Move it to figure tag and specify border-color other than white as u did
@RviTja i saw your from Hyderabad join this group, we organise FCC meetups every week you can learn more https://www.facebook.com/groups/free.code.camp.hyderabad/?ref=bookmarks
Ravi Teja
@RviTja
Aug 23 2016 13:12
Got the description now within the box ty :) sure i will join it
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:13
:smile: @RviTja
Joel Santos
@St3ps
Aug 23 2016 13:21

I'm trying to center a 3x3 grid of columns using bootstrap. I've got one row. and the colums are all produced through js, but they're layed out as follows:

    <div class="container ">
    <div class="row tictactoe ">
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>
        <div class="col-md-4 cell" > </div>

    </div>
    </div>

the relevant css is as follows

.tictactoe {

  margin-left: auto;
  margin-right: auto;
  width: 600px;

}

  .col-md-4 {

    border-style: solid;
    height: 50px;
    width: 50px;

}

You can see it outlayed here:
https://jsfiddle.net/5ec0ac6t/

Is there anyway i can have 3 cols per line instead of having them all in one line? (i get mixed results with all of them horizontal, or vertical...)

Dylan
@dhcodes
Aug 23 2016 13:25
@St3ps idk why your fiddle isn't showing the boxes for me
but i'm guessing that if you make new row after every 3 divs, you will get the desired outcome
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:25
@dhcodes yes same here
Joel Santos
@St3ps
Aug 23 2016 13:26
:S
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:26
@St3ps @dhcodes he wrote css in js panel
Dylan
@dhcodes
Aug 23 2016 13:27
gotcha
Joel Santos
@St3ps
Aug 23 2016 13:27
@vinaypuppal @dhcodes lol i corrected it, but i must've accidently undoed it
@dhcodes alright let me try that out
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:30
@St3ps or u can do this
.tictactoe {
width: 180px;
}
.tictactoe .col-md-4 {
 float: left;
}
why width:180px?
Because we need 50px width box's and each has left and right border 10px @St3ps but you can adjust width according to u r needs
Joel Santos
@St3ps
Aug 23 2016 13:34
@vinaypuppal That worked! @dhcodes @vinaypuppal thanks guys!
CamperBot
@camperbot
Aug 23 2016 13:34
st3ps sends brownie points to @vinaypuppal and @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 446 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
:star2: 1352 | @dhcodes |http://www.freecodecamp.com/dhcodes
Joel Santos
@St3ps
Aug 23 2016 13:34
I just have to think of a way to make this responsive now, perhaps with media queries?
Dylan
@dhcodes
Aug 23 2016 13:35
@St3ps i think my way didn't work because you need bootstrap
for the grid
glad @vinaypuppal got it
Joel Santos
@St3ps
Aug 23 2016 13:35
@dhcodes i tried spliting 3 cols per row, with and without the 'main row' (the tictactoe row)
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:35
@dhcodes :smile:
Joel Santos
@St3ps
Aug 23 2016 13:36
it still didn't work, i'm still kinda confused as to why bootstrap is ignoring the col-md-* classes, but i think it has to do with me being explicit with the size of each col
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:37
@St3ps in jsfiddle u did not add bootstrap i think
Joel Santos
@St3ps
Aug 23 2016 13:37
@vinaypuppal LOL....im so sorry, i rarely use jsfiddle
Dylan
@dhcodes
Aug 23 2016 13:37
@St3ps yeah you need to ref bootstrap cdn
even then you need to add the call to it at the top
I think there is a bootstrap fiddle somewhere out there
Joel Santos
@St3ps
Aug 23 2016 13:39
@dhcodes no sweat, ill just add the external ref and insert it in the code
Muhammad Hasham
@MohammadHasham
Aug 23 2016 13:39
What should be my approach for symmetric difference? i have tried approximately everything and delete my code with frustration
@dhcodes @St3ps @vinaypuppal
Joel Santos
@St3ps
Aug 23 2016 13:39
lemme see how it lays everything out
Dylan
@dhcodes
Aug 23 2016 13:39
@St3ps i can't get it to work
hmmm
@MohammadHasham i haven't done that one
Muhammad Hasham
@MohammadHasham
Aug 23 2016 13:41
Anyone else please?
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:41
@MohammadHasham same i haven't done that.
Muhammad Hasham
@MohammadHasham
Aug 23 2016 13:42
@vinaypuppal Okay :worried:
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:42
@MohammadHasham sorry are u talking about challenge??
Muhammad Hasham
@MohammadHasham
Aug 23 2016 13:42
yes!
@vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:42
i thought about layout @MohammadHasham
Dylan
@dhcodes
Aug 23 2016 13:42
@St3ps weird. Works in codepen http://codepen.io/dhcodes/pen/BzZONx
maybe the grid is jquery dependent
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:43
@MohammadHasham link to challenge
@dhcodes i dont see 3x3 grid in that pen
Dylan
@dhcodes
Aug 23 2016 13:44
@vinaypuppal what do you see?
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:45
@dhcodes i see 1x6 grid
Joel Santos
@St3ps
Aug 23 2016 13:45
@dhcodes yeah i couldn't get it to work either.... but if its a jquery dependency that can be solved, let me see if i add it to fiddle if it works
Dylan
@dhcodes
Aug 23 2016 13:45
hmmm, it's 3x3 on my screen
weird
@vinaypuppal here's the full view: http://codepen.io/dhcodes/full/BzZONx/
Mike
@MikeJSchorah
Aug 23 2016 13:46
<input type="button" id="button" value = "button" style= "color:white" onclick="setColor('button', '#101010')";/>
If this html sets my button color with each click, how do I set my text with each click?
Dylan
@dhcodes
Aug 23 2016 13:46
@MikeJSchorah you would need to write a function that access 'button' html
or button textContent
@MikeJSchorah if you're using jQuery, it might be something like
$('button').on('click', function() {
    this.html('new text')
}
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:47
@dhcodes well now i see 3x3 grid but before i saw this
grid.png
Dylan
@dhcodes
Aug 23 2016 13:48
@vinaypuppal weird
WEIRD I SAY
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:49
@dhcodes yes on larger screen its okay but u see on small screen it breaks
Joel Santos
@St3ps
Aug 23 2016 13:49
@dhcodes It does work in codepen, i was just saying i couldn't get it to work in fiddle, and i added all the needed resources , bootstrap .css, .js, and jquery (i didn't put them in the code as fiddle instructs you not to ... )
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:49
i saw on gitter codepen preview
Dylan
@dhcodes
Aug 23 2016 13:50
@vinaypuppal true
my way is no good
don't do it @St3ps
vínαч puppαl
@vinaypuppal
Aug 23 2016 13:50
@MohammadHasham sorry i just saw my FCC map haven't done symmetric-difference.
Joel Santos
@St3ps
Aug 23 2016 13:53
@dhcodes ;p alright bro
Joel Santos
@St3ps
Aug 23 2016 14:32
uh did this page die or have i been unconnected for 40 minutes without knowing
Unknown
@Unknownhezipaz
Aug 23 2016 14:39
http://codepen.io/majedmahmood23/pen/NAzoQb my portfolio part of the page is messed up and my html background is not showing and it is taking the body color I have portfolio part of the page
Joel Santos
@St3ps
Aug 23 2016 14:41
@majedmahmood27 what is your html background supossed to show?
a color? if so, what color?
Sorin Ruse
@sorinr
Aug 23 2016 14:43
@vinaypuppal saw you have loaded boostrap.css. why don't u use its features?
vínαч puppαl
@vinaypuppal
Aug 23 2016 14:43
@sorinr sorry about which code are you talking about
Joel Santos
@St3ps
Aug 23 2016 14:44
@majedmahmood27 if you want a red colored background replace 'html' with 'body'
body {

background-color: red;

}
Sorin Ruse
@sorinr
Aug 23 2016 14:45
@vinaypuppal oops. it was not for u. sorry
vínαч puppαl
@vinaypuppal
Aug 23 2016 14:45
@sorinr okay no problem :smile:
Sorin Ruse
@sorinr
Aug 23 2016 14:45
@majedmahmood27 saw you have loaded boostrap.css. why don't u use its features?
Joel Santos
@St3ps
Aug 23 2016 14:45
I have a question for everyone:
If you use bootstrap, and you use the container class, when would you use the 'container' and when would you use 'container-fluid' ?
vínαч puppαl
@vinaypuppal
Aug 23 2016 14:48
.container when u want content inside it to be 900px(or 1024px i think not sure) width and to be centred horizontally. .container-fluid when u want full width(100%) container. @St3ps
Ravi Teja
@RviTja
Aug 23 2016 14:49
@vinaypuppal is container-fluid class supposed to size the image width to 100
that can be done with the style element as you have mentioned to be before right
vínαч puppαl
@vinaypuppal
Aug 23 2016 14:50
no it will make div to take 100% width of screen @RviTja
Ravi Teja
@RviTja
Aug 23 2016 14:50
so if my img is in div is it supposed to be scaled to 100% automatically after using the fluid-container?
Moisés Man
@moigithub
Aug 23 2016 14:51
nop
Ravi Teja
@RviTja
Aug 23 2016 14:52
So what would be the use of that class?
Moisés Man
@moigithub
Aug 23 2016 14:52
<div class="container-fluid">
    <img src="...">
</div>
vínαч puppαl
@vinaypuppal
Aug 23 2016 14:52
@RviTja no i won't do since images will take their natural width unless u specify width on them externally
Moisés Man
@moigithub
Aug 23 2016 14:52
container have auto witdh (full width)
img not
Muhammad Hasham
@MohammadHasham
Aug 23 2016 14:53

function sym() {
 var arr1 =[];
 var arr2 = [];
 var arr = [];
 var result = [];
  var flag = false;
 arr1 = arguments[0];
 arr2 = arguments[1];
 arr = arr1.concat(arr2);




for (var i=0;i<arr1.length;i++)
  {
    for (var j=0;j<arr.length;j++)
     {

     if (arr1.indexOf(arr[j]) != -1) //elements [1,2,3] present so it wont return -1.
      {
        flag = true;
      }
    else if (flag)
      {
        result.push(arr[j]);
        flag = false;
      }
     }
  }


  return result;

}

sym([1, 2, 3], [5, 2, 1, 4]);
why is this not returning [3,4,5]
Moisés Man
@moigithub
Aug 23 2016 14:54
if u want ur image adapt to its container.. u need to add img-responsive class to ur img @RviTja
Gilang Gumilar
@gilangmlr
Aug 23 2016 14:56
Hi, how can I disable popup green notif messages?
Moisés Man
@moigithub
Aug 23 2016 14:57
write /notify-mute on chat
Sorin Ruse
@sorinr
Aug 23 2016 14:59
@vinaypuppal @RviTja have u ever downloaded the bootstrap source and took at look at it? to understand how it function? I strongly recommend to do that. it will help you a lot to understand the principles of a css framework
Gilang Gumilar
@gilangmlr
Aug 23 2016 14:59
Still, it won't dissapear. :worried:
vínαч puppαl
@vinaypuppal
Aug 23 2016 15:02
@sorinr okay dude. Anyway i don't use bootstrap or any css frameworks at all in my projects i was just answering from some CSS knowledge i have. If answered any question incorrectly please correct me.
Gilang Gumilar
@gilangmlr
Aug 23 2016 15:02
Ok, got it. You have to type it in the chat room.
Thanks @moigithub
CamperBot
@camperbot
Aug 23 2016 15:03
gilangmlr sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1979 | @moigithub |http://www.freecodecamp.com/moigithub
Joel Santos
@St3ps
Aug 23 2016 15:04
@vinaypuppal kinda late, but just wanted to thank you for answering my question
CamperBot
@camperbot
Aug 23 2016 15:04
st3ps sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 447 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Islam Ibakaev
@dagman
Aug 23 2016 15:05
@MohammadHasham you don't need this flag stuff it's is unnessesary complication
@MohammadHasham you only need arr1 and arr2 and check one against another that's all
cogdesign
@cogdesign
Aug 23 2016 15:10
ahhhhh I need help!!! I want to murder apple. Can anyone help me to figure out how to disable rubber band bouncing /elastic behavior for safari on ios? i've gone through stack exchange but can't figure it out:
tylerobot
@tylerobot
Aug 23 2016 15:13
Trying to create a for loop that will grab ten items in my JSON object, but I'm having trouble figuring out where I'm going wrong. If I hardcode it, instead of using the variable "i" it works, so I'm not sure what I'm doing wrong.
$.getJSON(url, function(data) {
      //loop to iterate over JSON data
      for (var i = 0; i < 10; i++) {
        $(".results").html(data.query.search[i].title + "<br />" + data.query.search[i].snippet + "...");
      }
    }); //end JSON request
This message was deleted
Unknown
@Unknownhezipaz
Aug 23 2016 15:14
@St3ps my html background meant to show red and the portfolio part of the page should show white
Islam Ibakaev
@dagman
Aug 23 2016 15:17
@MohammadHasham something like this
function sym() {
 var arr1 = arguments[0];
 var arr2 = arguments[1];

 var arr1Missing = arr2.filter(function(item) {
     return !arr1.includes(item);
 });
 var arr2Missing = arr1.filter(function(item) {
     return !arr2.includes(item);
 });

 return arr1Missing.concat(arr2Missing);
}

sym([1, 2, 3], [5, 2, 1, 4]);
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:19
@dagman Thanks
CamperBot
@camperbot
Aug 23 2016 15:19
mohammadhasham sends brownie points to @dagman :sparkles: :thumbsup: :sparkles:
:cookie: 630 | @dagman |http://www.freecodecamp.com/dagman
Joel Santos
@St3ps
Aug 23 2016 15:19
@majedmahmood27 just do what i said on my quote then if you change the html css selector to body and then { background-color: red }
it will work
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:20
@dagman what does 'item' infer here??
Islam Ibakaev
@dagman
Aug 23 2016 15:20
@MohammadHasham if you want you can do this
function sym() {
 var arr1 = arguments[0];
 var arr2 = arguments[1];

 return arr2
     .filter(function(item) {
         return !arr1.includes(item);
     })
     .concat(
         arr1
         .filter(function(item) {
             return !arr2.includes(item);
        })
     );
}
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:21
@dagman No i guess that one as really fine but can you tell me about that item?
what is 'item' being passed?
Islam Ibakaev
@dagman
Aug 23 2016 15:21
@MohammadHasham it a parameter of function that .filter() method takes as parameter
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:22
@dagman is it always mandatory
Islam Ibakaev
@dagman
Aug 23 2016 15:22
@MohammadHasham you can name it whatever you like
@MohammadHasham el, element, number it doesn't matter
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:22
so atleast one parameter should be there right?
Islam Ibakaev
@dagman
Aug 23 2016 15:23
@MohammadHasham yep
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:23
@dagman Thanks
CamperBot
@camperbot
Aug 23 2016 15:23
mohammadhasham sends brownie points to @dagman :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave dagman points
Islam Ibakaev
@dagman
Aug 23 2016 15:23
@MohammadHasham you should read about this methods
@MohammadHasham there is no way to do real-world javascript programming without them
Unknown
@Unknownhezipaz
Aug 23 2016 15:24
@St3ps thanks bro its working.The other problem I have is the portfolio part of the page it does not strectch so when I put content on there it overlaps
CamperBot
@camperbot
Aug 23 2016 15:24
majedmahmood27 sends brownie points to @st3ps :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @st3ps |http://www.freecodecamp.com/st3ps
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:24
@dagman you mean without .filter
Islam Ibakaev
@dagman
Aug 23 2016 15:25
@MohammadHasham there are others methods too like .map or .reduce
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:25
Yeah! i know regarding .reduce as well
so i need to learn filter and map?
Islam Ibakaev
@dagman
Aug 23 2016 15:25
@MohammadHasham .every(), .some()
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:25
@dagman Okay noted down in my list
Islam Ibakaev
@dagman
Aug 23 2016 15:25
@MohammadHasham you need learn all of them bro :smile:
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:36
This message was deleted
This message was deleted
function sym() {
 var arr1 = arguments[0];
 var arr2 = arguments[1];
 var arr3 = arguments[2];
 var fery = [];

 var arr1Missing = arr2.filter(function(item) {
     return !arr1.includes(item);
 });
 var arr2Missing = arr1.filter(function(item) {
     return !arr2.includes(item);
 });

  fery =arr1Missing.concat(arr2Missing);

  var arr3Missing = arr3.filter(function(item){
    return !fery.includes(item);

  });
  return fery.concat(arr3Missing);
}

sym([1, 2, 5], [2, 3, 5], [3, 4, 5]);
there is an extra 3
whereas,it should return [1,4,5]
but it is returning [1,3,4,5]
@dagman
why is test2 undefined? is something wrong with the function?
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:39
@VincentWue is that simple JS or angular?
vincentwue
@vincentwue
Aug 23 2016 15:40
angular
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:40
@VincentWue Sorry then! :sparkles:
learning js
vincentwue
@vincentwue
Aug 23 2016 15:42
im stupid dude found it
Darth Skywalker
@adityaparab
Aug 23 2016 15:43
@VincentWue : getInfo is your async call.. so it's returning undefined.
do $scope.test2 = JSON.parse(msg) inside your .success instead of returning it
Islam Ibakaev
@dagman
Aug 23 2016 15:44
@MohammadHasham
function sym() {
 function getMissing(list1, list2) {
     return list2.filter(function(item) {
        return !list1.includes(item);
     });
 }
 return Array.from(arguments).reduce(function(list1, list2) {
     return getMissing(list1, list2).concat(getMissing(list2, list1));
 });
}
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:45
@dagman you are a pro! literally
Islam Ibakaev
@dagman
Aug 23 2016 15:45
@MohammadHasham
firstly we should abstract finding missing elements into function
secondly we should utilize .reduce()
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:46
@dagman oky
Islam Ibakaev
@dagman
Aug 23 2016 15:46
@MohammadHasham now no matter how much arguments you put into sum() function
@MohammadHasham i have utilized some es6 stuff .includes() and Array.from()
cos i am bit lazy writing Array.prototype.slice.call(arguments) shit
so i pretend you are comfortable with es6
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:50
@dagman yeah! that appears to be fine though
@dagman
thanks
Islam Ibakaev
@dagman
Aug 23 2016 15:51
@MohammadHasham have any other question? cos i need to go :smile:
Muhammad Hasham
@MohammadHasham
Aug 23 2016 15:51
@dagman no thanks
CamperBot
@camperbot
Aug 23 2016 15:51
mohammadhasham sends brownie points to @dagman :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave dagman points
Islam Ibakaev
@dagman
Aug 23 2016 15:51
ok you welcome!
vincentwue
@vincentwue
Aug 23 2016 15:55
@adityaparab but thats why i want the function, to do it with all channel names and safe it as an array
i will see if i can push it to an $scope.array
vincentwue
@vincentwue
Aug 23 2016 16:01
how to do this stuff properly?
Moisés Man
@moigithub
Aug 23 2016 16:04
@VincentWue what push do..and what it returns ?? (nothing to do with angular ) (basic js )
a=[];
a= a.push(1) /// wrong if u can answer that question above.. u will know why
vincentwue
@vincentwue
Aug 23 2016 16:08
thats obvious, but have you seen my code? maybe i should do it without angular
Moisés Man
@moigithub
Aug 23 2016 16:08
whats obvious?? u didnt answer the question...
posted that.. cuz this $scope.array = $scope.array.push(JSON.parse(msg));
same thing
vincentwue
@vincentwue
Aug 23 2016 16:10
sorry, it just returns 1, did you mean that?
Moisés Man
@moigithub
Aug 23 2016 16:10
push return the length of the array after add the element...
vincentwue
@vincentwue
Aug 23 2016 16:11
basic java
Moisés Man
@moigithub
Aug 23 2016 16:11
soo if u have an array with 10 elements and u push another one.... instead of returning [1,2,32,4,5,6,7,,,, 11]
it will return 11 <-- a num not an array
so u overwriting it
vincentwue
@vincentwue
Aug 23 2016 16:11
script, thanks
Toni Shortsleeve
@KoniKodes
Aug 23 2016 16:11
@VincentWue Your info is going to the console. Try to send prepend the info to a class on the html.
vincentwue
@vincentwue
Aug 23 2016 16:12
@moigithub thanks
CamperBot
@camperbot
Aug 23 2016 16:12
vincentwue sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1981 | @moigithub |http://www.freecodecamp.com/moigithub
Moisés Man
@moigithub
Aug 23 2016 16:13
:+1: :)
@KoniKodes not console.. angular have template...{{array}}<--
vincentwue
@vincentwue
Aug 23 2016 16:16
yeah i was confused because of the strings, they are immutable and you always have to do stuff like a = a.substring(2, 3); etc
Darth Skywalker
@adityaparab
Aug 23 2016 16:17
@VincentWue : You're gonna have to use promises to handle this
let me create a small POC
vincentwue
@vincentwue
Aug 23 2016 16:18
yes, please examples, im not a native speaker, sometimes a bit difficult
Moisés Man
@moigithub
Aug 23 2016 16:18
i did twich with angular1 like 6 or 8 months ago, forgot lot of stuff
NixonRichard
@NixonRichard
Aug 23 2016 16:20
var keyword = $("#search-input").val();
hi there
any one know what s the meaning of .val() there ?
and why do i have to add $ to ("the id")
Darth Skywalker
@adityaparab
Aug 23 2016 16:21
@VincentWue
app.controller('controller', function($scope, $http) {
  $scope.array = [];
  fillArray();
  function fillArray() {
    var promises = [];
    for (var i = 0 ; i<streams.length ; i++) {
      promises.push($http.get('https://api.twitch.tv/kraken/streams/' + streams[i] + '?callback=foo'));
    }
    Promise.all(promises).then(function(response){
      //response will contain an array of responses from all the API calls.
      //map your data in usable format here.
      // something like $scope.array.push(your required data)
    });
  }

});
you can do a console.log(response); inside the .then method to see the structure of the data
Moisés Man
@moigithub
Aug 23 2016 16:24
i think i used the $q service (think thats is/was the name) (promises)
Darth Skywalker
@adityaparab
Aug 23 2016 16:24
@moigithub : Yes. $q would also work
but ultimately, it gets back to native Promise so I tend to go with native code
vincentwue
@vincentwue
Aug 23 2016 16:28
so Promise is pure JS?
Moisés Man
@moigithub
Aug 23 2016 16:28
es6
vincentwue
@vincentwue
Aug 23 2016 16:28
jip, found it
nice shit, thanks @moigithub
CamperBot
@camperbot
Aug 23 2016 16:29
vincentwue sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:warning: vincentwue already gave moigithub points
Moisés Man
@moigithub
Aug 23 2016 16:30
after learning react.. i feel like angular2 is easier to learn than ng1 :) (using typescript ofcourse)
never learn about directives on ng1.. seems complicated tome
Darth Skywalker
@adityaparab
Aug 23 2016 16:32

@VincentWue

so Promise is pure JS?

Yes. Promise is pure jS. Available in ES5 as well

vincentwue
@vincentwue
Aug 23 2016 16:33
how long do you program so far, @moigithub ?
Moisés Man
@moigithub
Aug 23 2016 16:33
been on fcc almost 1 year
vincentwue
@vincentwue
Aug 23 2016 16:34
nice
Moisés Man
@moigithub
Aug 23 2016 16:34
11 months probably... but took 3 months break
Wesley Schulte
@WesSchulte
Aug 23 2016 16:43
can somebody help me with whats wrong with my image link?http://codepen.io/CodingChinchillas/pen/wWbJbL
Jason Luboff
@JLuboff
Aug 23 2016 16:44
@WesSchulte should be<img.. not <image
and also no need for target="_blank" as its not a hyperlink
and now that I look closer...the first image doesnt have a proper image url (doesn't end in .jpg or the like)
Wesley Schulte
@WesSchulte
Aug 23 2016 16:51
@JLuboff yeah im completely lost on how to get the right info from the image link
Jason Luboff
@JLuboff
Aug 23 2016 16:53
You got the second image correct. It almost looks like the first image(the broken one) you were trying to create a link instead of an image?
Wesley Schulte
@WesSchulte
Aug 23 2016 16:53
i fixed it up, but the image wont resize to be http://codepen.io/CodingChinchillas/pen/wWbJbL
circular
Jason Luboff
@JLuboff
Aug 23 2016 16:56
@WesSchulte You need to apply the thumbnail class to the image, not the div. Therefore you should have <img src="https://s4.postimg.org/yabnbhel5/rickandmorty.jpg" class="thumbnail">
Wesley Schulte
@WesSchulte
Aug 23 2016 16:57
@JLuboff thank you so much, it worked!!!
CamperBot
@camperbot
Aug 23 2016 16:57
wesschulte sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 308 | @jluboff |http://www.freecodecamp.com/jluboff
Jason Luboff
@JLuboff
Aug 23 2016 16:58
:+1:
Sorin Ruse
@sorinr
Aug 23 2016 18:00
@WesSchulte no matter what you do if your pict is not square(same width and height) using thumbnail class will add a 50% border radius to an unsquare image. so the result will be actually an ellipsis
Mike
@MikeJSchorah
Aug 23 2016 18:07


var count = 1;
    function setColor(btn, color, text) {
        var property = document.getElementById(btn);
        if (count == 0) {
            property.style.backgroundColor = "#006400"
            property.value = "Perfection is not attainable. But if we chase perfection, we can catch excellence."
            count = 1; 
        }
        else if (count == 1) {
          property.style.backgroundColor = "#483D8B"
          property.value = "Success isn't measured by money or power or social rank. Success is measured by your discipline and inner peace."
          count = 2;
        }
        else if (count == 2) {
          property.style.backgroundColor = "#000080"
          property.value = "Leadership is a matter of having people look at you and gain confidence ... If you're in control, they're in control."
          count = 3;
        }
        else if (count == 3) {
          property.style.backgroundColor = "#000000"
          property.value = "Self-praise is for losers. Be a winner. Stand for something. Always have class, and be humble."
          count = 4;
        }
        else if (count == 4) {
          property.style.backgroundColor = "#6495ED"
          property.value = "You fail all the time. But you aren't a failure until you start blaming someone else."
          count = 5;
        else if (count == 5) {
          property.style.backgroundColor = "#00008B"
          property.value = "If you're afraid of confrontation, you're not going to do very well."
          count = 6;
        }
        else if (count == 6) {
          property.style.backgroundColor = "#2B8E57"
          property.value = "Stay focused. You're start does not determine how you are going to finish."
          count = 7;
        }
        else if (count == 7) {
          property.style.backgroundColor = "#FF0000"
          property.value = "I've observed that if individuals who prevail in a highly competitive environment have any one thing in common besides success, it is failure--and their ability to overcome it."
          count = 8;
        }
        else if (count == 8) {
          property.style.backgroundColor = "#4169E1"
          property.value = "Adversity is an opportunity for heroism."
          count = 9;
        }
        else if (count == 9) {
          property.style.backgroundColor = "#483D8B"
          property.value = "The difference between ordinary and extraordinary is that little extra."
          count = 10;
        }
        else if (count == 10) {
          property.style.backgroundColor = "#20B2AA"
          property.value = "The superior man blames himself. The inferior man blames others."
          count = 11;
        }
        else if (count == 11) {
          property.style.backgroundColor = "#FFD700"
          property.value = "Confidence is a very fragile thing, and it certainly is something that has to start with your mental approach and your ability to respond and stay focused and not allow negative thoguhts to enter into your own mind. When you're successful, it's easier to expect success. All of a sudden it's not there, it becomes more of a challenge."
          count = 12;
        }
        else if (count == 12) {
          property.style.backgroundcolor = "#191970"
          property.value = "There is an old saying about the strength of the wolf is the pack, and I think there is a lot of truth to that. On a team, it's not the strength of the individual players, but it is the strength of the unit and how they all function together."
    else if (count == 13) {
      property.style.backgroundColor = "#800000"
      property.value = "Failures are expected by losers, ignored by winners."
      count = 14;
    }
    else if (count == 14) {
      property.style.backgroundColor = "#FFD700"
      property.value = "Pressure is something that you feel when you don't know what you're doing."
      count = 15;
    }
    else if (count == 15) {
      property.style.backgroundColor = "#006400"
      property.value = "Nobody who ever gave his best 
```
        else if (count == 15) {
          property.style.backgroundColor = "#006400"
          property.value = "Nobody who ever gave his best regretted it."
          count = 16;
        }
        else if (count == 16) {
          property.style.backgroundColor = "#4B0082"
          property.value = "When you go into the lion's den, you don't tippy toe in. You carry a spear, you go in screaming like a banshee, you kick whatever doors in, and say, 'Where's the son of a bitch!' If you go in any other way you're going to lose."
          count = 17;
        }
        else if (count == 17) {
          property.style.backgroundColor = "#483D8B"
          property.value = "Try not to do too many things at once. Know what you want, the number one thing today and tomorrow. Persevere and get it done."
          count = 18;
        }
        else if (count == 18) {
          property.style.backgroundColor = "#FF4500"
          property.value = "When you win, say nothing. When you lose, say less."
          count = 19;
        }
        else {
            property.style.backgroundColor = "#B22222"
            property.value = "My philosophy? Simplicity plus variety."
            count = 0;
        }
    }
Why is there only 4 counts in my code when I run it?
ttimon
@ttimon
Aug 23 2016 18:10
Hello everyone, can someone explai to me, why the big white icon in the middle is not quite centered, as the text above the box?
http://codepen.io/ttimon/pen/QEPZJW
Sorin Ruse
@sorinr
Aug 23 2016 18:10
@MikeJSchorah what is the reason to use so many ifs?
Jason Luboff
@JLuboff
Aug 23 2016 18:12
@ttimon I don't see a white icon?
Unknown
@Unknownhezipaz
Aug 23 2016 18:13
http://codepen.io/majedmahmood23/pen/NAzoQb for the portfolio part of the page I cant fit in the thumbnail images as the body is too small.How do I fix this
ttimon
@ttimon
Aug 23 2016 18:13
@JLuboff yeah.. me neither.. it doesn't work on chrome. the white icon onl yappear when it can take your geolocation. it's a weather icon.
@JLuboff it works on firefox though. at least for me.
Jason Luboff
@JLuboff
Aug 23 2016 18:14
@ttimon I'm using FF...at first it wasn't working but now it shows
I'd say that the city is being centered on the page, and the icon is being centered within the blue box, but even in the blue box its not quite centered...hmm
ttimon
@ttimon
Aug 23 2016 18:18
@JLuboff yeah.. that's why I did that "Hallo" test. to see if the box matters. But the "Hallo" is fine.
Jason Luboff
@JLuboff
Aug 23 2016 18:21
@ttimon Try adding text-center class to your iconShow div
That seemed to center it in the blue box atleast
ttimon
@ttimon
Aug 23 2016 18:25
@JLuboff now it 's too much on the right for me. In the <i> for the icon I already have a class "icon" that has text-align:center.
Jason Luboff
@JLuboff
Aug 23 2016 18:29
@ttimon Ah, ya you're right. The icon I had at the moment looked centered lol
ttimon
@ttimon
Aug 23 2016 18:30
@JLuboff could it be a problem with the icon itself? I think I'll try different ones...?
tylerobot
@tylerobot
Aug 23 2016 18:34
I'm having an issue where if I type in info into a form and hit enter, it triggers a JSON request just fine the first time, but for some reason it won't let me type in new info and trigger the JSON request a second time. I have to reload the page. Is anything wrong with my keypress code? Why can't I trigger the event multiple times?
$("#searchBox").keypress(function(event) {
  var keycode = (event.keyCode ? event.keyCode : event.which);
  if (keycode == '13') {

    //storing the string entered into  the form as a variable
    var searchString = $('#searchfield').val();

    //url for JSON request
    var url = "https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=" + searchString;

    //JSON request upon hitting enter
    $.getJSON(url, funcData);

  } //end if statement for enter keypress
}); //end keypress
Jason Luboff
@JLuboff
Aug 23 2016 18:35
@ttimon I'm not sure :(
Sorry
ttimon
@ttimon
Aug 23 2016 18:35
@JLuboff ok don't worry thx anyway
CamperBot
@camperbot
Aug 23 2016 18:36
:cookie: 309 | @jluboff |http://www.freecodecamp.com/jluboff
ttimon sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
Reggie
@Reggie01
Aug 23 2016 18:39
@MikeJSchorah Looks like your missing a closing brace
 else if (count == 4) {
          property.style.backgroundColor = "#6495ED"
          property.value = "You fail all the time. But you aren't a failure until you start blaming someone else."
          count = 5;
// missing a closing bracke
vínαч puppαl
@vinaypuppal
Aug 23 2016 18:42
@tylerobot any errors in console?? can u share your pen i can have a look at it
tylerobot
@tylerobot
Aug 23 2016 18:46
@vinaypuppal The code is a mess, so please forgive me of that, but here it is. https://codepen.io/Algenib/pen/dXEgQA?editors=1011
Muhammad Hasham
@MohammadHasham
Aug 23 2016 18:47
checkCashRegister(19.50, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]) should return [["QUARTER", 0.50]].
How does that return 0.50 and quarter?
Guilherme Or
@chameleonor
Aug 23 2016 18:48
I guys, anyone here ever used "primeng" for angular 2 templates that can help me with coloring fields ?
vínαч puppαl
@vinaypuppal
Aug 23 2016 18:51
@tylerobot its working you can see new content if u scroll down, You forgot to remove old content and then append new response from API
Adam Jacks
@AdamHJ123
Aug 23 2016 18:51
Guys, any idea how I can make my hamburger menu on my website look better? I can't seem to remove the underline on the text and it all looks a bit crappy atm
http://codepen.io/AdamHJacks/pen/NAmkzr?editors=1100
Please @ me if you can help with it
tylerobot
@tylerobot
Aug 23 2016 18:51
@vinaypuppal I can't believe I didn't notice! Thanks for taking a look, I really appreciate it!
CamperBot
@camperbot
Aug 23 2016 18:51
tylerobot sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 448 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Unknown
@Unknownhezipaz
Aug 23 2016 18:52
http://codepen.io/majedmahmood23/pen/NAzoQb I need help with my portfolio part it is not allowing the thumbnail pages to fit
vínαч puppαl
@vinaypuppal
Aug 23 2016 18:53
@AdamHJ123 use text-decoration: none on links to remove underline
Muhammad Hasham
@MohammadHasham
Aug 23 2016 18:59
Do i need to use if..else statements for pennies,five,ten,hundred etc in exact change?
@vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:01
@MohammadHasham i haven't started FCC Advance Algorithm Scripting. so i cant help you on that
Muhammad Hasham
@MohammadHasham
Aug 23 2016 19:03
@vinaypuppal okay
Reggie
@Reggie01
Aug 23 2016 19:06
@MohammadHasham your change amount is equal to 0.50. The largest value in change you can give back is quarters. So your algo is something like
  1. Is total change needed back > .25?
  2. are there any quarters in the drawer.
  3. If so subtract one quarter from draw.
  4. Subtract one quarter from total change needed.
  5. add .25 to total variable
  6. Repeat while change needed back > .25?
  7. Push to change array ["quarters", total ]
Muhammad Hasham
@MohammadHasham
Aug 23 2016 19:08
@Reggie01 Thanks
CamperBot
@camperbot
Aug 23 2016 19:08
mohammadhasham sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:cookie: 362 | @reggie01 |http://www.freecodecamp.com/reggie01
Muhammad Hasham
@MohammadHasham
Aug 23 2016 19:08
i';; try to understand that
Calin
@Muresanski
Aug 23 2016 19:12
Hi all, could someone spare 5 minutes for me to help me with my tribute page? I have few questions - but I would like not to spam the room :)
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:14
@Kelstein yes how can i help you
Juan Amari
@juanamari94
Aug 23 2016 19:18
Hey guys! I'm curious, if there's a div with borders to the left and right, how would you make it so that the borders decrease in size (until they're no more) when you reduce the size of the browser?
Chris Rutherford
@cjrutherford
Aug 23 2016 19:29
does anyone online have experience with bootstrap carousels?
just wondering why this isn't working.....
Calin
@Muresanski
Aug 23 2016 19:32
thank you @vinaypuppal
CamperBot
@camperbot
Aug 23 2016 19:32
kelstein sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 449 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:34
@cjrutherford did you load jquery and bootstrap.js
Chris Rutherford
@cjrutherford
Aug 23 2016 19:34
@vinaypuppal I did, but I'm a little worried that this is a BS4 feature
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:34
@cjrutherford i saw u forgot to load bootstrap.js in your pen
Chris Rutherford
@cjrutherford
Aug 23 2016 19:35
it's in the settings
or so I thought
it's there, I selected the jQuery and jQueryUI options in the Javascript settings
wait, bootstrapjs..... okay
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:36
@cjrutherford no i dont see it
@cjrutherford if you load bootstrap.js it works
Chris Rutherford
@cjrutherford
Aug 23 2016 19:37
@vinaypuppal bizarre, I added bootstrap in the CSS section. I always thought it would automatically add the js for me.... got it now.
@vinaypuppal thanks!
CamperBot
@camperbot
Aug 23 2016 19:38
cjrutherford sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 450 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:38
@cjrutherford no u have explicitly add them
@cjrutherford so you got it working , fix image sizes second image is big than other two
Chris Rutherford
@cjrutherford
Aug 23 2016 19:42
@vinaypuppal I'm actually learning this for a project that I'm working on locally with gulp-sass-pug-browserSync etc. Can't really put it in the pen, but it was enough to see where things were going wrong.....
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:42
@cjrutherford oh okay
Chris Rutherford
@cjrutherford
Aug 23 2016 19:42
Still not working right in the code. If I check it in, could you review it quickly? please!??
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:43
sure if i can detect problem? @cjrutherford
Jonny Cyr
@jonnycyr
Aug 23 2016 19:44
I'm teaching myself javascript by going through free code camp - I'm currently stuck on creating the random quote machine challenge, it's just creating a page where whenever you click a button a random quote pops up. I'm not entirely sure what's wrong with my code, I'm using jQuery. HTML:http://pastebin.com/UV4d4MPU and JS: http://pastebin.com/KrvVyMPC
Chris Rutherford
@cjrutherford
Aug 23 2016 19:44
the html is in the dist folder
@jonathancyr I would say start with a JSON object in the js. This might help you understand what you're doing.
@jonathancyr this is the one I did. Feel free to steal the JSON at the top
Jonny Cyr
@jonnycyr
Aug 23 2016 19:48
@cjrutherford I understand JSON objects - I'd rather use an HTTP GET request to grab a random quote, rather than creating my own JSON object to grab from.
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:49
@cjrutherford u need to load bootstrap.js from your bower components into your jade/pug files or directly into index.html
Jonny Cyr
@jonnycyr
Aug 23 2016 19:49
@cjrutherford And I know that the link I use works, going to it will return JSON - I'm just not entirely sure why I can't change the text. It's as if the code after $.getJSON isn't run at all.
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:50
@cjrutherford i dont have experience with gulp on how to add task to automate this process you may google it
@jonathancyr just in click handler add event.preventDefault() to prevent default link behaviour your getting instead of making API request
This message was deleted
@jonathancyr like this
 $("#new-quote").click(function(event){
     event.preventDefault(); // <- this

  });
Jonny Cyr
@jonnycyr
Aug 23 2016 19:54
Ah, ok. I'll try that. What do you mean by default link behaviour?
Chris Rutherford
@cjrutherford
Aug 23 2016 19:56
@vinaypuppal that's fine, I have that down now, I'm just not sure why the slider isn't working in the index.html file.... It's done very similarly
Jonny Cyr
@jonnycyr
Aug 23 2016 19:56
@vinaypuppal Should I put the rest of the code within the preventDefault parens? Just putting that line doesn't work.
vínαч puppαl
@vinaypuppal
Aug 23 2016 19:56
yes @jonathancyr
@jonathancyr is #new-quote a tag or button??
@jonathancyr u shld get reload problem if its anchor tag a if button it should work as expected
Jonny Cyr
@jonnycyr
Aug 23 2016 19:58
@vinaypuppal #new-quote is an id for a button.
@vinaypuppal Does this look right?
'''
$(document).ready(function(){
$("#new-quote").click(function(event){
event.preventDefault(
$.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json", function(data){
$("#new-quote").html(data.quoteText);
})
);
});
});
'''
CamperBot
@camperbot
Aug 23 2016 19:59
:bulb: to format code use backticks! ``` more info
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 19:59
Hey i just started on my portfolio page, any input would be great. Here's what i have so far http://codepen.io/abbasnaqvi365/full/qNGLpA/
Juan Amari
@juanamari94
Aug 23 2016 19:59
hey guys, I'm struggling with my portfolio project. http://codepen.io/juanamari94/pen/yJWkWz?editors=1100 i can't get the image to align to the center when the window is small enough
Jonny Cyr
@jonnycyr
Aug 23 2016 19:59
@vinaypuppal
 $(document).ready(function(){
  $("#new-quote").click(function(event){
    event.preventDefault(
      $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json", function(data){
      $("#new-quote").html(data.quoteText);
      })
    );
  });
});
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:00
@juanamari94 ill look at yours if you look at mine
Juan Amari
@juanamari94
Aug 23 2016 20:01
@Abbas-Naqvi i pretty much stole the style of the main idea, yours looks nice
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:01
@jonathancyr oops not like that after event.preventDefault() add rest of your code
Ojas Sinha
@ojassinha
Aug 23 2016 20:02
Hey , Anybody has any idea when is React coming to freecodecamp
?
Fábio Marquez
@fabiomarquezc
Aug 23 2016 20:03
@Abbas-Naqvi Your page looks clean and nice. Don't forget fulfil the user's storys
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:03
@jonathancyr https://jsbin.com/janafuc/1/edit?html,js,console,output here the working link for your code
Jonny Cyr
@jonnycyr
Aug 23 2016 20:03
@vinaypuppal Like this?
 $(document).ready(function(){
  $("#new-quote").click(function(event){
    event.preventDefault();
    $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json", function(data){
      $("#quote").html(data.quoteText);
    });
  });
});
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:04
@jonathancyr no need of event.preventDefault(); its working without that look at abv link
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:04
@fabiomarquezc totally forgot about the user stories, thanks man
CamperBot
@camperbot
Aug 23 2016 20:04
:cookie: 122 | @fabiomarquezc |http://www.freecodecamp.com/fabiomarquezc
abbas-naqvi sends brownie points to @fabiomarquezc :sparkles: :thumbsup: :sparkles:
Jonny Cyr
@jonnycyr
Aug 23 2016 20:06
@vinaypuppal Thank you so much, it works now! Why did adding https://crossorigin.me make it work? Also, how do I make it so that it creates a new quote each time - when I click new quote it shows the quote, but clicking again does not change it
CamperBot
@camperbot
Aug 23 2016 20:06
jonathancyr sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 451 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:08
@ojassinha on your local machine it shld work with out it i think,but as jsbin is loaded over https and API cant be accessed over https url i added proxy server in middle to make request https://crossorigin.me
Jonny Cyr
@jonnycyr
Aug 23 2016 20:08
@vinaypuppal Ah, I think it wasn't working because I've been doing this in codepen
Ojas Sinha
@ojassinha
Aug 23 2016 20:08
@vinaypuppal ?
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:09
@ojassinha sorry it was not for you
Jonny Cyr
@jonnycyr
Aug 23 2016 20:09
@ojassinha I think that message was meant for me
Ojas Sinha
@ojassinha
Aug 23 2016 20:09
ohh Ok :D
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:09
@juanamari94 i usually find it difficult to steal the whole idea of a web page. Instead i like to use smaller piece as inspiration and reformat them to meet my requirements. for example heres a good thinng you can use http://codepen.io/rexkirby/full/ekvtL/
I also like to draw out my web page before I actually code it out
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:10
@ojassinha i read somewhere(reddit i think) New lessons would be on FCC by September. But i cant find that link
Fábio Marquez
@fabiomarquezc
Aug 23 2016 20:10
@Abbas-Naqvi Now you will have so much fun trying to improve your page, putting a menu, links, etc. I'am saying that because I have fun doing this :P
Ojas Sinha
@ojassinha
Aug 23 2016 20:10
@vinaypuppal ok Thanks !
CamperBot
@camperbot
Aug 23 2016 20:10
ojassinha sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 452 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Jonny Cyr
@jonnycyr
Aug 23 2016 20:10
@vinaypuppal Do you know how to make it so that on each click I get a new quote? It keeps on bringing me the same quote each time. Could this be because of cross origin, or code pen?
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:11
okay does API support that ??
@jonathancyr
@jonathancyr check with API docs to get random quote every time we make request
Fábio Marquez
@fabiomarquezc
Aug 23 2016 20:14
Guys, what should I do different in my page? Any suggestions? http://codepen.io/fabiomarquezc/full/BzrZXJ/
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:15
@fabiomarquezc what does </fmc> mean?
Tyler Moeller
@TylerMoeller
Aug 23 2016 20:16
@jonathancyr Remove the cross origin hack you have added to your URL and use this URL instead:
http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en&jsonp=?
Fábio Marquez
@fabiomarquezc
Aug 23 2016 20:16
@Abbas-Naqvi It's like a brand made with my middle name, Fábio Marquez de Carvalho, means nothing at all xD
Jonny Cyr
@jonnycyr
Aug 23 2016 20:17
@TylerMoeller Thank you so much! Why does adding jsonp=? change things?
CamperBot
@camperbot
Aug 23 2016 20:17
jonathancyr sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 773 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Aug 23 2016 20:17
@jonathancyr It's a callback parameter, required for jsonp requests with this API
Chris Rutherford
@cjrutherford
Aug 23 2016 20:18
I'm still trying to figure out why this isn't working right..... it's flat as it should be, but it's not sliding to the next image in the carousel.... BS.css and bs.js are in the header.
  <div class="carousel slide" id="spinner" data-ride="carousel">
      <ol class="carousel-indicators">
        <li class="active" data-target="#spinner" data-slide-to="0"></li>
        <li data-target="#spinner" data-slide-to="1"></li>
        <li data-target="#spinner" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner" role="listbox">
        <div class="item active"><img src="http://placehold.it/600x300"></div>
        <div class="item"><img src="http://placehold.it/600x300"></div>
        <div class="item"><img src="http://placehold.it/600x300"></div>
      </div><a class="left carousel-control" href="#spinner" role="button" data-slide="prev"><span class="icon-prev" aria-hidden="true"></span><span class="sr-only">Previous</span></a><a class="right carousel-control" href="#spinner" role="button" data-slide="next"><span class="icon-next" aria-hidden="true"><span class="sr-only">Next</span></span></a>
    </div>
Jonny Cyr
@jonnycyr
Aug 23 2016 20:18
@TylerMoeller Thanks!
CamperBot
@camperbot
Aug 23 2016 20:18
jonathancyr sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: jonathancyr already gave tylermoeller points
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:18
@fabiomarquezc if you could do animations like this guy http://janlosert.com/
That would make your portfolio super dope
Chris Rutherford
@cjrutherford
Aug 23 2016 20:20
disregard the indentation, it's just a side effect from compiling from pug
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:20
@TylerMoeller is there anyway to make request over https to API's (which wont support https) without using crossorigin hack. I face problem lot of times with https
Fábio Marquez
@fabiomarquezc
Aug 23 2016 20:20
@Abbas-Naqvi Wow, this looks amazing! CSS transitions is a dark place for me right now
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:21
@fabiomarquezc CSS is a dark place for everyone lol
Adam Jacks
@AdamHJ123
Aug 23 2016 20:24
@vinaypuppal I've already used text-decoration: none but it hasnt worked for it
Tyler Moeller
@TylerMoeller
Aug 23 2016 20:25
@vinaypuppal It's best to only use APIs that support HTTPS. If you can't do that, you can always force the app to use HTTP in case it's loaded over HTTPS. Last resort is a proxy (IMHO :) )
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:25
@TylerMoeller okay :+1:
Tyler Moeller
@TylerMoeller
Aug 23 2016 20:26
Unless you own the proxy and know what you're doing with it - sometimes you have to create your own proxy for APIs that don't support jsonp
Abbas Naqvi
@Abbas-Naqvi
Aug 23 2016 20:26
@fabiomarquezc This is my mentors page if you need some ideas as well http://vungyn.com/
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:27
@AdamHJ123 share your pen again its lost in chat log, so I or others might help you
Mikail Bayram
@mikail1998
Aug 23 2016 20:28
This message was deleted
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:28
@TylerMoeller okay understood what you saying, crossorigin may have downtime issues which breaks app if we use it
Mikail Bayram
@mikail1998
Aug 23 2016 20:29

http://codepen.io/mikail1998/pen/pbQjVN?editors=1111
``js
else if ($("#result").text().slice(-1)==="/"||""||"+"||"-"&& clickedButton==="/"||""||"+"||"-" && $("#result").text().slice(-1) !==""){

    console.log('Math operation button clicked');

``
Im trying to disable the math operation buttons if a operation button was clicked previously, but without success so far

Tyler Moeller
@TylerMoeller
Aug 23 2016 20:33
@vinaypuppal Yeah, downtime, and depending on any sensitive info you may handle with an API, you don't know who else is looking at that data.
vínαч puppαl
@vinaypuppal
Aug 23 2016 20:34
@AdamHJ123 i found your pen but text-decoration: none is working add this to a tag in CSS http://codepen.io/AdamHJacks/full/NAmkzr/
@TylerMoeller okay thanks understood the problem of using unknown proxy servers
CamperBot
@camperbot
Aug 23 2016 20:35
vinaypuppal sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 774 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Aug 23 2016 20:35
Man in the middle attacks are another concern, but that's a bit paranoid for a random quote machine project :)
ttimon
@ttimon
Aug 23 2016 20:46
hello everybody: I have trouble with making my weather app switch between Fahrenheit and Celsius on click. Nothing happens.. And I need some general direction where I went wrong. The weather app seems to only work in firefox, because chrome doesn't manage to pull my/your(?) geolocation, so that's to consider. It doesn't work at all in chrome for me. http://codepen.io/ttimon/pen/QEPZJW
Jason Luboff
@JLuboff
Aug 23 2016 20:54
If you want it to work in Chrome, you will need to use a proxy like https://crossorigin.me which you can append to your openweathermap url (i.e https://crossorigin.me/http://openweather...) and then open up your codepen with https (i.e https://codepen.io/ttimon/..._
)
Islam Ibakaev
@dagman
Aug 23 2016 21:04
is it good to use material-ui or other similar libraries for production?
I mean the components from libraries compiles to usual div with style attribute
so the project code looks like a lot of divs with a lot of css attended to style attribute of corresponding divs?
so what do you think about this?
Aleksa Rakic
@aleksarakic
Aug 23 2016 21:56
Hey guys, I'm working on TicTacToe and I have problems with function that checks if users have winning combination. It doesn't work for the last(9th) play, it says "DRAW" when user makes winning combo. Can someone help?
vínαч puppαl
@vinaypuppal
Aug 23 2016 21:56
@dagman yes lot of div's with styles may be difficult to debug but we can use React Developer tools if we need to debug rendered components in browser.
Ivan
@gonzalezi2
Aug 23 2016 22:20
@ttimon Yeah like @JLuboff said, you need a work around if you intend to use openweatherAPI. Their API only works in HTTP while the google geolocation API only works in HTTPS. You can either use a different API that works in https or a different geolocation api like http://ipinfo.io/
Also, for anyone else who has completed the intermediate front end development projects, I'm looking for help on the Twitch API app if anyone is inclined to help.
Jason Luboff
@JLuboff
Aug 23 2016 22:29
@gonzalezi2 I've finished my Twitch app...so I may or may not be able to help :smile:
Ivan
@gonzalezi2
Aug 23 2016 22:32
@JLuboff Ok well I guess I'll let you know what my problem is and you can tell me if you can help! Anyway, I'm able to make a call to the Twitch API using "Streams" in the url but I only get the online streams. I set up the API inside a for loop that runs through each streamer in an array and an if/else if inside the API call's success function.
Did you also make two API calls in your code? One for online streams and one for offline streams using an if/else statement?
Jason Luboff
@JLuboff
Aug 23 2016 22:36
@gonzalezi2 Yes, I did have to make two API calls. One call to channels and one call to streams. My reason was I used channels to get logo and follower information, and streams to get active information like viewers
I also nested my second call within my first
Ivan
@gonzalezi2
Aug 23 2016 22:37
Did you first make a call to channels? Is there any info in there that let's you know they are online? Because I didn't find anything inside that says whether it's online or not.
I have a second API call inside the first as well. But my streamers[i] variable goes undefined and so I can't make a call to an undefined channel. arghgh
Jason Luboff
@JLuboff
Aug 23 2016 22:38
My first call is to channels, second call to streams. The streams is where you find if an user is online or offline via the stream
I ran into the same issue
How are you looping through the array of users? I originally was trying to use a for loop...but switched to $.each
greg
@wearenotgroot
Aug 23 2016 22:40

@gonzalezi2 if you use /streams first and the stream is null. you will still get an object. and in that object are links that you can use for the second api

data._links.channel //<------you can use that as the url for the api call using /channel

/channel api call

$.getJSON(data._links.channel).done(callback).fail(error);
Ivan
@gonzalezi2
Aug 23 2016 22:41
@JLuboff I thought of using that at first but did not know how to properly implement it. I have the first api call inside a for (var i = 0; i < streamers.length; i++){ loop
Jason Luboff
@JLuboff
Aug 23 2016 22:42
Ya I switched to $.each and set it up like so: $.each(twitchUsers, function(index, streamer) {...
the index portion I didn't use, just the steaer
streamer*
Ivan
@gonzalezi2
Aug 23 2016 22:42
@wearenotgroot let me look through that real quick
Jason Luboff
@JLuboff
Aug 23 2016 22:43
I found this fixed my undefined user issue and made it so that I could access the streamer id throughout the function
Ivan
@gonzalezi2
Aug 23 2016 22:43
@jluboff if the for loop doesn't work I'll have to switch to that. I used it for my weather app just couldn't think of how to implement it on this one for some reason. I don't remember now :smile:
Yeah I'm getting the undefined error. I'll probably have to switch
Jason Luboff
@JLuboff
Aug 23 2016 22:44
:+1: Good luck
Ivan
@gonzalezi2
Aug 23 2016 22:44
Thanks!
greg
@wearenotgroot
Aug 23 2016 22:55
@gonzalezi2 btw why not just declare/create a function for displaying the channels, so you can re-use it whenever you want(outside the for loop)
function displayChannel(display_name, logo, game,status,viewers){
     var html = '<div class="streamer">';
         html += '<div class="image-holder"><img src="' + logo + '" /></div>';
         html += '<div class="streamer-info"><h3 class="text-center">' + display_name + '</h3><p class="text-center"><strong>Playing: </strong>' + game + ', <strong>Viewers: </strong>' + viewers + '</p><p class="text-center">' + status + '</p></div></div>';
        $(".data").append(html);

  }
Ivan
@gonzalezi2
Aug 23 2016 22:57
@wearenotgroot I did not even think of that smh. I keep reusing data.stream.channel.logo and others lol. Thanks!
CamperBot
@camperbot
Aug 23 2016 22:57
gonzalezi2 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: gonzalezi2 already gave wearenotgroot points
greg
@wearenotgroot
Aug 23 2016 22:58

for online

displayChannel(data.stream.channel.display_name, data.stream.channel.logo, data.stream.channel.game,data.stream.channel.status,data.stream.channel.views);

for offline

displayChannel(data.display_name, data.logo, data.game,data.status,data.views);
Ivan
@gonzalezi2
Aug 23 2016 23:02
Wow that's a lot of great info. Thanks. I'm sure I'll be back. I'm close but not there yet
@wearenotgroot Would you say it's easier to make the first API call to /channels or /streams? I'm trying to figure out which way is best.
greg
@wearenotgroot
Aug 23 2016 23:05
@gonzalezi2 it would be about the same i guess
Ivan
@gonzalezi2
Aug 23 2016 23:06
hmmm ok. I'll try one way and see what happens.
greg
@wearenotgroot
Aug 23 2016 23:07
@gonzalezi2 btw you might get some undefined or blank data as the channel owner havent set them up, so you need to watch out for those
Ivan
@gonzalezi2
Aug 23 2016 23:13
I haven't gotten any undefined yet after switching to $.each(). And I can report that I have been successful in showing the offline channels. Now onto the ones who've deleted their accounts...
greg
@wearenotgroot
Aug 23 2016 23:14
@gonzalezi2 those you can get in the error
Ivan
@gonzalezi2
Aug 23 2016 23:14
Yeah I'm getting {"error":"Unprocessable Entity","status":422,"message":"Channel 'comster404' is not available on Twitch"}
Just need to display that now
Ivan
@gonzalezi2
Aug 23 2016 23:39
@wearenotgroot Could i not just display the inactive accounts under the else statement? Or is that yet another API call?
greg
@wearenotgroot
Aug 23 2016 23:40
@gonzalezi2 you'll get then in the error. you can use
$.ajax({...}).fail(errorCallback)
Jason Luboff
@JLuboff
Aug 23 2016 23:40
@gonzalezi2 I structured my if/else if/else statement as such if (user does not exist) else if (user is offline) else (user online) but
Ivan
@gonzalezi2
Aug 23 2016 23:49
@JLuboff Then surely I could switch it around? My first API call is not inside any if/else statements. Instead, the first if statement is within the success function of the api call (streams). The else if statement is inside the same call. That's where the second call (channels) is made.
@wearenotgroot could I use error:function(){ instead like I used success:function(){?
Toni Shortsleeve
@KoniKodes
Aug 23 2016 23:51
@moigithub I understand, but it is showing up in the codepen console.
greg
@wearenotgroot
Aug 23 2016 23:51
@gonzalezi2 yes but recommended use is .done(callback) and .fail(errorCallback)
Toni Shortsleeve
@KoniKodes
Aug 23 2016 23:52
@wearenotgroot really? Where can I find that documentation? I'm still in callback hell.
Ivan
@gonzalezi2
Aug 23 2016 23:52
hmmm i haven't heard of those.
greg
@wearenotgroot
Aug 23 2016 23:53
@KoniKodes is on the jquery page
deadsix
@deadsix
Aug 23 2016 23:53

Hello all, I'm working on the first project and I'm basically done. The only issue is that I am trying to get the margin of the background to stop being responsive after my image reaches it maximum size.

You can see my pen here: https://codepen.io/deadsix/pen/xONGAz

Thanks!

Toni Shortsleeve
@KoniKodes
Aug 23 2016 23:53
@wearenotgroot New updates? Thank you, I'll re-read it.
CamperBot
@camperbot
Aug 23 2016 23:53
konikodes sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1444 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Aug 23 2016 23:53
@KoniKodes not really new, it's been there for a while now
deadsix
@deadsix
Aug 23 2016 23:54
I tried using the css function of max-width but that made my image not responsive.
Toni Shortsleeve
@KoniKodes
Aug 23 2016 23:54
@wearenotgroot My bad eyesight ...
@deadsix try adding the bootstrap js to your js settings, it may give you a little more control.
deadsix
@deadsix
Aug 23 2016 23:58
@KoniKodes Thanks will do!
CamperBot
@camperbot
Aug 23 2016 23:58
deadsix sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 362 | @konikodes |http://www.freecodecamp.com/konikodes