arr = [, , , , , , , , , ];
ericbezanson sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 446 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
if (http){
redirect to https://codepen.io/...
}
if (arr.length > 0)
then check
arr.indexOf(undefined)
?? your passing undefined as a parameter?
console.log(par);
where is par defined?
atalaa sends brownie points to @max77p :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @max77p |http://www.freecodecamp.com/max77p
owenkosnen sends brownie points to @maxgrok :sparkles: :thumbsup: :sparkles:
:cookie: 2 | @maxgrok |http://www.freecodecamp.com/maxgrok
jhadams82 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @sorinr |http://www.freecodecamp.com/sorinr
yeah, i get what you're saying. but i'm using codepen. guess i could work on it offline then copy/paste into codepen when i'm done. but that kinda defeats the purpose of codepen.
10/minute is a call ever 6 seconds. that should be plenty, right?
:warning: jhadams82 already gave sorinr points
jhadams82 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
.nav {
color: white;
input
var is out of scope
success
function?
<body>
<div class="container-fluid" id ="backgroundImage">
<div class="introduction">
<h1>Hi, my name is Sanchit.</h1>
</div>
</div>
</body>
#backgroundImage{
background-image: url(https://images.unsplash.com/photo-1454897834822-1ece264a5d89?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=3a5615c0bc77123ece2a2663e2640341);
background-position:bottom;
background-size:cover;
background-repeat: no-repeat;
height:800px;
position:relative;
}
.introduction{
position:absolute;
top:50%;
left:25%;
font-family: Raleway, sans-serif;
color:white;
}
myFunction()
would be doing on keyup
:cookie: 173 | @rahildar |http://www.freecodecamp.com/rahildar
waynebunch sends brownie points to @rahildar :sparkles: :thumbsup: :sparkles:
waynebunch sends brownie points to @rahildar :sparkles: :thumbsup: :sparkles:
:warning: waynebunch already gave rahildar points
waynebunch sends brownie points to @sorinr and @rahildar :sparkles: :thumbsup: :sparkles:
:warning: waynebunch already gave rahildar points
:cookie: 322 | @sorinr |http://www.freecodecamp.com/sorinr
http://codepen.io/letwitch/pen/VjvPQw?editors=1100
Because the img has flex-shrink: 0; on it, when the browser width gets smaller, the text on the right gets pushed out of it's container. Any way to fix?
@jhadams82 , It's cool and the functionality is perfect. But the text "Partly cloudy" (in my location) still jumps out of the box and the box is also not aligned in line...
Otherwise, cool work...
@oiclid , Very nice positioning . Looks cool. Maybe , add smoothscroll to different sections when clicking to nav. And the background image of landing page isn't that satisfying. Try some dark images with white text. Only my opinions, though.
Cool work...
oiclid sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @shusil123 |http://www.freecodecamp.com/shusil123
ottomahn sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 354 | @shusil123 |http://www.freecodecamp.com/shusil123
scucow sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @shusil123 |http://www.freecodecamp.com/shusil123
scucow sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1070 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
<a href="https://www.facebook.com/sharer/sharer.php?u=http://codepen.io/sentedelviento/full/wGjzZx/" target="_blank">
<button class="btn fa fa-facebook" >
</button>
</a>
sentedelviento sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @sorinr |http://www.freecodecamp.com/sorinr
<p data-height="265" data-theme-id="0" data-slug-hash="xOwLeg" data-default-tab="css" data-user="AlPoole" data-embed-version="2" class="codepen">See the Pen <a href="https://codepen.io/AlPoole/pen/xOwLeg/">xOwLeg</a> by Algie Poole (<a href="http://codepen.io/AlPoole">@AlPoole</a>) on <a href="http://codepen.io">CodePen</a>.</p>
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
soulseekers sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1100 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
(function($, undefined) {
;; // <-----
........so on
efeselgr sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1074 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
requestString
url and pasted it in the browser and i got this error Invalid API key
. Maybe double check that your API Key is correct
mneuschaefer sends brownie points to @purnendutiwari :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @purnendutiwari |http://www.freecodecamp.com/purnendutiwari
{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}
I really need some help. There are huge problems with this that I can't figure out. I've done so much googling!
saebrabaebra sends brownie points to @korn3l :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @korn3l |http://www.freecodecamp.com/korn3l
margin: 0 auto;
to your body
tag in CSS, it will make all the divs align in the center
saebrabaebra sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 391 | @belax8 |http://www.freecodecamp.com/belax8
Hey guys! So i'm working on the random quote generator and running into 2 problems: 1) How do you dynamically change the data-text attribute of the twitter button so that it holds the current quote?
2) I tried using the jQuery .fadeIn function to make each quote fade in after the button is pressed but it doesn't work
Any help/advice is greatly appreciated! Thanks :smile:
http://codepen.io/mcorby17/pen/JKdoMN/
const twitterUrl = "http://twitter.com/home/?status=" + quotes.jsonData.quoteText + "via @" + quotes.jsonData.quoteAuthor;
and then used jQuery's .wrap() to wrap the url around an image or text
http://codepen.io/efeselgr/full/jrbLYd/
Hi,i want my font-awesome icons on the bottom to stay in the middle of their container blocks,margin:0 auto; does not work for them.
.navbar {background: red!important;}
and then change red to the color that you want
hey guys. i'm currently working on the tic tac toe game, but i think i'm doing it wrong. i wrote a function for the first move, which is full of if/else statemetns, and i feel like continuing this route (writing functions for third, fourth, and fifth moves) will be an endless mess of if/else statements.
am i doing this completely wrong? should be tackling this problem differently?
col-md-6
chetanmahore sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 392 | @belax8 |http://www.freecodecamp.com/belax8
gerarddawson sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @sorinr |http://www.freecodecamp.com/sorinr
:warning: gerarddawson already gave sorinr points
gerarddawson sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
http://codepen.io/efeselgr/full/vKNWNq/
here is my portfolio page in progress,i can't make navbar to collapse open in my mobile,is there something wrong with code?
efeselgr sends brownie points to @jondcoleman and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 784 | @jondcoleman |http://www.freecodecamp.com/jondcoleman
:cookie: 326 | @sorinr |http://www.freecodecamp.com/sorinr
geolocation
yagnatheja sends brownie points to @jondcoleman :sparkles: :thumbsup: :sparkles:
:cookie: 785 | @jondcoleman |http://www.freecodecamp.com/jondcoleman
Every browser has a built in navigator that can give us this information.
The navigator will get our user's current longitude and latitude.
You will see a prompt to allow or block this site from knowing your current location. The challenge can be completed either way, as long as the code is correct.
By selecting allow you will see the text on the output phone change to your latitude and longitude
Here's some code that does this:
```javascript
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
:pencil: read more about challenge get geo location data on the FCC Wiki
text-align: center;
on the columns
evude sends brownie points to @jondcoleman and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 786 | @jondcoleman |http://www.freecodecamp.com/jondcoleman
:cookie: 327 | @sorinr |http://www.freecodecamp.com/sorinr
worried
dctor sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @belax8 |http://www.freecodecamp.com/belax8
ESL_SC2
they are streaming 24/7
efeselgr sends brownie points to @belax8 and @bscyrpt and @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 359 | @shusil123 |http://www.freecodecamp.com/shusil123
:cookie: 277 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
:cookie: 394 | @belax8 |http://www.freecodecamp.com/belax8
hey guys. is my switch statement on line 67 (js) too long? it doesn't seem to recognize when the computer wins at tic-tac-toe, which are all the cases in the second half of the statement:
is there any easier way for me to figure out if one of my blocks is empty? (other than "if block1 !== "X" or block1 !== "O")
the issue is that i can't just test if the div is empty, because there's a button inside of it that gets replaced by an X or O.
konikodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 328 | @sorinr |http://www.freecodecamp.com/sorinr
konikodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: konikodes already gave sorinr points
class="row btns"
to class="text-center"
, it seems to work.
row
class helps you with centering - it is for the grid....
mcorby17 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1278 | @khaduch |http://www.freecodecamp.com/khaduch
madddy123 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 329 | @sorinr |http://www.freecodecamp.com/sorinr
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
}
danielmw34 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @sorinr |http://www.freecodecamp.com/sorinr
gjsmith3rd sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @sorinr |http://www.freecodecamp.com/sorinr
gjsmith3rd sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: gjsmith3rd already gave sorinr points
people im having problems with the css, i want the tic tac toe to be in very center of the screen, i have done this before, but no working now, help wanted, thanks
Hi guys. Can anyone tell me what's the use for adding a type to a button ? For example:
<form action="/www.xyz.com">
<input type="text>
<button type="Submit>Submit</button>
</form>
I mean, if I nest the button in the form element, HTML should identify that clicking the button will send the data to the server. What then, is the use of a type for a button?
swastikmohapatra7 sends brownie points to @ocarno5 :sparkles: :thumbsup: :sparkles:
:cookie: 41 | @ocarno5 |http://www.freecodecamp.com/ocarno5
danielmw34 sends brownie points to @sorinr and @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 280 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
Hello all! I am working on my random quote machine. It works, but I would like to hook it up through an API to get quotes from an external source (my current quotes are in a JSON array).
Can any of you recommend a good starting point for me to begin researching how to set up a simple API connection for my quote machine?
dctor sends brownie points to @twozero6 and @ferdyboy81 :sparkles: :thumbsup: :sparkles:
:cookie: 141 | @ferdyboy81 |http://www.freecodecamp.com/ferdyboy81
:cookie: 307 | @twozero6 |http://www.freecodecamp.com/twozero6
akrupicka sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @belax8 |http://www.freecodecamp.com/belax8
hey guys
Am I required to submit with CodePen? I’d find it easier to use a local dev environment and deploy to firebase
smiller171 sends brownie points to @akrupicka :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @akrupicka |http://www.freecodecamp.com/akrupicka
Hello, I'm still struggling with the Twitch API project. I cannot for the life of me figure out how to pass a result from my .getJSON success handler to anywhere else.
If someone could take a look, I'd appreciate it
I tried a construction like
var strObj = $.getJSON("https://api.twitch.tv/kraken/streams/" + twitchUserArr[i].toLowerCase(), function(data) {
...
ending in "return data;" but it didn't return the retrieved object, it returned a bunch of AJAX stuff I don't understand yet
?callback=
part which goes between the API and the function.
I tried putting the
$("#list").append("<a href = '" + address + "'><div class = 'pod'><h3>" + uName + "</h3><br /><p>" + content + "</p></div></a>");
method inside the callback function also, but weird things happen when I do, it sets uName to the name of the last person in the array for every offline streamer
$.getJSON(url,function(){}).done(dataHandler).fail(errorHandler);
punchymango sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1103 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
callback(i, array[i])
this needs to be callback(i, array[i])()
since callback returns a function
function sequence(x, array) {
var i = x;
var length = array.length - 1;
if (i > length) return;
setTimeout(function() {
$("." + array[i]).addClass(array[i] + "-active");
console.log(i, array[i])
setTimeout(function() {
callback(i, array[i])()
sequence(++i, array);
}, 1000);
}, 1000);
};
var i = x
? but never use x?
function sequence(x, array) {
if (x >= array.length) return;
setTimeout(function() {
$("." + array[x]).addClass(array[x] + "-active");
console.log(x, array[x])
setTimeout(function() {
callback(x, array[x])()
sequence(++x, array);
}, 1000);
}, 1000);
}
sequence(++x, array);
called in the first setTimeout, so it was firing before the inner setTimeout finished. Placing that code in the inner setTimeout makes sure it is called after both setTimeouts have completed.
:cookie: 576 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
newtonxu sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
Instructions
We have an array of objects representing different people in our contacts lists.
A lookUp function that takes firstName and a property (prop) as arguments has been pre-written for you.
The function should check if firstName is an actual contact's firstName and the given property (prop) is a property of that contact.
If both are true, then return the "value" of that property.
If firstName does not correspond to any contacts then return "No such contact"
If prop does not correspond to any valid properties then return "No such property"
Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.
:pencil: read more about challenge profile lookup on the FCC Wiki
shwrndasink sends brownie points to @newtonxu :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for newtonxu
shwrndasink sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 577 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
display: none;
? Then change it after when you want to display it?
@esayago - like this:
hideIt {
display:none;
}
And add class="hideIt":
to your div.
esayago sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1279 | @khaduch |http://www.freecodecamp.com/khaduch
$("#getquote").on("click", function () {
$($quotecontent).delay(500).fadeOut(1000);
timeoutID = window.setTimeout(getRandomQuote, 2000);
$($quotecontent).delay(500).fadeIn(1500);
display:none'
, I believe? I think that I just read something about visibility:none;
that still makes the things that you change the visibility of still occupy the space that it was occupying? Maybe you can make your fade function do that, instead?
grizvok sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1280 | @khaduch |http://www.freecodecamp.com/khaduch
sanchit13 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 568 | @gregatgit |http://www.freecodecamp.com/gregatgit
json.weather[0].main
works, but json.weather.main
doesn't work for this API: http://openweathermap.org/current#current_JSON
<div class="jumbotron">
.