These are chat archives for FreeCodeCamp/HelpFrontEnd

13th
Aug 2017
iso
@iso1048
Aug 13 2017 00:01
does anyone know of anything similar to font-awesome which is also free? (the icon I am searching for is not on font-awesome)
Tai Jones
@taiJones00
Aug 13 2017 00:01
namaste @fdemaa
fdemaa
@fdemaa
Aug 13 2017 00:02
@taiJones00 :+1:
probably this link
iso
@iso1048
Aug 13 2017 00:04
@eweiss17 thanks bro
CamperBot
@camperbot
Aug 13 2017 00:04
gothamknight sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 590 | @eweiss17 |http://www.freecodecamp.com/eweiss17
李富全
@Mr-Li-admin
Aug 13 2017 00:05
anybody has Cloud9 account?
Eric Weiss
@eweiss17
Aug 13 2017 00:06
ya sure what about it>
李富全
@Mr-Li-admin
Aug 13 2017 00:09
because i am an chinese,and i don't have credit card
Eric Weiss
@eweiss17
Aug 13 2017 00:10
c9 is free?
李富全
@Mr-Li-admin
Aug 13 2017 00:10
2017-08-13_081010.png
yes,but i can't sign up
Eric Weiss
@eweiss17
Aug 13 2017 00:13
I can not assist you with that
李富全
@Mr-Li-admin
Aug 13 2017 00:16
i ask my chinese partner
thanks
mstellaluna
@mstellaluna
Aug 13 2017 00:16
@Mr-Li-admin C9 doesn't charge a credit card but does require a credit card as part of their validation process
nathabonfim59
@nathabonfim59
Aug 13 2017 00:17

What's up guys, I have little a trouble here, if anyone can help...

<!--- I have an HTML element with the state 'false' -->
<span id="locationData" received="false"> </span>

And I want to track this state on Javascript, How I can do that?

李富全
@Mr-Li-admin
Aug 13 2017 00:17
chinese credit card is ok
?
Eric Weiss
@eweiss17
Aug 13 2017 00:19
If that credit card is one of the 6 valid ones i would assume it would work
@nathabonfim59 is received a valid attribute name?
李富全
@Mr-Li-admin
Aug 13 2017 00:21
i going to trying
nathabonfim59
@nathabonfim59
Aug 13 2017 00:22
@eweiss17 I think so...
李富全
@Mr-Li-admin
Aug 13 2017 00:23
attr()?
Eric Weiss
@eweiss17
Aug 13 2017 00:23
I could not find it, if you could link me to the definition, I could help better
nathabonfim59
@nathabonfim59
Aug 13 2017 00:30
Of course, it's the following: I have a JSON request, and I used an html element to store the received JSON as string, and I want to monitor that element to verify if the JSON is stored
Eric Weiss
@eweiss17
Aug 13 2017 00:32
i meant where you found the attribute received, but that helps too
why store it in html? your JavaScript is already handling it.
Sounds like you want ajax success function?
nathabonfim59
@nathabonfim59
Aug 13 2017 00:38
Because the function getJSON has a callback and the that var is limited...
Then, to provide a 'global' var, I did it
Eric Weiss
@eweiss17
Aug 13 2017 00:38
Explain what your intention is in plain english
CamperBot
@camperbot
Aug 13 2017 00:38

freeCodeCamp Wiki:

:point_right: The freeCodeCamp wiki can be found on our forum.
Please follow the link and search there.
nathabonfim59
@nathabonfim59
Aug 13 2017 00:44
Ok, I'm working in FCC the 'Weather API' challenge and I got the coordinates of user using navigator.geolocation.getCurrentPosition() method, and I want to store that value for use in getJSON function.
Gulsvi
@gulsvi
Aug 13 2017 00:46
@nathabonfim59 we can't use global variables with navigator.geolocation or getJSON
They're asynchronous - needs to contact a server, get data, and then process it
Ryan Williams
@Ryanwfile
Aug 13 2017 00:52
@SkyC0der Wow, thank you so much for the help
CamperBot
@camperbot
Aug 13 2017 00:52
ryanwfile sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2376 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Aug 13 2017 00:53
Glad that helped - wasn't sure it would
@nathabonfim59 Does that make sense? :)
nathabonfim59
@nathabonfim59
Aug 13 2017 00:53
@SkyC0der
Then, do I need to use promises for that?
Cause I want something like synchronous code, get the location coords and then use that data in getJSON
Or a callback inside another?
Eric Weiss
@eweiss17
Aug 13 2017 00:53
@nathabonfim59 You need to use two ajax calls. One within the other
Gulsvi
@gulsvi
Aug 13 2017 00:55
@nathabonfim59 You can nest your getJSON inside navigator.geolocation like @eweiss17 is saying, you could also pass the data as an argument to another function, or use promises. Lots of options.
nathabonfim59
@nathabonfim59
Aug 13 2017 00:55
I'll try it, thanks @eweiss17 @SkyC0der
CamperBot
@camperbot
Aug 13 2017 00:55
nathabonfim59 sends brownie points to @eweiss17 and @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2377 | @skyc0der |http://www.freecodecamp.com/skyc0der
:cookie: 591 | @eweiss17 |http://www.freecodecamp.com/eweiss17
aRtoo
@artoodeeto
Aug 13 2017 00:55
you have any solution other than this?? im really struggling to make less than 5 lines of codes. because of memory that i read. something like that.
function translatePigLatin(str) {
  var vowelsArr = 'aeiou'; //way
  //var constArr = 'BCDFGHJKLMNPQRSTVWXYZ'.toLowerCase(); //ay
  var uno = [];
  var dos = [];
  str = str.split('');

  if (vowelsArr.indexOf(str[0]) === -1) {
    for (var i = 0; i < str.length; i++) {
      if (vowelsArr.indexOf(str[i]) === -1) {
        dos.push(str[i]);
      } else if (vowelsArr.indexOf(str[i]) !== -1) {
        uno.push(str[i]);
        uno = uno.join('');
        dos = dos.join('');

        var newStr = str.splice(0,i);
        console.log(str);
        console.log(newStr);

        return str.join('') + dos + 'ay';
      }
    }
  } else {
    return str.join('') + 'way';
  }
}

//translatePigLatin("consonant");
translatePigLatin("california"); //should return "aliforniacay".
Gulsvi
@gulsvi
Aug 13 2017 00:56
navigator.geolocation.getCurrentPosition(getWeather, geolocationFailure);

function geolocationFailure(error) {
  // show an error if navigator.geolocation fails
}

function getWeather(position) {
  // use the position data to build your weather API url)
  $.getJSON(weatherAPI, displayWeather);
}

function displayWeather(json) {
  // use the JSON from your getJSON call to show the data on your web page
}
Eric Weiss
@eweiss17
Aug 13 2017 00:56
I would consider promises to be fairly advanced. We do not learn them on FCC, I don't think you are ever expected to use them.
nathabonfim59
@nathabonfim59
Aug 13 2017 01:02
@SkyC0der
A function as argument of another, I have not thought about it...
And works perfectly, thanks
CamperBot
@camperbot
Aug 13 2017 01:02
nathabonfim59 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: nathabonfim59 already gave skyc0der points
Gulsvi
@gulsvi
Aug 13 2017 01:03
Glad that helped - good luck with the rest of the weather app
nathabonfim59
@nathabonfim59
Aug 13 2017 01:06
@eweiss17
Yes, I also think, I have seen this in some articles of nodejs, something about error treatment and callback hell
Gulsvi
@gulsvi
Aug 13 2017 01:34
I wonder if it's okay to call promise.all on an array of promise.all objects? https://codepen.io/skycoder/pen/prrOvy?editors=0010
Gaurav
@gauravmagan
Aug 13 2017 01:44
Screen Shot 2017-08-12 at 9.35.03 PM.png
@SkyC0der
im trying to commit this
Screen Shot 2017-08-12 at 9.35.03 PM.png
i have already done with commiting and updating with the branch
but the files still popping out
is there any other solution
@SkyC0der
dinesh
@1532j0004kg
Aug 13 2017 01:47
To uploa d to the github
Shall i send the order
Liam Docherty
@ldocherty1
Aug 13 2017 01:48
Hey
dinesh
@1532j0004kg
Aug 13 2017 01:48
hi
Liam Docherty
@ldocherty1
Aug 13 2017 01:49
Can someone link me some good web developer portfolios that are creative and unique? @1532j0004kg Hi, how is everything?
dinesh
@1532j0004kg
Aug 13 2017 01:49
Going good broieee
Liam Docherty
@ldocherty1
Aug 13 2017 01:49
I did good search about web developers and portfolios but just wanting to see other developers opinions on other web developers portfolios
@1532j0004kg Good to hear :)
Check this pen
by the how about you/
what about you?
Liam Docherty
@ldocherty1
Aug 13 2017 01:54
@1532j0004kg I'm doing great thanks for asking. Just working on something similar to do this and hopefully ends up as good as something like this https://jameslave.com/. Just taking my time and understanding everything. I'll show you my version when I finish, GL with your programming courses.
CamperBot
@camperbot
Aug 13 2017 01:54
ldocherty1 sends brownie points to @1532j0004kg :sparkles: :thumbsup: :sparkles:
:cookie: 243 | @1532j0004kg |http://www.freecodecamp.com/1532j0004kg
dinesh
@1532j0004kg
Aug 13 2017 01:56
Thanks a lot...Good luck for u Too...
Tai Jones
@taiJones00
Aug 13 2017 02:13
$("#temp").on("click", function() {
     if (document.getElementById("temp") == temp + "&deg C")
       {
         $("#temp").html(tempF + "&deg F");
         console.log("hey");
       }
      else
        {
          $("#temp").html(temp + "&deg C");
          console.log("howdy");
        }
    });
What's wrong with this on click function to change between celsius and fahrenheit. I'm stuck on this
var temp = json.main.temp;
var tempF = (temp - 32) * (5/9);
Lorrie Pearson
@Lorrie01
Aug 13 2017 02:21
Tai Jones
@taiJones00
Aug 13 2017 02:22
I mean nothing at all happens when I click
Ruchika Sharma
@ruchika90
Aug 13 2017 02:28
@Manish-Giri thx it worked!
CamperBot
@camperbot
Aug 13 2017 02:28
ruchika90 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6404 | @manish-giri |http://www.freecodecamp.com/manish-giri
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:30
@taiJones00 When I looked at your project and clicked the degrees it changed to fahreenheit
for me
Tai Jones
@taiJones00
Aug 13 2017 02:30
// Change between F and C when the temp div is clicked
    var change = "F";
    $("#temp").on("click", function() {
      $("#temp").html(tempF + "&deg F");
      if (change == "F")
        {
          change = "C";
        }
      else
        {
          change = "F";
        }
    });
wha
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:31
What are you doing with this: $("#temp").html(tempF + "&deg F”);
Tai Jones
@taiJones00
Aug 13 2017 02:31
writing new html to the element with the id of temp
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:32
On each click though, it will only do that
Tai Jones
@taiJones00
Aug 13 2017 02:32
Is that good?
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:32
only tempF
You want it to alternate, between tempF and tempC
Tai Jones
@taiJones00
Aug 13 2017 02:33
I got it!
but
okay i'll try that
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:33
for example if (change == ‘F’) { $("#temp").html(tempF + "&deg F”) }
because you have initially set the state, you know that the degrees are F
Tai Jones
@taiJones00
Aug 13 2017 02:34
so if (document.getElementById("temp") == temp + "&deg C)
Would that work
ohhhh
that's less complicated
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:34
also you would add
if (change == ‘F’) { $("#temp").html(tempF + "&deg F”); change = ‘C' }
then in your else block { $("#temp").html(tempC + "&deg C”); change = ‘F’ }
for example
Tai Jones
@taiJones00
Aug 13 2017 02:35
Okay I think it's good now
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:36
So that you can switch between the two
Makes sense?
Tai Jones
@taiJones00
Aug 13 2017 02:36
yep. Just have to change the default to F and we gud
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:36
Is it working?
Okay cool
Tai Jones
@taiJones00
Aug 13 2017 02:36
arigato @arecvlohe
CamperBot
@camperbot
Aug 13 2017 02:36
taijones00 sends brownie points to @arecvlohe :sparkles: :thumbsup: :sparkles:
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:36
Okay, lets check it out
Tai Jones
@taiJones00
Aug 13 2017 02:37
it'd be smart to have it only be F in the united states right?
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:37
I think the requirements are to have it do both
CamperBot
@camperbot
Aug 13 2017 02:37
:cookie: 409 | @arecvlohe |http://www.freecodecamp.com/arecvlohe
Tai Jones
@taiJones00
Aug 13 2017 02:37
I mean as a default
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:37
Yes, that makes sense
Tai Jones
@taiJones00
Aug 13 2017 02:38
so like
if (country === "US") 
{
  make the default temp F
}
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:39
yes, that makes sense
Tai Jones
@taiJones00
Aug 13 2017 02:41
https://codepen.io/taiJones00/pen/JyyBey Now trying it out now it looks like the high and low need no decimal places
would the math function make that happen
Adam Recvlohe
@arecvlohe
Aug 13 2017 02:44
yes, the Math object has some helpers for that
might want to look at String.prototype.toFixed as well
Manish Giri
@Manish-Giri
Aug 13 2017 02:46
@ruchika90 welcome!
Sorin Ruse
@sorinr
Aug 13 2017 02:53
@taiJones00 i would round temp to fixed 0
Tai Jones
@taiJones00
Aug 13 2017 02:59
purfect
Ismail Hozain
@ismailhozain
Aug 13 2017 04:12
I have a problem with getting the temp. conversion button to work on my weather app please help .I at first thought that the problem was that it was outside the ajax success function but proved otherwise , now what? https://codepen.io/ismailhozain/pen/ayoyqN?editors=1000
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 04:19
@cisd260036 The thing is that the click listener is inside a function, but it looks like that function is never called
So in the end, there is no listener associated to the #convert button
glitz20
@glitz20
Aug 13 2017 04:42
hey guys how can I make these images each covering 25% of screen width and touching each other in every screen width?https://codepen.io/sabin20/pen/EvPgMd
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 04:44
@sabin20 You mean that you want them to touch each other vertically too in every screen size?
glitz20
@glitz20
Aug 13 2017 04:45
yeah,just like you can see it currently in a bigger screen
four image in a row and 2 rows touching each another @paulotokimatu
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 04:46
You fixed a height as 200px in .meal-photo, right?
so the img will always take 200px, and in smaller screen sizes it can be a problem in your case
try removing it
glitz20
@glitz20
Aug 13 2017 04:58
@paulotokimatu when I remove it they will not align
@paulotokimatu see the result
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:00
I see, that is strange, let me check
glitz20
@glitz20
Aug 13 2017 05:00
@paulotokimatu yeah I know,
All the image has same height though
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:02
The funny thing, is that if you move the fifth img to the last position, there is no problem
glitz20
@glitz20
Aug 13 2017 05:02
@paulotokimatu yeah haha
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:04
Ah
the korean-cabbage-in-chili-sauce img is a tiny bit smaller than the others
Use the inspect tool and check the size of all rectangles. They are all the same, but not the korean-cabbage-in-chili-sauce
glitz20
@glitz20
Aug 13 2017 05:07
@paulotokimatu thanks now it makes sense
also @paulotokimatu why is caption not completely visible in smaller screen? https://codepen.io/sabin20/full/EvPgMd/
glitz20
@glitz20
Aug 13 2017 05:12
I have applied media query butit doesnot seem to work
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:13
You mean the "Come Adventure with us" text?
glitz20
@glitz20
Aug 13 2017 05:16
yeah those captions
@paulotokimatu
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:17
I think you are using too much margins
the media queries are working just fine
glitz20
@glitz20
Aug 13 2017 05:20
@paulotokimatu I donot think so, even when I am using margin 5px 0px I am not able to see it
Lallo Vigil
@lalov1
Aug 13 2017 05:21
I'm really close to being finished with the Simon project, but can't figure why they are turning colors at the same time. Could someone help me? https://codepen.io/lalov1/full/MvgvxY/
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:22
Remove the margin declaration in .carousel-caption
glitz20
@glitz20
Aug 13 2017 05:27
@paulotokimatu even after that I cannot see it
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:28
@sabin20 That is beacause you declared many times the margin value, so, for now, just remove all of the margin declarations, in every media query for carousel-caption
Lets try that
glitz20
@glitz20
Aug 13 2017 05:30
@paulotokimatu done
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:30
Worked?
glitz20
@glitz20
Aug 13 2017 05:32
no it didn't
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:34
humm, it seems that your link is working for me though
image.png
glitz20
@glitz20
Aug 13 2017 05:38
@paulotokimatu the original one?
Paulo Tokimatu
@paulotokimatu
Aug 13 2017 05:39
The updated code without margins for carousel-caption
prakash chandra yadav
@prakashyadav008
Aug 13 2017 05:42
hey can anyone help me out..?
how do i set a div element inside a div to be fill the ancestor div completely
iso
@iso1048
Aug 13 2017 06:06
@prakashyadav008 width:100%, height: 100% for the child div?
Luke Miller
@dalumiller
Aug 13 2017 06:06
just finished my calculator, a few styling bits left (name it), but any feedback would be great! https://codepen.io/dalumiller/full/WEEKwY/ Thanks!
prakash chandra yadav
@prakashyadav008
Aug 13 2017 06:07
check this out man one div is up another is shifted down help me out
iso
@iso1048
Aug 13 2017 06:11
@prakashyadav008 how are you wanting it bro?
Long Nguyen
@longnt80
Aug 13 2017 06:51
@dalumiller try 0.05-0.04
@dalumiller also, 0.11.....
1+2=1.5?
prakash chandra yadav
@prakashyadav008
Aug 13 2017 07:07
the two blue color divs should be side by side with a space in between
and both the blue divs to be inside the black div
@gothamknight
Morchid Chellali
@Morched23MJ
Aug 13 2017 07:09
When a button is on hover we use hover, in css, how about when it's on click? I tried active, not working
h1tag
@h1tag
Aug 13 2017 07:14
@Morched23MJ onclick or click ?
iso
@iso1048
Aug 13 2017 07:14
@prakashyadav008 try the following:
.section1{
  position:relative;
  background-color:blue;
  #background-color:rgba(0,0,0,0.4);
  width:48%;
  height:100%;
  #top:40%;  
  float: left;
}
/*
.icons>canvas{
  background-color:blue;
  align:right;
}*/
.section2{
  position:relative;
  line-height:100%;
  background-color:blue;
  #background-color:rgba(0,0,0,0.4);
  #text-align:center;  
  width:48%;
  height:100%;
  #top:40%;
  float: right;
}
Morchid Chellali
@Morched23MJ
Aug 13 2017 07:15
@h1tag, that's a pseudo class? because all what I have seen is active hover, focus :l
h1tag
@h1tag
Aug 13 2017 07:18
@Morched23MJ no, it's not. I thought you're asking about something else. This might be helpful
prakash chandra yadav
@prakashyadav008
Aug 13 2017 07:25
Liam Docherty
@ldocherty1
Aug 13 2017 07:27
Morning it's 8am in the UK. I'm wondering if anyone can link me to a codepen or some sort of tutorial which tells me how I can do this image effect where when the user scrolls down the image scrolls down. Example https://jameslave.com
Morchid Chellali
@Morched23MJ
Aug 13 2017 07:28
Doesn't work.. :l nevermind
Anyone can tell me how to distinguish between an existing channel and another which doesn't exist using api call of twitch?
What differs the two?
status?
Tanisha Garg
@TanishaGarg
Aug 13 2017 07:32
I am trying to add an image to an html file which is stored in my pendrive. How can I do that?
David
@davidcedresx
Aug 13 2017 07:33
@TanishaGarg just put the whole route to the file! like <img src="D:/imgs/img.png">
Tanisha Garg
@TanishaGarg
Aug 13 2017 07:35
@davidcedresx thanks
CamperBot
@camperbot
Aug 13 2017 07:35
tanishagarg sends brownie points to @davidcedresx :sparkles: :thumbsup: :sparkles:
:warning: @davidcedresx's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
David
@davidcedresx
Aug 13 2017 07:36
@TanishaGarg :DD
Tanisha Garg
@TanishaGarg
Aug 13 2017 07:37
And how can I add text such that it appears on some portions of the image?
David
@davidcedresx
Aug 13 2017 07:42
mmmm I think you can put the text in a p inside a div, and then set the image as the background of the div, (and will be the background of the p too because the p is inside that div!)
you know how to set a background image to a div?
Tanisha Garg
@TanishaGarg
Aug 13 2017 07:43
@davidcedresx I have actually forgotten a whole lot of it. So, no
David
@davidcedresx
Aug 13 2017 07:44
like this
body {
background-image: url("paper.gif");
background-color: #cccccc;
}
aaa how do I put code on this thing?
body { background-image: url("paper.gif"); background-color: #cccccc; }
thats css
Tanisha Garg
@TanishaGarg
Aug 13 2017 07:46
And How can i do it in such a way that the image doesn't span over the complete page but is only limiter to certain text?
glitz20
@glitz20
Aug 13 2017 07:46
hey guys can anyone let me know why my caption in the carsoule is not visible? I have used media query for that. https://codepen.io/sabin20/pen/EvPgMd
Tanisha Garg
@TanishaGarg
Aug 13 2017 07:56
@davidcedresx <body background-image = G:/lolo.jpg > it's not working
How to add animation in Html?
David
@davidcedresx
Aug 13 2017 08:01
@TanishaGarg do something like <body style="background-image: asdsd ">...
@TanishaGarg what kind of animations darling? check these out https://daneden.github.io/animate.css/
Liam Docherty
@ldocherty1
Aug 13 2017 08:03
Can link me to a codepen or some sort of tutorial which tells me how I can do this image effect where when the user scrolls down the image scrolls down. Example https://jameslave.com
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:04
@davidcedresx <body style background-image : G:/lolo.jpg > Sorry, but it's still not working
David
@davidcedresx
Aug 13 2017 08:06
youre missing =""
is cleaner if you link a css file and do it from that file
put that inside your <head>
and then create theme.css next to your html file
and put this inside
change the url to match your photo location
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:12
@davidcedresx still now working
It displayed an image when i did it like img src = location but it is not working when the code is like <body style background-image : location>
now = not
Fernando
@lestairon
Aug 13 2017 08:14
@roxroy Thanks, haha. I've been working on it ^^
CamperBot
@camperbot
Aug 13 2017 08:14
lestairon sends brownie points to @roxroy :sparkles: :thumbsup: :sparkles:
:star2: 1107 | @roxroy |http://www.freecodecamp.com/roxroy
Fernando
@lestairon
Aug 13 2017 08:16

Hm, i was doing the challenge https://www.freecodecamp.org/challenges/counting-cards and i tried to do it using only if statements, so far my code is


var count = 0;

function cc(card) {
  // Only change code below this line
  if (card >= 2 || card <= 6) {
    count++;
  }
  else if (card == (10 || "J" || "Q" || "K" || "A")) {
    count--;
  }
  if (count > 0) {
    return count + " Bet";
  }
  else {
    return count + " Hold";
  }
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(10); cc("J"); cc("Q"); cc('K'); cc('A');

But is not working, do you guys know why?

Tanisha Garg
@TanishaGarg
Aug 13 2017 08:27
Can anyone help me in putting a background image in my html code
?
Fernando
@lestairon
Aug 13 2017 08:28
body {
  background-image: url("your url");
}
@TanishaGarg
Make sure you put the url between the quotes
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:29
and how can i do it if i want to put an image form a folder in my computer
Fernando
@lestairon
Aug 13 2017 08:30
Are you hosting your web page?
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:31
no
Fernando
@lestairon
Aug 13 2017 08:31
If that's not the case then you can upload your image to a image host page like imgur
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:32
But as my comp project all the images should be from my folder because that's the only way I can show them at my school
Fernando
@lestairon
Aug 13 2017 08:36
I think you can use the directory where the image is saved
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:40
Thats's what i did but still not working : <body backgroung-image : "G:/lolo.jpg" >
Fernando
@lestairon
Aug 13 2017 08:40
Oh, you're not using css
Try <body background="G:/lolo.jpg">
Tanisha Garg
@TanishaGarg
Aug 13 2017 08:45
@lestairon So sorry, but still not working
@lestairon it worked thanks a lot
CamperBot
@camperbot
Aug 13 2017 08:45
tanishagarg sends brownie points to @lestairon :sparkles: :thumbsup: :sparkles:
:cookie: 200 | @lestairon |http://www.freecodecamp.com/lestairon
Bashaar (Bas)
@Chiefbas
Aug 13 2017 09:08
200?? Gimme gimme 😝.
syncmaster910t
@syncmaster910t
Aug 13 2017 11:46
hi everyone
Trommelochse
@Trommelochse
Aug 13 2017 11:49
hey
Fernando
@lestairon
Aug 13 2017 12:00
Hi
Marko Rajkovic
@marko88ks
Aug 13 2017 12:15
hi to @all Does anyone know how to animate pictures like on this web http://bradleyhaynes.com/ . Does it have some tutorials about that?? please help
Silvester Vella
@silvestervella
Aug 13 2017 12:28
Hi everyone.. can anyone help me with an ajax issue... the url cant seem to read the variables lat and lon...
cowCrazy
@cowCrazy
Aug 13 2017 12:45
@silvestervella are you sure it is possible with "appid=testID"?
Silvester Vella
@silvestervella
Aug 13 2017 12:47
I have put the proper key again
wasn't working either way :/
CamperBot
@camperbot
Aug 13 2017 12:49
:bulb: to format code use backticks! ``` more info
Silvester Vella
@silvestervella
Aug 13 2017 12:49
function showPosition(position) {
lat = position.coords.latitude;
lon = position.coords.longitude;
}
could this be the issue?
cowCrazy
@cowCrazy
Aug 13 2017 12:51
@silvestervella lon and lat are undefined at your code
Silvester Vella
@silvestervella
Aug 13 2017 12:53
I have set var lat;
var lon;
as global variables
then inside the showPosition function, I set their values
shouldnt that work?
cowCrazy
@cowCrazy
Aug 13 2017 12:55
@silvestervella getLocation is an async function, so the api is called before lat and lon has thier value
Ken Haduch
@khaduch
Aug 13 2017 12:55
@silvestervella - you have to synchronize your functions with the asynchronous returns from the geolocation and AJAX calls. If you put a console.log statement to print the lat and lon variables within the showPosition function, you'll see the values. Only after that showPosition function triggers can you then invoke the $.ajax call for your weather.
Silvester Vella
@silvestervella
Aug 13 2017 12:57
@cowCrazy @khaduch .. thanks.. I'll try to figure out how to fix it :)
CamperBot
@camperbot
Aug 13 2017 12:57
silvestervella sends brownie points to @cowcrazy and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
:star2: 3199 | @khaduch |http://www.freecodecamp.com/khaduch
Silvester Vella
@silvestervella
Aug 13 2017 13:00
worked! :)
Ken Haduch
@khaduch
Aug 13 2017 13:05
@silvestervella - great!
cowCrazy
@cowCrazy
Aug 13 2017 13:07
@silvestervella Wunderbar!!!
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:25
What is wrong with the code :
.background
{
bgcolor = "#0000FF">
</style>
<body bgcolor = "red">
<div class="jumbotron background">
.background
{
bgcolor = "#0000FF">
</style>
<body bgcolor = "red">
<div class="jumbotron background">
.background
{
bgcolor = "#0000FF">
</style>
<body bgcolor = "red">
<div class="jumbotron background">
Long Nguyen
@longnt80
Aug 13 2017 13:28
@TanishaGarg bgcolor what is this?
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:29
@longnt80 background-color
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:34
@TanishaGarg why not use regular css?
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:36
@RoniqueRicketts Having to work in notepad currently
Marko Rajkovic
@marko88ks
Aug 13 2017 13:37
ok thank man @RonSwan
CamperBot
@camperbot
Aug 13 2017 13:37
marko88ks sends brownie points to @ronswan :sparkles: :thumbsup: :sparkles:
:cookie: 115 | @ronswan |http://www.freecodecamp.com/ronswan
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:38
@TanishaGarg so if your writing the code in notepad aren't you allowed to code regular css? I've used notepad++ and I am able to make html, css, js files
RonSwan
@RonSwan
Aug 13 2017 13:40
notepad++ has a wide varity of syntax support it should handle that just fine
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:41
@RoniqueRicketts I don't know how to connect a file in html with that of css
RonSwan
@RonSwan
Aug 13 2017 13:41
If you dont like Notepad++ try https://atom.io/
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:41
@RonSwan Yeah it is, I've used it to even write us a simple nodejs program
that can let you connect the files and veiw the results live
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:43
@TanishaGarg oh I can help with that. First in your <head> use <link rel="stylesheet" type="text/css" href="PATHTOCSSHERE"/>
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:45
@RoniqueRicketts if the html and the css file are in the same folder can i just write the name of the css file without specifying any location?
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:46
@TanishaGarg yes use href="/yourcssfilesname.css"
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:47
@RoniqueRicketts Thanks a lot!
CamperBot
@camperbot
Aug 13 2017 13:47
tanishagarg sends brownie points to @roniquericketts :sparkles: :thumbsup: :sparkles:
:cookie: 356 | @roniquericketts |http://www.freecodecamp.com/roniquericketts
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:48
@TanishaGarg your welcome. Is it working for your now?
Tanisha Garg
@TanishaGarg
Aug 13 2017 13:56
@RoniqueRicketts Yes but i tried to change the jumbotron background's width but it is not responsing
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 13:59
@TanishaGarg once its connected then you will have to check your code. lets see the code you have so you can get help.
Tanisha Garg
@TanishaGarg
Aug 13 2017 14:01
.background { background-color: #FFFFCC; width = 100px; }
@RoniqueRicketts
But it is covering almost the whole page
Ronique Ricketts
@RoniqueRicketts
Aug 13 2017 14:03
@TanishaGarg set the height also and see. just for starters to see the difference set height to like height:px just to test your code then if that works you can try setting the height so it can be automatic
Tanisha Garg
@TanishaGarg
Aug 13 2017 14:07
@RoniqueRicketts No, change still, it's covering as much portion as the text but not according to the height and width mentioned
Tai Jones
@taiJones00
Aug 13 2017 14:20
Is there any way I can ensure a specific amount of content is above the fold
Let's say there was more content below this div with the weather information but I always wanted only the weather information to be the only thing the user sees when they load the page
Roxroy
@roxroy
Aug 13 2017 14:39
@taiJones00 , works great, got correct location and temperature. Nice layout.
Jorge
@flawedLogic506
Aug 13 2017 14:42
hey wazzup guys
@lestairon did u get your algorithm working?
@taiJones00 thispage variable is not showing the proper info, i think ..
Fernando
@lestairon
Aug 13 2017 15:02
@OrangeKulture Which algorithm?
Jorge
@flawedLogic506
Aug 13 2017 15:04
@lestairon the count cards?
Fernando
@lestairon
Aug 13 2017 15:16
@OrangeKulture Oh, i changed it and it worked.
Jorge
@flawedLogic506
Aug 13 2017 15:17
@lestairon :thumbsup:
Fernando
@lestairon
Aug 13 2017 15:19
var count = 0;

function cc(card) {
  // Only change code below this line
  if (card >= 2 && card <= 6) {
    count++;
  }
  else if (card >= 7 && card <= 9) {
    count += 0;
  }
  else {
    count--;
  }
  if (count > 0) {
    return count + " Bet";
  }
  else {
    return count + " Hold";
  }
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(10); cc("J"); cc("Q"); cc('K'); cc('A');
Works this way, but i think it's better to use Switch
Jorge
@flawedLogic506
Aug 13 2017 15:21
u can get rid of
else if (card >= 7 && card <= 9) {
count += 0;
that just means make count equl to count + 0 ... which is basically count
continue or something .. altho its not bad
and tbh i think i also did it with if/else rather than switch
Fernando
@lestairon
Aug 13 2017 15:32
u can get rid of
else if (card >= 7 && card <= 9) {
count += 0;
No i cant, if i get rid of that they will enter on the else block
Nazar
@IsaakNazar
Aug 13 2017 15:33
Hi everyone!
first and second jpeg cant load on the page, why?
var maImg = [
        "emma.jpeg",
        "wild.jpeg",
        "kitty.jpeg",
        "island.jpeg"
      ];

      function updateImage(){
        var rand = Math.floor((Math.random() * 3) + 1);
        document.images[0].src = maImg[rand]
      }
      setInterval(updateImage, 2000);
Fernando
@lestairon
Aug 13 2017 15:34
@OrangeKulture Then everytime a card from 7 to 9 is counted it will run the code count--;
Jorge
@flawedLogic506
Aug 13 2017 15:36
@lestairon no i just meant that you dont need to to do count+=0 .. you can just do nothing, or continue .. something like that
Stanislav Chernov
@Beaglefoot
Aug 13 2017 16:09
@IsaakNazar the first one is missing because Math.floor((Math.random() * 3) + 1) returns either 1, 2 or 3 and you need 0 to access "emma.jpeg"
you should see the second one though...
Nazar
@IsaakNazar
Aug 13 2017 16:13
@Beaglefoot thanx man
CamperBot
@camperbot
Aug 13 2017 16:13
isaaknazar sends brownie points to @beaglefoot :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @beaglefoot |http://www.freecodecamp.com/beaglefoot
tobi10
@tobi10
Aug 13 2017 16:38
Hi everyone, I need help on my random quote machine. I'm not sure if its the code or my codepen. After spending hours trying to get it to work, i decided to copy and paste a working version to my codepen and to my surprise the code of the person was not working on my codepen also.
My codepen url is https://codepen.io/tobi10/pen/ZJJdoG . I just want to get it to work before styling it. Please help :worried: Thanks
Christopher McCormack
@cmccormack
Aug 13 2017 16:53
@tobi10 that code uses jQuery and other libararies that aren't linked properly within your codepen.
AliciaP86
@AliciaP86
Aug 13 2017 16:55
image.png
Sorry for the small picture, can someone help me figure out why it's returning valid for "null" but refusing to accept that "Capulet" matches?
Christopher McCormack
@cmccormack
Aug 13 2017 16:56
@tobi10 it's also using an out of date api for the quotes - try to find something that supports https. @JLuboff 's Simpsons API is a fun way to practice - https://github.com/JLuboff/TheSimpsonsQuoteAPI
@AliciaP86 I don't believe this.sourceKey is valid, try just sourceKey
@AliciaP86 what's the exercise again?
AliciaP86
@AliciaP86
Aug 13 2017 16:59
@cmccormack - it's Wherefore Art Thou
I swear I had it without the "this" and it threw an error. Just removed it, though, and now it's cooperating! Thank you! I may be back...
Christopher McCormack
@cmccormack
Aug 13 2017 17:01
@AliciaP86 your source can have more than one property, and Object.values returns an array, you're comparing an array to a value
You should really be checking to make sure the property names match up as well not just values
AliciaP86
@AliciaP86
Aug 13 2017 17:03
@cmccormack - I know source is still a problem, just wanted to get the easiest one first and build from there. But for object.values returning an array, I thought I was controlling for that by looping through the values in the array
right, I'll get the property names added in there, too. I like to try to solve one problem at a time and then build from there
Christopher McCormack
@cmccormack
Aug 13 2017 17:06
@AliciaP86 you're not looping through sourceKey anywhere that i see
AliciaP86
@AliciaP86
Aug 13 2017 17:06
@cmccormack - you're right, not looping through sourceKey yet
tobi10
@tobi10
Aug 13 2017 17:06
@cmccormack thanks, i will re-check it
CamperBot
@camperbot
Aug 13 2017 17:06
tobi10 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1132 | @cmccormack |http://www.freecodecamp.com/cmccormack
Christopher McCormack
@cmccormack
Aug 13 2017 17:07
@tobi10 I would recommend building your own from scratch, better way to learn. You can look at the api call examples but try to make your own
tobi10
@tobi10
Aug 13 2017 17:08
@cmccormack, do you mean building my object rather than using an external API?
Christopher McCormack
@cmccormack
Aug 13 2017 17:10
@tobi10 I may have read your initial question wrong - did you write this code or copy it from elsewhere?
tobi10
@tobi10
Aug 13 2017 17:12
@cmccormack , i wrote this particular one myself. However I couldn't get it to return a quote after several iterations. Then i copied someone-else's own to my codepen and I realised it was not working on my codepen, however it was working on the person's codepen
Christopher McCormack
@cmccormack
Aug 13 2017 17:15
the other person probably had jQuery added in the codepen javascript settings
tobi10
@tobi10
Aug 13 2017 17:19
oh wow, i guess thats where i missed it, let me try doing that setting. What other setting do you think i should do?
Christopher McCormack
@cmccormack
Aug 13 2017 17:22
@tobi10 you have boot strap and a stylesheet, you can add bootstrap and copy your stylesheet to the CSS section or a <style> tag in your html
@tobi10 When using a site like Codepen to do your api calls, you'll have to be aware of security concerns - some sites don't let requests from different origins (codepen.io for example). Some APIs are also http only and codepen is https so those apis won't work directly. Make sure you read up on CORS when you get a chance - https://mdn.io/cors
Gaurav
@gauravmagan
Aug 13 2017 17:26
“Postgres” can’t be opened because the identity of the developer cannot be confirmed.
problem in mac
tobi10
@tobi10
Aug 13 2017 17:26
nice, i didn't know all this. Thank you very much @cmccormack . Time to jump back in. If i have any more troubles can i reach you directly?
CamperBot
@camperbot
Aug 13 2017 17:26
tobi10 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:warning: tobi10 already gave cmccormack points
Christopher McCormack
@cmccormack
Aug 13 2017 17:26
Some APIs permit cross site requests if you include special parameters, but you'll have to read the api. For example, Wikipedia will allow a cross domain request if you provide the parameter &origin=* (iirc). Some don't support it at all, but do support JSONP requests, which are more akin to using a <script> tag to pul the data
Gaurav
@gauravmagan
Aug 13 2017 17:27
did anyone encouter this
@gauravmagan
“Postgres” can’t be opened because the identity of the developer cannot be confirmed.
problem in mac
did anyone encouter this?
Christopher McCormack
@cmccormack
Aug 13 2017 17:27
@tobi10 jQuery makes JSONP very simple - you just have to add callback=? to the url - http://api.jquery.com/jquery.getjson/#jsonp
@tobi10 probably better just to ask in here or HelpJavaScript channel, I may not be on much longer
tobi10
@tobi10
Aug 13 2017 17:29
alright @cmccormack. I appreciate your help :)
Christopher McCormack
@cmccormack
Aug 13 2017 17:29
np :thumbsup:
Gaurav
@gauravmagan
Aug 13 2017 17:34
hey how to stop the other unknown servers running on mac
like kill pid
or
?
Screen Shot 2017-08-13 at 1.34.28 PM.png
its says this when im trying to start
a new server postgres
is there any geek
lol
no one haa?
Adam Recvlohe
@arecvlohe
Aug 13 2017 17:36
@gauravmagan you can use Activity Monitor on mac I think
Search for a port of application and kill it from the dashboard
Gaurav
@gauravmagan
Aug 13 2017 17:37
yes i got this in the first link when googled
Adam Recvlohe
@arecvlohe
Aug 13 2017 17:37
Okay, cool
Adit
@adittyagi
Aug 13 2017 18:19
 function mutation(arr) {
   var count=0;
   var a = arr[0].toLowerCase();
   var b = arr[1].toLowerCase();
   for(var i=0; i<b.length; i++)
     {
       for(var j=0; j<a.length; j++)
         {
           if(b[i]==a[j])
             {
               count++;
               break;
             }
           else
             {
               continue;
              }
         }
     }
  if(count == b.length)
    {
      return true;
    }
  else 
    return false;
}

mutation(["hello", "hey"]);
My solution to a challenge. I am confused whether it is ok or not. Though it worked fine
Sorry about the long code. I tried doing this ```
rudwh2009
@rudwh2009
Aug 13 2017 18:22
If I apply the same style to the same div ,does the browser just ignore that line?
Gulsvi
@gulsvi
Aug 13 2017 18:22
@adittyagi You almost have the code view correct - press shift enter and make a new line after the first set of backticks. You can use the up arrow to edit your post if you want
Adit
@adittyagi
Aug 13 2017 18:23
yeah :smile:
Gulsvi
@gulsvi
Aug 13 2017 18:24
Nice work :)
Adit
@adittyagi
Aug 13 2017 18:24
haha what about the code ?
Gulsvi
@gulsvi
Aug 13 2017 18:24
@adittyagi The code looks good - I'm trying to see how you can do it without the break and continue in your for loop - I haven't seen that used before.
Your final return is an anti-pattern though
  if(count == b.length)
    {
      return true;
    }
  else 
    return false;
^^ That is the same as:
return count == b.length;
because the comparison always results in either true or false
Adit
@adittyagi
Aug 13 2017 18:26
Ohh yes I remember, thank you @SkyC0der
CamperBot
@camperbot
Aug 13 2017 18:26
adittyagi sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2379 | @skyc0der |http://www.freecodecamp.com/skyc0der
Christopher McCormack
@cmccormack
Aug 13 2017 18:26
I'm pretty sure the break else and continue can all be removed from the inner loop and it will function the same
hmm
Gulsvi
@gulsvi
Aug 13 2017 18:27
Seems the break is needed, not the continue
Christopher McCormack
@cmccormack
Aug 13 2017 18:27
yeah that's right
Gulsvi
@gulsvi
Aug 13 2017 18:27
I don't think I've ever used break or continue
Christopher McCormack
@cmccormack
Aug 13 2017 18:27
There are nicer ways to code around it almost every time
Jorge
@flawedLogic506
Aug 13 2017 18:28
hey wazzup guys ..
Sky hows it going?
Gulsvi
@gulsvi
Aug 13 2017 18:28
Hello Jorge :wave:
Adit
@adittyagi
Aug 13 2017 18:28
These days I am studying C too in which I saw this code! Hence applied over here. :smile:
Otherwise I would have used indexOf
Jorge
@flawedLogic506
Aug 13 2017 18:29
break and continue are really useful tho
Moisés Man
@moigithub
Aug 13 2017 18:29
using 2 loops.. that break will stop inner loop iteration.. but no outside loop
soo after it breaks it still will do unnecesary iterations, adding extra variable/condition should fix that
Jorge
@flawedLogic506
Aug 13 2017 18:29
when u r looking for certain condition over a loop
Gulsvi
@gulsvi
Aug 13 2017 18:30
I used .includes() in my solution
@adittyagi The simpler way to write your same code:
function mutation(arr) {
  var count = 0;
  var a = arr[0].toLowerCase();
  var b = arr[1].toLowerCase();
  for (var i = 0; i < b.length; i++) {
    for (var j = 0; j < a.length; j++) {
      if (b[i] == a[j]) {
        count++;
        break;
      }
    }
  }
  return count == b.length;
}
no need for the continue statement
I think putting curly braces on their own line is a C style too? :)
Adit
@adittyagi
Aug 13 2017 18:31
haha yes
thanks for simplifying
Henry Cavendish
@HenryCavendish
Aug 13 2017 20:13
hey guys
i dont know if i am stupid or my knowledge is insufficient, but this one really fucks with my mind
is anyone willing to help
cowCrazy
@cowCrazy
Aug 13 2017 20:15
@HenryCavendish I am with you :)
Henry Cavendish
@HenryCavendish
Aug 13 2017 20:15
can i pm you? @cowCrazy
cowCrazy
@cowCrazy
Aug 13 2017 20:15
sure
Henry Cavendish
@HenryCavendish
Aug 13 2017 20:15
we can talk it out in private
Daniel Ahn
@danii956
Aug 13 2017 20:47
Can anyone help me why this code is returning true?
Is it something to do with forEach?
glitz20
@glitz20
Aug 13 2017 20:50
hey guys my nav bar is preventing my caraousel from being responsive. How can I stop this?https://codepen.io/sabin20/full/EvPgMd/
cowCrazy
@cowCrazy
Aug 13 2017 20:53
@danii956 your return fasle is inside the forEach function, so it is returning the forEach, and not the outer function that you are interested in
Daniel Ahn
@danii956
Aug 13 2017 20:53
hmm that makes sense. Thanks @cowCrazy
CamperBot
@camperbot
Aug 13 2017 20:53
danii956 sends brownie points to @cowcrazy :sparkles: :thumbsup: :sparkles:
:cookie: 327 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
Daniel Ahn
@danii956
Aug 13 2017 20:54
I just used a variable
cowCrazy
@cowCrazy
Aug 13 2017 20:54
:+1:
Gulsvi
@gulsvi
Aug 13 2017 21:01
@sabin20 The Bootstrap Fixed-top navbar requires padding on your body element or it will cover up content on your page:
body {
  padding-top: 50px;
}
glitz20
@glitz20
Aug 13 2017 21:02
@SkyC0der alright now it makes sense thanks
CamperBot
@camperbot
Aug 13 2017 21:02
sabin20 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2380 | @skyc0der |http://www.freecodecamp.com/skyc0der
Elizabeth Paul
@Kowalatam
Aug 13 2017 21:07
hallo beautiful people and emoji's
:)
glitz20
@glitz20
Aug 13 2017 21:16
@SkyC0der how can I make text stick to the image at different screen sizes?
Gulsvi
@gulsvi
Aug 13 2017 21:28
@sabin20 It may be easier to show background images in your carousel
glitz20
@glitz20
Aug 13 2017 21:39
@SkyC0der that's good. But the problem is when I minimize the screen caption dissapears
Lallo Vigil
@lalov1
Aug 13 2017 21:46
I'm really close to being finished with the Simon project, but can't figure why they are turning colors at the same time. Could someone help me? https://codepen.io/lalov1/full/MvgvxY/
Gulsvi
@gulsvi
Aug 13 2017 21:48
@sabin20 hmmm, that doesn't happen for me. Can you show a screenshot?
glitz20
@glitz20
Aug 13 2017 21:51
@SkyC0der it is for smaller screen. I will be using media query then
Gulsvi
@gulsvi
Aug 13 2017 21:52
@sabin20 Yeah, when my screen is 280px wide, I still see the captions in that Codepen I linked to above
glitz20
@glitz20
Aug 13 2017 21:53
Screenshot (74).png
@SkyC0der like this one
Gulsvi
@gulsvi
Aug 13 2017 21:56
@sabin20 I see, when the screen gets shorter... didn't check for that :) You can fix that with min-height:
.item {
  min-height: 250px;
  ...
Adjust the pixels for the minimum height you need without getting the captions cut off
glitz20
@glitz20
Aug 13 2017 21:58
@SkyC0der now its better. Thanks
CamperBot
@camperbot
Aug 13 2017 21:58
sabin20 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: sabin20 already gave skyc0der points
Gulsvi
@gulsvi
Aug 13 2017 21:58
no problem
Jack Lyons
@JackEdwardLyons
Aug 13 2017 23:03
hey guys, could anyone please help me with pagination when retreiving YouTube API videos and listing them out?
My code is getting really messy and I need some help appending a next button but only if there are results remaining
Tai Jones
@taiJones00
Aug 13 2017 23:42
So I have the get a random wikipedia article for that project. Any idea how to bring up a whole list of articles relevant to what's typed into the search box?
Stéfano
@Tefor
Aug 13 2017 23:48

hey guys, i cant delay with jquery the second img check it out

https://codepen.io/Tefor/pen/aJEgWQ

Moisés Man
@moigithub
Aug 13 2017 23:54
https://greensock.com/examples-showcases?product_id=4921 @Tefor
or use a numeric value on delay().. instead of slow.. ie 5000 <-- miliseconds
Stéfano
@Tefor
Aug 13 2017 23:57
let me check it
it doesnt work @moigithub
$("#proyect1").delay(2000).addClass("animated swing");
$("#proyect2").delay(3000).addClass("animated swing");
is something wrong ?