These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Nov 2016
grantknaver
@grantknaver
Nov 22 2016 00:00
@jdtdesigns and @0100000101010011 just curious which CSS preprocessor do you guys prefer more SASS or LESS
a.sanchez
@0100000101010011
Nov 22 2016 00:00
@grantknaver i prefer sass
Simon Cordova
@gbsimon87
Nov 22 2016 00:00
With the image above, I'm thinking I create three divs, then use if/else statements to remove/add classes depending upon orientation
But how do I check which way the user tilts, either left or right
steffanek
@steffanek
Nov 22 2016 00:01
Hi guys, Im trying to create a simple app to practice my JS. So First of all, Im creating a list a cats on the left of the screen which contain just a picture of the cat. For any cat than I click I wanna display this cat in the middle. I made it here but something goes wrong.. : http://codepen.io/steffanek/pen/QGpqRE
JD Tadlock
@jdtdesigns
Nov 22 2016 00:04
@gbsimon87
function setColor() {
  console.log(window.orientation);

  // You would then set the correct color based on tilt left or right ;)
}

window.addEventListener('orientationchange', setColor);
You could just add an h1 to your html in codepen and output the orientation to that h1. Then you could view it on your phone.
Simon Cordova
@gbsimon87
Nov 22 2016 00:06
https://www.sitepoint.com/using-device-orientation-html5/
I just came across this article that seems to show which way the phone rotates
tilts**
a.sanchez
@0100000101010011
Nov 22 2016 00:06
@steffanek couple of things going on that may help, it's a bit cluttered in there
instead of body.innerHTML, maybe make an element inside body that acts as a container, that you can append your list to
Simon Cordova
@gbsimon87
Nov 22 2016 00:08
and thanks @jdtdesigns
CamperBot
@camperbot
Nov 22 2016 00:08
gbsimon87 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 781 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
a.sanchez
@0100000101010011
Nov 22 2016 00:09
@steffanek it also depends on your list of cats, if they're a fixed list, as if in you know what cats you're going to put in that list, i'd recommend creating that list in html, not javascript
Simon Cordova
@gbsimon87
Nov 22 2016 00:09
@jdtdesigns when you say set the correct color based on tilt, what do you mean exadtly?
exactly**
Matt K
@MattKim22
Nov 22 2016 00:09
Hi everyone. Just trying to unnecessarily add a bootstrap carousel to my first project (tribute page). But I've run into a problem. The carousel is not working at all. I copy and pasted some stuff I saw on google, and it's not working correctly. Wondering if you guys could help at all http://codepen.io/MattKim22/pen/KNaxqE
JD Tadlock
@jdtdesigns
Nov 22 2016 00:10
@gbsimon87 The challenge picture you posted wants you to change the color of the main box based on tilt left or right.
Simon Cordova
@gbsimon87
Nov 22 2016 00:11
@jdtdesigns correct...technically those images would be classes, and I assume I have to add and remove classes and place them on the correct place depending upon the phone's tilt
Andrea De La Flor Muente
@adelaflor
Nov 22 2016 00:12
hi nay idea why this white space is there? http://codepen.io/adelaflor/pen/YpzyoN?editors=1100
also when the navbar is collpase the button doesnt open, is it because of codepen?
Simon Cordova
@gbsimon87
Nov 22 2016 00:13
@adelaflor try
.navbar {
  margin: 0;
}
a.sanchez
@0100000101010011
Nov 22 2016 00:14
@grantknaver btw, i meant more specifically scss, which is cut from sass, check out scss
Simon Cordova
@gbsimon87
Nov 22 2016 00:14
I would actually however add a new class inside the navbar and put the new property there, that way you don't mess around with bootstrap's native classes
steffanek
@steffanek
Nov 22 2016 00:14
@adelaflor .navbar-inverse { margin: 0;}
a.sanchez
@0100000101010011
Nov 22 2016 00:16
@adelaflor set .navbar {margin-bottom: 0;} it'll get rid of that white space
steffanek
@steffanek
Nov 22 2016 00:17
@0100000101010011 I just see your msg, thats what I actually did, and then I comment the HTML to display the List when the page is loaded inside the JS. check it out : http://codepen.io/steffanek/pen/QGpqRE
Matt K
@MattKim22
Nov 22 2016 00:18
http://codepen.io/MattKim22/pen/KNaxqE Hey, can someone help me understand why my carousel isn't working?
steffanek
@steffanek
Nov 22 2016 00:18
if you uncomment and remove the body.innerHTML = '' from JS you will see the whole CSS @0100000101010011
@MattKim22 u should use JS its better ;)
a.sanchez
@0100000101010011
Nov 22 2016 00:21
@steffanek looking at console, i see errors
steffanek
@steffanek
Nov 22 2016 00:22
@0100000101010011 the error comes from this, when I append the new li element to the existing ul : var catList = document.getElementById('catList');
catList.append(newCat);
Ellias
@Tron2097
Nov 22 2016 00:26
I not quite sure how to link my css to my html on code pen. any help would be appreciated.
a.sanchez
@0100000101010011
Nov 22 2016 00:29
@steffanek looks like on click, you create a new div that displays the cat image you selected if i'm seeing that right. however, when you click that div doesn't get created, i don't see it get added to the dom
steffanek
@steffanek
Nov 22 2016 00:35
@0100000101010011 I find out , I remove the body.innerHTML =''
a.sanchez
@0100000101010011
Nov 22 2016 00:41
@steffanek right, but i still don't see the div, in your javascript, on click, you create a div and give it a class of display, which is where i'm assuming you want your cat image to display once someone clicks on the cat image
that div is not being created and added to the dom from what i can tell
steffanek
@steffanek
Nov 22 2016 00:42
@0100000101010011 Ye I know thats what Im trying to figure out right now ;)
a.sanchez
@0100000101010011
Nov 22 2016 00:42
@steffanek here i recommend not creating the div in javascript, create it with plain html
changes made to the dom dynamically are taxing, and smear performance. generally speaking, it's not recommended to create dom elements dynamically when and where possible
steffanek
@steffanek
Nov 22 2016 00:43
@0100000101010011 ye I already created inside the HTML then I comment it, My purpose is to when the page is loaded, I only see the List of cats on the left. Then when I click on any cat the Div is displayed
a.sanchez
@0100000101010011
Nov 22 2016 00:44
@steffanek ok, that's what i was thinking you were trying to do
steffanek
@steffanek
Nov 22 2016 00:44
@0100000101010011 so actually there is no other method
cuz my final target is to have the div displayed and each time I click on the cat, it showing the numbers of click
a.sanchez
@0100000101010011
Nov 22 2016 00:54
@steffanek i see what's happening, i got it to show the cat image now in the container
steffanek
@steffanek
Nov 22 2016 00:54
@0100000101010011 ye me too but its only showing the 2nd one
cuz of the for loop
Tomas Mattia
@tomasmattia
Nov 22 2016 00:59
// Setup
var collection = {
    "2548": {
      "album": "Slippery When Wet",
      "artist": "Bon Jovi",
      "tracks": [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    "2468": {
      "album": "1999",
      "artist": "Prince",
      "tracks": [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    "1245": {
      "artist": "Robert Palmer",
      "tracks": [ ]
    },
    "5439": {
      "album": "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

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


}

// Alter values below to test your code
updateRecords(5439, "artist", "ABBA");
this is my code of record collection
those 2 else if in the middle didnt work like i expected
idk how to make it
Dirkra
@Dirkra
Nov 22 2016 01:03
Hello, I have a question
How do I lock the html elements so they don't break into multiple lines when I shrink the window?
I don't know if I made myself clear
Simon Cordova
@gbsimon87
Nov 22 2016 01:05
@Dirkra do you have a codepen?
maybe u want a responsive design?
u must apply that to redisign your web when u shrink the window
Dirkra
@Dirkra
Nov 22 2016 01:07
https://codepen.io/Dirkra/pen/rWyrzv?editors=1100 it's kind of a joke tribute site, don't laugh lol
Tomas Mattia
@tomasmattia
Nov 22 2016 01:08
hablas español no?
Dirkra
@Dirkra
Nov 22 2016 01:08
I'm making the tribute page challenge, I want to do it using only html and bootstrap
Si
Tomas Mattia
@tomasmattia
Nov 22 2016 01:08
usa img-responsive de clase en la img
Dirkra
@Dirkra
Nov 22 2016 01:08
Que haria eso?
Simon Cordova
@gbsimon87
Nov 22 2016 01:09
usando img-responsive hara que la foto crezca o disminuya dependiendo el en contenedor
Dirkra
@Dirkra
Nov 22 2016 01:09
Igual yo pregunto por el texto de arriba de todo
La idea es que sea una sola linea siempre
Tomas Mattia
@tomasmattia
Nov 22 2016 01:09
y ademas le diste esta clase al contenedor col-md-1
Dirkra
@Dirkra
Nov 22 2016 01:09
Y el resto de los elementos tambien
Tomas Mattia
@tomasmattia
Nov 22 2016 01:09
si es una sola pagina no necesitas esas clases
Simon Cordova
@gbsimon87
Nov 22 2016 01:10
@Dirkra, trata que tus elementos, cuando usando bootstrap, agreguen hasta 12...
Tomas Mattia
@tomasmattia
Nov 22 2016 01:10
porque tienden a romper todo en columnas y te va a quedar muy chico
Simon Cordova
@gbsimon87
Nov 22 2016 01:10
lee esta documentacion
Dirkra
@Dirkra
Nov 22 2016 01:11
saco col-md-* entonces?
Tomas Mattia
@tomasmattia
Nov 22 2016 01:11
claro
eso que te paso @gbsimon87 esta perfecto
Dirkra
@Dirkra
Nov 22 2016 01:12
y para los textos como hago?
Tomas Mattia
@tomasmattia
Nov 22 2016 01:12
mira, tendrias que usar un container que contenga todo
adentro iria el row
para la img usa el thumbnail
Dirkra
@Dirkra
Nov 22 2016 01:13
ajam, creo que entiendo
Dirkra
@Dirkra
Nov 22 2016 01:13
tengo esa misma pagina en otra pestaña, jajaj
use img-thumbnail porque thumbnail solo me dejaba un margen gigante alrededor de la imagen y no sabia como sacarlo
Simon Cordova
@gbsimon87
Nov 22 2016 01:14
@Dirkra entiendes como es que funcionan las columnas?
Dirkra
@Dirkra
Nov 22 2016 01:15
@gbsimon87 supongo que si, al principio intente con 5-7, despues me olvide y lo deje en 1-7
voy a probar poniendo todo en el mismo container entonces, mas tarde vuelvo :P
Thanks @tomasmattia @gbsimon87
Simon Cordova
@gbsimon87
Nov 22 2016 01:16
espera
CamperBot
@camperbot
Nov 22 2016 01:16
dirkra sends brownie points to @tomasmattia and @gbsimon87 :sparkles: :thumbsup: :sparkles:
:cookie: 363 | @gbsimon87 |http://www.freecodecamp.com/gbsimon87
:cookie: 210 | @tomasmattia |http://www.freecodecamp.com/tomasmattia
Dirkra
@Dirkra
Nov 22 2016 01:16
Si?
Simon Cordova
@gbsimon87
Nov 22 2016 01:16
mira...
el contexto es asi...
<div class="container">
<div class="row"
<div class = col-*>
entonces...
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:18
A lo mejor este ejemplo te sirve para entender las columnas: http://codepen.io/TylerMoeller/pen/qNrbok
Simon Cordova
@gbsimon87
Nov 22 2016 01:18

usando bootstrap, imagina que la pagina se divide en 12 columnas...
entonces si tienes...

<div class="col-xs-12 col-sm-12 col-md-6 col-lg-4">

Estas practicamente diciendole a bootstrap...
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:18
También, la clase text-nowrap... back to english for me now :)
Simon Cordova
@gbsimon87
Nov 22 2016 01:19
en celulares, haz que este div use 12 columnas, en pantallas un poquito mas grande tambien, en pantallas mas grande, como en tablets, usa 6 columnas, y en pantallas grande usa 4
Dirkra
@Dirkra
Nov 22 2016 01:19
Entiendo
Simon Cordova
@gbsimon87
Nov 22 2016 01:19
te quitara la duda
Dirkra
@Dirkra
Nov 22 2016 01:20
Voy a dejarlo abierto para leerlo luego, tengo que irme
Gracias de nuevo, and thanks @TylerMoeller :smile:
CamperBot
@camperbot
Nov 22 2016 01:20
dirkra sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 950 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Simon Cordova
@gbsimon87
Nov 22 2016 01:20
salud...
oh y, chile dos veces consecutivas?!? oh dios mio! jaja
lol @TylerMoeller
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:21
I wish I knew how to speak about code in Spanish :)
Simon Cordova
@gbsimon87
Nov 22 2016 01:21
@TylerMoeller I was about to figure out rather well how to use the screen orientation, but can't find any documentation that lets the phone know if its tilted left or right
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:22
If I remember right, it's window.orientation and window.screen.orientation, but support is limited
Simon Cordova
@gbsimon87
Nov 22 2016 01:22
so how do mobile sites do it?
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:23
Personally, I don't think it's a good design idea to plan specific functionality based on device orientation unless you limit support to specific browsers
@gbsimon87 That should actually work in everything but Safari: http://caniuse.com/#search=deviceorientation
Simon Cordova
@gbsimon87
Nov 22 2016 01:29
@TylerMoeller
see to test it I used this code...
window.addEventListener("orientationchange", function() {
    if (window.orientation == 0) {
        alert("do nothing");
    } else if (window.orientation == 90) { //going left
        alert("landscape mode") // landscape mode
    }
    else (window.orientation == -90) { //going right
    alert("portrait mode"); // portrait mode
}
});
it's not fully working to my need though
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:30
@gbsimon87 The only time I've used it is to detect if I'm on mobile, but due to lack of support, not the best way to go about it.
if(window.orientation) console.log('This is a mobile device');
I'll play around with it though and see - might be good to learn...
Simon Cordova
@gbsimon87
Nov 22 2016 01:31
Hey maybe this will help, this is the assignment I've been asked to do...
blob
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:33
That actually looks like a fun project :) I wonder if there's a way to see if screen width is wider than height and forget about the orientation change event...
@gbsimon87 Where is that code not working for you? I just tried it on my iPhone and it works on both Safari and Chrome. http://s.codepen.io/TylerMoeller/debug/NbpLaz
Simon Cordova
@gbsimon87
Nov 22 2016 01:38
your codepen won't open :(
@TylerMoeller
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:39
It's just a blank page with your JS, tilt it to see your alert()
nevermind, I see the bug now
Simon Cordova
@gbsimon87
Nov 22 2016 01:42
yeah...
I've been trying to play with different settings within that code...
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:43

You could do something like this:

if (window.innerHeight < window.innerWidth) {
  alert('Landscape Mode');
} else {
  alert('Portrait Mode')
}

But then you need to add a listener for document.height changes

Simon Cordova
@gbsimon87
Nov 22 2016 01:45
@TylerMoeller could you try and make sense out of this?
https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation
I can use media queries and even some simple js for the orientation, but defining which way the screen is rotated seems to be the hard part
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:47
@gbsimon87 To be honest, this is something that might take me 30+ minutes, but looks like fun. I have to make dinner soon, but I will look when I get back.
Simon Cordova
@gbsimon87
Nov 22 2016 01:48
@TylerMoeller if you can take a look at it later on I'd highly appreciate, if you can't, don't worry anyways, you've been amazing hep a number of times to me now
go supersonics :clap: ;)
Tyler Moeller
@TylerMoeller
Nov 22 2016 01:49
Lol, yes, go sonics :smile: will let you know if I come up with anything.
JD Tadlock
@jdtdesigns
Nov 22 2016 01:54
@gbsimon87 Just came back. I made this to show you an example of what I think they want. ;) http://jsbin.com/waroto/edit?output
Simon Cordova
@gbsimon87
Nov 22 2016 01:57
@jdtdesigns I'm about to check it...
whether it's correct or not, thank you so very much
CamperBot
@camperbot
Nov 22 2016 01:57
gbsimon87 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 782 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Simon Cordova
@gbsimon87
Nov 22 2016 01:58
Which seems to be right across the lines of what they're looking for
!!!!
JackVizl
@JackVizl
Nov 22 2016 01:59
@rledford @oppiniated @heroiczero this is the Arguments optional challenge, i rearranged the code to check for size first. what do you mean by return a function?



function sepArgs(firstArg){
  secArg=0;



  if(typeof secArg==='number'){

 //how do i get the second argument?




 // return firstArg+secArg;

  }

  else{return undefined;}


}



function addTogether() {


if(arguments.length<2){


  sepArgs(arguments[0]);

}
  else if((typeof arguments[0]!=='number')||(typeof arguments[1]!=='number')){
    return undefined;

  }
  else{return arguments[0]+arguments[1];}



}

addTogether(2);
Simon Cordova
@gbsimon87
Nov 22 2016 02:15
@jdtdesigns do you have any resources you may recommend for me to further improve my knowledge?
you always seem to have a solution to problems posted here
JD Tadlock
@jdtdesigns
Nov 22 2016 02:16
You have to code. The more things you make, the more you learn due to the knowledge needed for each new thing.
Whatever illusion you have about the time to learn this stuff, just know it can take upwards of 4 to 8 years to get to a professional level.
If you work your arse off, it can be shorter.
But that usually leads to burning yourself out, which leads to long breaks, which leads to forgetting a lot of stuff.
Simon Cordova
@gbsimon87
Nov 22 2016 02:26
true...
im willingthough :)
I got one question regarding the screen tilting, is there a way that if I tilt my screen left it actually takes me to a diffrent page?
@jdtdesigns
i found that
JD Tadlock
@jdtdesigns
Nov 22 2016 02:30
@gbsimon87 window.location.href = 'the url';
Simon Cordova
@gbsimon87
Nov 22 2016 02:31
youre the man
Simon Cordova
@gbsimon87
Nov 22 2016 02:47
@jdtdesigns one last question if you're still there...
JD Tadlock
@jdtdesigns
Nov 22 2016 02:50
go for it @gbsimon87
Simon Cordova
@gbsimon87
Nov 22 2016 02:52
How could I make this design using flex?
blob
Christopher
@christopherwangemann
Nov 22 2016 03:13
Hey guys, is it normal that when I'm using bootstrap list items have a much smaller font than text in paragraphs? Looks a little weird
David Cruz
@dcruz87
Nov 22 2016 03:22
How is everyone doing on the personal portfolio? I need some inspiration! lol
ashkrish07
@ashkrish07
Nov 22 2016 03:33
Me too need some help in the portfoio..
David Cruz
@dcruz87
Nov 22 2016 03:35
@ashkrish07 its a bit tricky going from scratch. This definitely gets your gears going. Want to share links and critique each other?
varlackc
@varlackc
Nov 22 2016 03:50
Hello everyone I am trying to have the text on the left and my image on the right, I want both of them to be next to each other but I am having problems, here is the url http://codepen.io/varlackc/pen/ENZBVp
Yacob Gugsa
@yacobgugsa
Nov 22 2016 04:04
Hi. For the personal portfolio webpage project, is it best practice to include all of the Bootstrap components (Bootstrap CSS, Bootstrap JS, along with Jquery), or will I not miss out on anything if I just use Bootstrap CSS (and not Bootstrap JS or Jquery)? Furthermore, when would it be better to use the non-minified Bootstrap files over the minified ones? Thank you.
descript
@descript
Nov 22 2016 04:20
@varlackc comment out the A] CSS: TOP-DESIGN Border Width 600px; B] remove the 'col-xs-12' class from line 12, C] add the class 'col-sm-6' to the DIVs on line 17 and line 23
that brought things together the way I think you want them, but you will have to play with your navbar some more
Henry Cabello
@hacu9
Nov 22 2016 04:32
Hey! Can anyone give feedback and help me on my Simon proyect? https://codepen.io/cabello986/pen/rrgdpV?editors=1010 i have a problem with the play function cuz it pushes the plays twice
Ty.Jerome
@Ty-Jermoe
Nov 22 2016 04:49
Hello! Could anyone offer guidance on the collapsed nav button? Once collapsed, nothing happens when it is clicked.
http://codepen.io/TyJerome/pen/aBpjzR?editors=1100
grantknaver
@grantknaver
Nov 22 2016 04:51
Ok this is not breaking my code but it is driving me crazy.
```
request.open('Get', url);
        request.send();
      })();
    });
Tyler Moeller
@TylerMoeller
Nov 22 2016 04:52
@gbsimon87 The code you were using before seems to work fine: https://s.codepen.io/TylerMoeller/debug/NbpLaz
I don't have more time to look into it today, but give that url a try on your phone and switch to portrait/landscape.
grantknaver
@grantknaver
Nov 22 2016 04:52
that second () does not belong there but when I try to take it out it breaks my code. I need a second pair of eyes.
here is all my code
Henry Cabello
@hacu9
Nov 22 2016 04:53
Anyone willing to halp me? >:c
Ty.Jerome
@Ty-Jermoe
Nov 22 2016 04:57
@grantknaver (not an expert) Trying to eyeball all the open / close tags throughout the full function. the first thing I assume is that there is an extra one somewhere.
Tyler Moeller
@TylerMoeller
Nov 22 2016 04:57
@grantknaver That's the required syntax for encapsulated anonymous functions in JS
That is, if you're referring to the final two purple () in your code block above
grantknaver
@grantknaver
Nov 22 2016 05:03
ya I am hmmm
maybe I am just not seeing it than
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:03
Where did you learn to use encapsulated anonymous functions?
grantknaver
@grantknaver
Nov 22 2016 05:05
So you telling that
```
 Direction();

          }//End of If statement
        }//End of Ajax Request
        // specify the type of request
        request.open('Get', url);
        request.send();
      })(); 
    });
})(); is right
?
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:06
No, this is what would be right:
(function ajaxGet() {
  // code here
})();
grantknaver
@grantknaver
Nov 22 2016 05:07
ah got that
Tom
@moT01
Nov 22 2016 05:08
hey, i am unfamiliar with those, i see the difference in syntax, but do they act any different from a standard function, or whats the purpose?
curious
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:08
              .......
              if (deg >= 326.25 && deg <  348.75) {
                wind.innerHTML = weather.wind.speed + " knots" + " NNW";  
              }
            } <------- this is where your direction() function ends
grantknaver
@grantknaver
Nov 22 2016 05:09
I get that OK
Honestly I am horrible with them @TylerMoeller took me forever to put this code together trial and error
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:11
@moT01 I'm still a noob when it comes to those, they're expressions that get invoked immediately. Useful for keeping things in scope and not messing up the rest of your code.
grantknaver
@grantknaver
Nov 22 2016 05:11
ahhhh OK
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:11
@grantknaver If I may, your Direction() function can be reduced to 3 lines with some math and an array of all 16 wind directions.
Tom
@moT01
Nov 22 2016 05:12
that was my thought
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:12
360 degrees on a compass, 16 directions, 22.5 degrees per direction.
Tom
@moT01
Nov 22 2016 05:12
thanks @TylerMoeller have a cookie
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:12
Fun algorithm to work on when you have time :)
CamperBot
@camperbot
Nov 22 2016 05:12
mot01 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 951 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
grantknaver
@grantknaver
Nov 22 2016 05:12
Good point that would have been shorter
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:13
It's about time for dessert lol
grantknaver
@grantknaver
Nov 22 2016 05:13
wow lol
Tom
@moT01
Nov 22 2016 05:14
you helped me with my wikipedia page a week ago or so, deserved another treat
grantknaver
@grantknaver
Nov 22 2016 05:14
quick question @TylerMoeller
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:15
Always happy to help
Sure @grantknaver
Tom
@moT01
Nov 22 2016 05:16
you did quite a bit of work on it, ...i didn't copy it, but it pointed me in a different/similar direction to get it done
grantknaver
@grantknaver
Nov 22 2016 05:22
do you have any idea how to return request.responseText through my API so I use this info through out my code?
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:25
@grantknaver You can separate the logic into functions and pass data between them
for example:
function getLocation() {
  navigator.geolocation.getCurrentPosition(function (position) {
    var lat = position.coords.latitude;
    var lon = position.coords.longitude;

    getWeather(lat, lon);
  });
}

function getWeather(lat, lon) {
  console.log('your lat is' + lat + 'and your lon is' + lon);
}
That's a common way to do it anyway
grantknaver
@grantknaver
Nov 22 2016 05:28
sorry let me clarify I meant returning my JSON data
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:30
I'm not sure I understand, it should be a similar concept. Let's say you wanted to display your weather data somewhere else in your code:
....
if(request.readyState === 4 && request.status === 200) {
  var weather = JSON.parse(request.responseText);
  displayWeather(weather);
}

function displayWeather(weather) {
  // display your JSON data on the page
}
You separate your code into functions and pass the JSON to any function that needs it
grantknaver
@grantknaver
Nov 22 2016 05:32
OK well. I will try that JSON has been interesting to learn
The problem I am having is you need to have the
```
 request.open('Get', url);
        request.send();
      })();
to complete the JSON request so how do I close up the function to pull the data to where ever I want through out the code
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:37
You would need to stop using the encapsulated function - one point of those is to keep all your data inside and not allow it to escape to the rest of your code.
From a quick look, if you delete lines 32 and 107 and then you'll be able to pass your JSON around
grantknaver
@grantknaver
Nov 22 2016 05:43
thanks
@TylerMoeller thanks
CamperBot
@camperbot
Nov 22 2016 05:44
grantknaver sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 952 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Nov 22 2016 05:44
Any time - have to log off for now. I should be back on again tomorrow.
grantknaver
@grantknaver
Nov 22 2016 05:46
been fun
grantknaver
@grantknaver
Nov 22 2016 06:08
Ok still cant figure out how to return request.responseText through my API so I use this info through out my code? Any ideas out there
JackVizl
@JackVizl
Nov 22 2016 06:17
http://codepen.io/JackVizl/pen/XNMoML?editors=0010
fck
anyone tell me why the twitter button refuses to work?
Henry Cabello
@hacu9
Nov 22 2016 06:24
@JackVizl <span class="fa fa-quote-left"</span> Some cause happiness wherever they go; others, whenever they go. <span class="fa fa-quote-right"</span> <em style='font-size:30px'><b>-</b></em> Oscar Wilde Thats what you are sending to twitter link
JD Tadlock
@jdtdesigns
Nov 22 2016 06:25
@grantknaver I see some bad things lol. Never ever set global variables.
You need to organize the code so the twitter redirect has access to those variables inside getQuote.
Henry Cabello
@hacu9
Nov 22 2016 06:28
@JackVizl You are sending the whole HTML,Try getting just the text
JD Tadlock
@jdtdesigns
Nov 22 2016 06:28
Also, why in the world did you make a random font generator lol
2 fonts with a couple weights is a pretty heavy load on a site
10 fonts is a disaster
@grantknaver
Change to one font. The randomColor is cool though.
Henry Cabello
@hacu9
Nov 22 2016 06:31
YOLO,i also made a random font generator for that challenge xD, Just trying new things
JackVizl
@JackVizl
Nov 22 2016 06:33
@hacu9 haha aye had to differentiate mine from the example one somehow right xD
"its exactly the same as the example",
"No, it has different fonts"
@hacu9 also thanks for the help
CamperBot
@camperbot
Nov 22 2016 06:34
jackvizl sends brownie points to @hacu9 :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @hacu9 |http://www.freecodecamp.com/hacu9
JD Tadlock
@jdtdesigns
Nov 22 2016 06:34
Trying things is cool but i'd highly recommend not making the user download 5 megs of fonts lol @hacu9 @JackVizl @grantknaver
JackVizl
@JackVizl
Nov 22 2016 06:35
@jdtdesigns ur 100% right but this website is only for the challenge so
grantknaver
@grantknaver
Nov 22 2016 06:37
Ok lol @jdtdesigns
Henry Cabello
@hacu9
Nov 22 2016 06:38
Someone take a look at my pen D: https://codepen.io/cabello986/pen/rrgdpV go ahead and open dev tools console,click ON and try to play,it keeps pushing massive elements into the playerplays array
also,isnt it cute? :c
grantknaver
@grantknaver
Nov 22 2016 06:40
@jdtdesigns I didn't set random font
Henry Cabello
@hacu9
Nov 22 2016 06:41
give .box a margin(?
oh floats lul
Henry Cabello
@hacu9
Nov 22 2016 06:47
@c0d0er You could...give them a white 10px solid border and it could look like a margin xD
c0d0er
@c0d0er
Nov 22 2016 06:48
@hacu9 thank you!!!
CamperBot
@camperbot
Nov 22 2016 06:48
c0d0er sends brownie points to @hacu9 :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @hacu9 |http://www.freecodecamp.com/hacu9
JackVizl
@JackVizl
Nov 22 2016 06:48
is there a way i can make this fill the screen on mobile but be rlly small on desktop?
kirbyedy
@kirbyedy
Nov 22 2016 06:49
@JackVizl hmmm the quotes are changing by itself
I only pressed once
JackVizl
@JackVizl
Nov 22 2016 06:49
yeah chucked that in
got a recursive timeout in there for 10 secs
Henry Cabello
@hacu9
Nov 22 2016 06:50
twitter button not working(? and i guess @media queries would do the trick
kirbyedy
@kirbyedy
Nov 22 2016 06:50
your html is not quite right
no head
no body
Henry Cabello
@hacu9
Nov 22 2016 06:50
no need for that on code pen tho
kirbyedy
@kirbyedy
Nov 22 2016 06:51
no, but its a good practice
this looks like half assed done job honestly, and if someone looks to it... well...
<meta name="viewport" content="width=device-width, initial-scale=1">
this should be put into head
and then some media queries in order to look ok on mobile devices
Henry Cabello
@hacu9
Nov 22 2016 06:53
Someone take a look at my pen D: https://codepen.io/cabello986/pen/rrgdpV go ahead and open dev tools console,click ON and try to play,it keeps pushing massive elements into the playerplays array
also,isnt it cute? :c
i reaaaaaaaaaaally need halp with that
kirbyedy
@kirbyedy
Nov 22 2016 06:59
cool :D
I haven`t done simon yet, so I am pretty much lost in your code
the thing is, you have that IF (true) and then push into the array, so I am guessing that loop goes on and on and on...
while you should actually stop it after the first click
or not ?
Henry Cabello
@hacu9
Nov 22 2016 07:02
nah,i had something else there it should go on only when clicked or at least thats what i want
lets give it a shot
Henry Cabello
@hacu9
Nov 22 2016 07:19
welp,apparently a return false fixed it lol
nvm
kirbyedy
@kirbyedy
Nov 22 2016 07:43
right :)
jjvm
@jjvm
Nov 22 2016 07:56
Hello, is it a good practice to api call all the contents first in the database first then manipulate them using javascript (finding id, sorting, and etc) ?
kyadondo Timothy
@chadwalt
Nov 22 2016 08:07
@justin010296 i think that is a bad idea
y would you want such a thing
jjvm
@jjvm
Nov 22 2016 08:08
Here's a revised question:
Hello, is it a good practice to ajax call all data first from database (eg: Select * from students) then manipulate it using javascript (eg: finding name of student in json format by finding id in json object) so that I don't have to ajax call (Select student_name from students where student_id = 1) every time I find a new id?
JD Tadlock
@jdtdesigns
Nov 22 2016 08:09
@grantknaver Made something similar to give you some ideas how to shorten your code. http://jsbin.com/?js,output
kyadondo Timothy
@chadwalt
Nov 22 2016 08:11
@justin010296 for example you have 1000s of records, this will slow down your application. and yet again javascript has to loop/ search through to find the required id that you are looking for. Its more like double work. cause the database can actually do the filterin
JD Tadlock
@jdtdesigns
Nov 22 2016 08:13
and all the animations are pure css ;) @grantknaver
jjvm
@jjvm
Nov 22 2016 08:13
@chadwalt i see, thanks it makes sense now
CamperBot
@camperbot
Nov 22 2016 08:13
justin010296 sends brownie points to @chadwalt :sparkles: :thumbsup: :sparkles:
:cookie: 3 | @chadwalt |http://www.freecodecamp.com/chadwalt
Stefan
@st3fun1
Nov 22 2016 08:14
Hi guys, does anyone know why my form gets submitted multiple times?

$('#find-me').submit(function(e){
     e.preventDefault();
     var str = $(this).serialize();
     $.ajax(
      {
        "url": $(this).attr("action"),
        "type":"POST",
        "data": str,
        "success": function(){
            console.log("yes");
        },
        "error": function(){
            console.log("no");
        }
      }
      )
     .done(function(response){
         $('.email-status').html('Email sent succesfuly!').fadeIn();
     })
     .fail(function(){
         $('.email-status').html('Unsuccesful request!').fadeIn();
     }).always(function(){
         console.log('l');
     });
  });
kyadondo Timothy
@chadwalt
Nov 22 2016 08:15
@justin010296 glad I helped
@st3fun1 set cache: false, processData:false
Stefan
@st3fun1
Nov 22 2016 08:17
Ok I'm gonna try right now
@chadwalt that doesn't help my server side script i get back a 503 status
kyadondo Timothy
@chadwalt
Nov 22 2016 08:27
@st3fun1 show me the error message
Stefan
@st3fun1
Nov 22 2016 08:28
Status Code:503 Service Unavailable
I'll post the server side script too
oh
i know why i get 503
but still even if I don't get that, my form is still getting submitted a million times
var express = require("express");
var cors = require('cors');
var path = require('path');
var bodyParser = require("body-parser");
var app = express();
var mailRouter = express.Router();
var mailer = require("nodemailer");
//email
var transporter =  mailer.createTransport('smtps://email@gmail.com:password@smtp.gmail.com');
app.use(express.static(__dirname + '/public'));
app.use(cors({credentials:true, origin: true}));
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());

app.use(function(req,res,next){
   if(req.body.name == '' || req.body.email == '' || req.body.message == ''){
       res.status(500).json({message:"Error! Empty Fields!"});
   } else {
       next();
   }
});
mailRouter.route('/send-mail').post(function(req,res){
    var mailOptions = {
        from: `${req.body.name} <${req.body.email}>`, // sender address
        to: 'email@gmail.com', // list of receivers
        subject: 'Contact Portofolio', // Subject line
        text: `${req.body.message}`,
        html: `<p style="color:red;">${req.body.message}</p>`, // plaintext body
        replyTo : req.body.email
    };
    transporter.sendMail(mailOptions,function(err,info){
        if(err){
             res.status(500).json({status:info.response});
        }else{
             res.status(200).json({status:info.response});
        }
    });

});
app.use('/',mailRouter);
app.listen(process.env.PORT,function(){
   console.log("Server started!"); 
});
@chadwalt
Varun Babu Pozhath
@varunbabu008
Nov 22 2016 09:55

$(document).ready(function() {
var long;
var lat;
var ftemp;
var ctemp;
var ktemp
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
long = position.coords.longitude;
lat = position.coords.latitude;

        var api = 'http://api.openweathermap.org/data/2.5/weather?lat=' + lat + ' &lon=' + long + '&appid=532d313d6a9ec4ea93eb89696983e369';
        //var api = "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=532d313d6a9ec4ea93eb89696983e369"
        $.getJSON(api, function(data) {
            var weathertype = data.weather[0].description;
            var ktemp = data.main.temp;
            var windspeed = data.wind.speed;
            var city = data.name;
            ftemp = (ktemp)* (9/5)-459.67;
            ctemp = ktemp - 273;

            console.log(city);
            ("#city").html(city);
        });
    });
}

});

Maryna Sokolova
@ultramarichka
Nov 22 2016 09:56
I've finished weather app))) dancing
http://codepen.io/ultramarichka/pen/qazMWX
Varun Babu Pozhath
@varunbabu008
Nov 22 2016 09:56
Does anyone know whats wrong with this code. I can't seem to figure out. When I do a console.log , nothing shows up

$(document).ready(function() {
var long;
var lat;
var ftemp;
var ctemp;
var ktemp
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
long = position.coords.longitude;
lat = position.coords.latitude;

        var api = 'http://api.openweathermap.org/data/2.5/weather?lat=' + lat + ' &lon=' + long + '&appid=532d313d6a9ec4ea93eb89696983e369';
        //var api = "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=532d313d6a9ec4ea93eb89696983e369"
        $.getJSON(api, function(data) {
            var weathertype = data.weather[0].description;
            var ktemp = data.main.temp;
            var windspeed = data.wind.speed;
            var city = data.name;
            ftemp = (ktemp)* (9/5)-459.67;
            ctemp = ktemp - 273;

            console.log(city);
            ("#city").html(city);
        });
    });
}

});

anyone tell me how to parse the html so the twitterButton works?
kirbyedy
@kirbyedy
Nov 22 2016 10:09
@JackVizl since your quote and author is not accessible inside that click function
JackVizl
@JackVizl
Nov 22 2016 10:09
why isnt it?
kirbyedy
@kirbyedy
Nov 22 2016 10:09
you might want to just grab the already populated quote and author from the html with jquery
because they are local variables in the getQuote function
do you know jquery ?
$("yourdivwithquote").text() should do the job
Peter Andersson
@repeterande
Nov 22 2016 10:30
I am struggling with getting my weather app operational, I have had it partly working with openweathermap api, but since that is http only I am trying to use darksky api instead, this is the call I am using: https://api.darksky.net/forecast/8ced508586f1057715eaf6fbf69351e3/59.282562000000006,15.2175884
it works ok if I type it in my browser but not from the code here..
I am using https for both the pen and api but still getting, "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access."
doh..jsonp is likely the answer (if they provide it)
Ryan Ledford
@rledford
Nov 22 2016 10:33
@repeterande you are running into a CORSissue. try ajax. set the callback in the request url to ? and give ajax a function to call on success.
Peter Andersson
@repeterande
Nov 22 2016 10:34
@rledford, you would have thought I should've learned this by now.. :)
ok thanks @rledford I will go ahead and try that
CamperBot
@camperbot
Nov 22 2016 10:34
repeterande sends brownie points to @rledford :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @rledford |http://www.freecodecamp.com/rledford
Ryan Ledford
@rledford
Nov 22 2016 10:36
@repeterande also as you mentioned, jsonp may be ypur answer.
Peter Andersson
@repeterande
Nov 22 2016 10:53
@rledford that did the trick, setting callback to ? formats the response into jsonp
Ryan Ledford
@rledford
Nov 22 2016 10:59
great @repeterande
JackVizl
@JackVizl
Nov 22 2016 11:37
anyone know a good weather API?
heroiczero
@heroiczero
Nov 22 2016 11:38
@JackVizl they provide one for the exercise do u mean a good example?
JackVizl
@JackVizl
Nov 22 2016 11:39
oh didnt realise haha
@heroiczero thanks man
CamperBot
@camperbot
Nov 22 2016 11:39
jackvizl sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:cookie: 413 | @heroiczero |http://www.freecodecamp.com/heroiczero
Luka
@serdarpnv
Nov 22 2016 11:49
hey guys im stuck on 119 on second project and i dont know what am i supposed to do like i dont know any of those codes
can someone help
if someone knows a website or something that can help me that would be useful too
kyadondo Timothy
@chadwalt
Nov 22 2016 11:52
what do you need in particular
Shawn Kemp
@official-shawnkemp
Nov 22 2016 12:00
hello can i ask somethin?
im done learning html, css, javascript
why doesnt this work at codepen but on the snapshot here?
Abhishek Kumar Roy
@thunderoy
Nov 22 2016 12:04
hello, i have build this personal portfolio webpage http://codepen.io/thunderoy/pen/KNVLmx?editors=1100 but the scrolling is not smooth i mean it lags while scrolling
JackVizl
@JackVizl
Nov 22 2016 12:09
@thunderoy nice
Abhishek Kumar Roy
@thunderoy
Nov 22 2016 12:10
thanks @JackVizl
CamperBot
@camperbot
Nov 22 2016 12:10
thunderoy sends brownie points to @jackvizl :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @jackvizl |http://www.freecodecamp.com/jackvizl
JackVizl
@JackVizl
Nov 22 2016 12:11
@thunderoy do u know javascript well?
@thunderoy bc you can use animate() to make a smooth scroll?
Abhishek Kumar Roy
@thunderoy
Nov 22 2016 12:15
no i don't know javascript but knows about that smooth scroll part but my problem is not that i mean to say that when the page is scrolled manually it lags, you can view the page in full view and then scroll you will understand what i am saying
@JackVizl ^^^
JackVizl
@JackVizl
Nov 22 2016 12:18
it might be photos
bc lag only happens between photos
Abhishek Kumar Roy
@thunderoy
Nov 22 2016 12:19
@JackVizl yes, so how to fix that
JackVizl
@JackVizl
Nov 22 2016 12:19
no clue dude, maybe get lower def photos? codePen isnt rlly meant to host high def photos i dont think
Abhishek Kumar Roy
@thunderoy
Nov 22 2016 12:20
ok will see
Webwang
@wym21212
Nov 22 2016 12:50
blob
in "build a Tribute Page " chapter
what i should do hasnt be showed
what should i do ???
somebody help me?
Brandon
@bd1887
Nov 22 2016 13:14

Quick question about the CSS property:

* {
  -webkit-user-select: none;
  -moz-user-select: moz-none;
  -ms-user-select: none;
  user-select: none;
}

This disables the blue highlight bar that appears when you drag over text. Unfortunately, it still allows users to invisibly highlight the text. This is a problem for me because highlighting, invisible or not, still scrolls the page around. Is there a quick way to truly disable highlighting or to disable highlight scrolling?

Jared de Guzman
@JDVariadic
Nov 22 2016 13:32
$(document).ready(function() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      var lat = position.coords.latitude;
      var long = position.coords.longitude;
    });
  }
  $("#testing").on("click", function() {

    $.getJSON("api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + long + "&APPID=31cfa849b1de1c1c968f1d4365a038e9", function(json) {
      $("#weather").html(JSON.stringify(json));

    });

  });

});
Hi guys! I'm trying to use the Openweather API for the Show the Local Weather challenge. I want to use geolocation to get weather data based on where you are but the code doesn't seem to work. Can someone point out what's wrong with this? Sorry if it's kinda a "noob" question.
ozusteapot
@ozusteapot
Nov 22 2016 13:36
Hi guys, can anyone give me a little help in regards to my navbar? I've been trying to have it not overlap with my first div, which happens whenever I resize the page window, but with no success currently.
Please excuse the untidiness of my code, I'm just getting back into coding.
@JDVariadic you are miss http:// at the front of $.getJSON("api.openweathermap...
mine started like http://api.openweathermap.org/data...
@JDVariadic you may have to use http://ip-api.com/json if your weather api http (instead of https)
Anshul Jain
@ajain706
Nov 22 2016 15:19
Can anyone help me regarding react projects
Peter Steele
@PeterHSteele
Nov 22 2016 15:44
I need help with my twitch app. Basically, I have two calls to the api and one needs to finish before the other starts, but I can't figure out how to make that happen: http://codepen.io/psteele1128/pen/VmPyeP?editors=1010
Gniewoszu
@Gniewoszu
Nov 22 2016 15:48
Hi. In build a random quote machine quotes should be from preset variables or some API ???
Peter Steele
@PeterHSteele
Nov 22 2016 15:53
@Gniewoszu the forismatic api works really well: http://forismatic.com/en/api/
Gniewoszu
@Gniewoszu
Nov 22 2016 16:02
@PeterHSteele thx
CamperBot
@camperbot
Nov 22 2016 16:02
gniewoszu sends brownie points to @peterhsteele :sparkles: :thumbsup: :sparkles:
:cookie: 220 | @peterhsteele |http://www.freecodecamp.com/peterhsteele
Levi
@MalangeLevi
Nov 22 2016 17:02
@Gniewoszu both
Mahak Narayan Singh
@makkBit
Nov 22 2016 17:05
@Gniewoszu its completely up to you. I would go with api as it saves time n effort.
Mahak Narayan Singh
@makkBit
Nov 22 2016 17:12
@PeterHSteele use callbacks.
Andrea De La Flor Muente
@adelaflor
Nov 22 2016 17:34
hi can anybody help me with a few things I can't figure out? I got this white space between my navbar and the boy and have no idea why? also my navbar does collapses when when I click the button it doesnt show anything heeeellppp??
Tom
@moT01
Nov 22 2016 17:40
@adelaflor use the inspector to find out where that space is coming from
Coy Sanders
@coymeetsworld
Nov 22 2016 17:49
what button @adelaflor? I clicked on contact and my work it looks fine to me
inspector is a nice tool too, not sure how other browsers use it but with chrome if you right click somewhere on your page and choose inspect element it will come up
Peter Steele
@PeterHSteele
Nov 22 2016 17:51
@makkBit thanks, based off the hint I'm trying to pass the second getJSON as a parameter into the first getJSON's callback function. But the browser doesn't recognize it as a function ("uncaught typeError, get status is not a function") even though i defined it as one and it's globally scoped: http://codepen.io/psteele1128/pen/VmPyeP?editors=1010
CamperBot
@camperbot
Nov 22 2016 17:51
peterhsteele sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @makkbit |http://www.freecodecamp.com/makkbit
Tom
@moT01
Nov 22 2016 17:51
@adelaflor i fixed the white space by adding a margin-top: -20px or so to #home
@adelaflor you didn't describe your navbar problem very well but i think you need to make it fixed positioned, so it stays put when you scroll?
Henry Cabello
@hacu9
Nov 22 2016 17:53
Anyone mind checking my pen? https://codepen.io/cabello986/pen/rrgdpV?editors=1010 I got an error in the playerturn() functio,it keeps pushing a bunch of elements into the playerplays array
also,isnt it cute?
Coy Sanders
@coymeetsworld
Nov 22 2016 17:53
@adelaflor also you should only use one container or container-fluid class, that might also cause some issues if you dont use the classes as Bootstrap intended
Gniewoszu
@Gniewoszu
Nov 22 2016 17:53
@adelaflor add .navbar{margin-bottom: 0;}
Henry Cabello
@hacu9
Nov 22 2016 17:54
Upon the 2nd click it does this
["#1"] 1
console_runner-5710c30….js:1 ["#1"] 1 "player"
console_runner-5710c30….js:1 ["#1", "#1"] 2 "player" <isnt supposed to happen
NITIN RAGHAV
@nitinraghav
Nov 22 2016 18:00
@JohnnyBizzel thanks johnny
CamperBot
@camperbot
Nov 22 2016 18:00
:cookie: 844 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
nitinraghav sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
Mahak Narayan Singh
@makkBit
Nov 22 2016 18:01
@adelaflor quick adding jquery n bootstrap.js will make collapse button work.
Tom
@moT01
Nov 22 2016 18:01
@hacu9 yes, its cute
im not seeing your problem
Henry Cabello
@hacu9
Nov 22 2016 18:04
@moT01 open devtools,click ON and try playing,itll push your click twice into the playerplay aray
Im trying to store the cpu moves and player moves into an array i can compare and see if it passes to next lvl,idk if thats the ideal way but thats what i came up with
Elton
@emwale
Nov 22 2016 18:12
Hi guys I am having some issues with the bootstrap carousel for the tribute page project
Youssef Walid
@Joetomorrow
Nov 22 2016 18:12
I finished my pen what do i do next or how to post it?
Tom
@moT01
Nov 22 2016 18:12
@hacu9 im looking, ...not sure if ill be able get anywhere for ya
Henry Cabello
@hacu9
Nov 22 2016 18:14
@Joetomorrow On the challenge page I've completed my this challenge and copy the link
@moT01 The problem is with the click functions inside a funcions i guess,its getting duplicated when clicked or something xD
Alexander Zachreson
@alectz
Nov 22 2016 18:14
does somebody have a second to look at the scope of my js for this Show the Local Weather challenge, I think i might be missing something.
Tom
@moT01
Nov 22 2016 18:16
@hacu9 it keeps running startgame every 2000ms i think might be where it is originating
1500*
Henry Cabello
@hacu9
Nov 22 2016 18:19
I moved the playerturn into the starGame's if and its not doing it anymore
Youssef Walid
@Joetomorrow
Nov 22 2016 18:25
@hacu9 which page and which link, I am sorry but can you show me a screenshot please!
Mahak Narayan Singh
@makkBit
Nov 22 2016 18:28
@PeterHSteele
`
Tyler Moeller
@TylerMoeller
Nov 22 2016 18:30
@alectz URLs need to have http:// in front of them :: http://api.openweathermap.org..........
Youssef Walid
@Joetomorrow
Nov 22 2016 18:30
I've completed my Build a tribute challenge http://codepen.io/JoeFuture/details/vyxmPP/
Mahak Narayan Singh
@makkBit
Nov 22 2016 18:30

@PeterHSteele try this...
`
$(document).ready(function(){

var streamers = ["ESL_SC2"];

//Second API call, used to find out if streamer is online and if so add the stream description
function getStatus(){
$.getJSON("https://wind-bow.hyperdev.space/twitch-api/streams/"+streamers[i]+"/?callback=?",function(json){
console.log("second"+json);
if (json.stream){
$("<p>"+json.stream.channel.status+"</p>").appendTo($("."+json.stream.channel.name))
}
});
}
//first API call, takes the above API call as a parameter into its callback function
for (var i=0;i<streamers.length;i++){
$.getJSON("https://wind-bow.hyperdev.space/twitch-api/channels/"+streamers[i]+"/?callback=?",function(json){
console.log("first"+json);
$(".stream.unfilled:eq(0)").html("<img src="+json.logo+"><a href="+json.url+">"+json.name+"</a>").removeClass("unfilled").addClass(json.name);
getStatus();
});
}

});
`

oops sry.
$(document).ready(function(){

    var streamers = ["ESL_SC2"];

 //Second API call, used to find out if streamer is online and if so add the stream description
    function getStatus(){ 
        $.getJSON("https://wind-bow.hyperdev.space/twitch-api/streams/"+streamers[i]+"/?callback=?",function(json){
        console.log("second"+json);
        if (json.stream){
            $("<p>"+json.stream.channel.status+"</p>").appendTo($("."+json.stream.channel.name))
        }
    });
}
//first API call, takes the above API call as a parameter into its callback function
    for (var i=0;i<streamers.length;i++){
        $.getJSON("https://wind-bow.hyperdev.space/twitch-api/channels/"+streamers[i]+"/?callback=?",function(json){
            console.log("first"+json);
            $(".stream.unfilled:eq(0)").html("<img src="+json.logo+"><a href="+json.url+">"+json.name+"</a>").removeClass("unfilled").addClass(json.name);    
            getStatus();
        });
    }    

});
@PeterHSteele
Alexander Zachreson
@alectz
Nov 22 2016 18:48
@TylerMoeller nice! that's getting me somewhere
Alexander Zachreson
@alectz
Nov 22 2016 18:54
@TylerMoeller it is sort of working now, but it's coming back undefined, not sure why, the api works when i put it into my browser
Ion Varsescu
@Nei-V
Nov 22 2016 18:58
hello, I have a problem with my api for wikipedia...it all works well except that I can't render the thumbnail...i believe I should somehow filter the results I get from the API to get only the first picture for example, but I don't know how to do that. http://codepen.io/Nei_V/pen/BQWVrg
(please ignore the colors :))
Drumandface
@Drumandface
Nov 22 2016 19:00
Im stuck with image/text alignment on my first html project. https://codepen.io/Drumandface/full/yVbYab/
I require the images and text at the bottom to be evenly distributed horizontally and centred
Alexander Zachreson
@alectz
Nov 22 2016 19:03
@TylerMoeller ahh, it was because there was a json array in there... got it
Peter Steele
@PeterHSteele
Nov 22 2016 19:03
@makkBit I think I got it working, you're the man!
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:04
@PeterHSteele :smile:
Felipe-Paris
@Felipe-Paris
Nov 22 2016 19:04
Hi! can anyone help me please ? , I dont know if I am calling the API right, the quote isn't showing ... nothing happens when I push the button http://codepen.io/Felipe-Codecamp/pen/bBgJxO?editors=1010
Brandon
@bd1887
Nov 22 2016 19:09
Anyone know anything about how to load audio in HTML and play it using JS?
I'm trying to get an audio file to play when the timer reaches 0
http://codepen.io/bd1887/pen/KNWaWv?editors=1111
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:14
@Felipe-Paris you are using response without even defining it. define it first.
Peter Steele
@PeterHSteele
Nov 22 2016 19:16
@Drumandface I think I fixed it by wrapping each ability in its own div and playing with the margin. Whaddya think? http://codepen.io/Drumandface/pen/yVbYab
Drumandface
@Drumandface
Nov 22 2016 19:17
Thanks for the help Peter, I just managed to figure it out too! I simply added a margin to the icon div and it worked!
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:19
@bd1887 i used this approach in my simonGame project. handling audio all with just js.
var sound1 = new Audio("http://www.chiptape.com/chiptape/sounds/short/wipeHi.wav");
sound1.play();
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 19:20
Hello all. I'm having an issue with the Weather App challenge with the openweather API. I'm not sure if I need to add the callback tag at the end of the url and if so, how to word it.
Brandon
@bd1887
Nov 22 2016 19:21
@makkBit Ok cool thanks. That works so it must be that I can't link to dropbox :-/ Even though it's a direct link
CamperBot
@camperbot
Nov 22 2016 19:21
bd1887 sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @makkbit |http://www.freecodecamp.com/makkbit
Michael Davis
@mhdavis
Nov 22 2016 19:22
Anyone know how to edit the css settings on a button after its been clicked?
.btn:active {
}
like that but active doesn't work in this instance
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:23
@bd1887 welcome. and no i think you link with dropbox, try experimenting or just google
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 19:24
@mhdavis I just did some quick web searching, and I think you might need to involve a bit of javascript to get that functionality
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:25
@mhdavis i think you are looking for 'visited pseudoclass'
Michael Davis
@mhdavis
Nov 22 2016 19:26
@makkBit so like
.btn: visited {}
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:27
.btn:visited {
    color: #FF0000;
}
@mhdavis
yes exactly
Michael Davis
@mhdavis
Nov 22 2016 19:27
thanks i'll try that out
@makkBit thanks
CamperBot
@camperbot
Nov 22 2016 19:27
mhdavis sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @makkbit |http://www.freecodecamp.com/makkbit
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:27
:)
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 19:29
For example, i used this first line for freegeoip and it contains a callback section, but I'm not sure if it was needed
''
```
Andrea De La Flor Muente
@adelaflor
Nov 22 2016 19:31
@coymeetsworld when the screen get smaller, the navbar collpases but the button doesnt expand
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:31
@BlackDracoSLC it would be better if could provide the code on codepen n comment ur problem
to understand ur problem
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:33
@adelaflor i have test ur problem on codepen, go to settings -> js -> quick add -> jquery & bootstrap.js
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 19:33
line 25 in the javascript section
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:33
it solved the problem
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 19:36

and not sure if this'll help but this is from the openweather API doc: To use JavaScript code you can transfer callback functionName to JSONP callback.
Examples of API calls:

api.openweathermap.org/data/2.5/weather?q=London,uk&callback=test

Mahak Narayan Singh
@makkBit
Nov 22 2016 19:36
@BlackDracoSLC if you are asking about whether to put '&callback=?' or not. Then no you dont have to use it.
Andrea De La Flor Muente
@adelaflor
Nov 22 2016 19:36
@makkBit great thank you!!
CamperBot
@camperbot
Nov 22 2016 19:36
adelaflor sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @makkbit |http://www.freecodecamp.com/makkbit
Mahak Narayan Singh
@makkBit
Nov 22 2016 19:36
:)
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 19:40
@makkBit that was my main question, Mahak. Thanks! I guess I'm not understanding why the function isn't working in the code, while I can still get the info if just go to the URL in a broswer
CamperBot
@camperbot
Nov 22 2016 19:40
blackdracoslc sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:cookie: 346 | @makkbit |http://www.freecodecamp.com/makkbit
Islam Ibakaev
@dagman
Nov 22 2016 19:45
you guys i have a brand new solution for Smallest Common Multiple algorithm. Do you wanna see it???
Jahron Bowman
@JBavantgarde
Nov 22 2016 19:58
I know I may sound like a total noob. Went through the coding lessons fine, I was breezing along. I managed to get through the tribute page, could probably still use some tweaking. This portfolio page is frustrating! I want to push through, any suggestions?
Drumandface
@Drumandface
Nov 22 2016 20:01
@JBavantgarde Im at that stage now too Jahron. Is it harder than the tribute page?
Brandon
@bd1887
Nov 22 2016 20:01
@JBavantgarde I dunno what you're stuck on, but I found this resource pretty useful:
http://www.w3schools.com/bootstrap/bootstrap_scrollspy.asp
Jahron Bowman
@JBavantgarde
Nov 22 2016 20:02
At least I'm not alone lol @Drumandface
Thanks @ I'm gonna check that resource out.
It just seems kind of overwhelming. @bd1887
Drumandface
@Drumandface
Nov 22 2016 20:04
Im going to hand draw a basic design so I know what im aiming for, rather than wading in to the unknown.
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 20:04
Here's another Bootstrap resource that helped me out a bit https://medium.com/wdstack/how-the-bootstrap-grid-really-works-471d7a089cfc#.m8j1sckep
Ilian Iliev
@zaken
Nov 22 2016 20:06
yo, anyone done the Weather app ?
Jahron Bowman
@JBavantgarde
Nov 22 2016 20:07
Ok thanks @BlackDracoSLC
CamperBot
@camperbot
Nov 22 2016 20:07
jbavantgarde sends brownie points to @blackdracoslc :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @blackdracoslc |http://www.freecodecamp.com/blackdracoslc
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 20:09
@dzift i'm working on it now, but I'm stuck on the Openweather API. I'm thinking of trying to find another weather API
Ilian Iliev
@zaken
Nov 22 2016 20:13
yeah the api stuff is really tricky
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 20:18
I think there should be a few more JSON/API lessons before doing the projects. If I ever make it though far enough, maybe I'll make that a project for me.
Jeremy Barbe
@eemebarbe
Nov 22 2016 20:18
anyone using redux?
wrong room oops
Jahron Bowman
@JBavantgarde
Nov 22 2016 20:19
That's a good idea, it seems if you have a planned layout it will be easier to finish. @Drumandface
Brandon
@bd1887
Nov 22 2016 20:19
@BlackDracoSLC I think I had some trouble with the weather api that freecodecamp suggested. I used another one
@BlackDracoSLC Actually, when you get to the Twitch viewer challenge, don't bother with the API that they suggest for that one either.
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 20:21
what would you suggest?
Brandon
@bd1887
Nov 22 2016 20:22
@BlackDracoSLC Here's the weather api I used. https://www.apixu.com/
There's a free option if you sign up
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 20:23
@bd1887 thanks, i'll check that out!
CamperBot
@camperbot
Nov 22 2016 20:23
blackdracoslc sends brownie points to @bd1887 :sparkles: :thumbsup: :sparkles:
:cookie: 308 | @bd1887 |http://www.freecodecamp.com/bd1887
Brandon
@bd1887
Nov 22 2016 20:23
@BlackDracoSLC Good luck.
João Mhurilo Godoi da Silva
@ebak123
Nov 22 2016 20:37
guys, yesterday i've completed this prject, and was working, but today its not working anymore, whats happened? someone can help me? Link:
https://codepen.io/ebrak123/pen/RopeeE?editors=1010
Andrew Haupt
@BlackDracoSLC
Nov 22 2016 20:41
@bd1887 that API worked first time, no issues.
JD Tadlock
@jdtdesigns
Nov 22 2016 20:43
@ebak123 You can't load codepen over https and then link or request something with http. That's called mixed content and will throw an error. Always look at your browser console while deving to see errors. Take the https off of https://codepen.... and you're fine. ;)
Brandon
@bd1887
Nov 22 2016 20:45
@BlackDracoSLC Nice!
João Mhurilo Godoi da Silva
@ebak123
Nov 22 2016 20:47
thank you @jdtdesigns
CamperBot
@camperbot
Nov 22 2016 20:47
ebak123 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 783 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Brandon
@bd1887
Nov 22 2016 20:47
@jdtdesigns Yea, thanks. I learned something today too.
CamperBot
@camperbot
Nov 22 2016 20:47
bd1887 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 784 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
zapcode
@zapcode
Nov 22 2016 20:55
coffescript is good or is better go to ES6 and/or Typecript?
coffescript is good or is better go to ES6 and/or Typecript?
Brandon
@bd1887
Nov 22 2016 20:58
Anyone know why javascript's .play() won't play this file?
dl.dropboxusercontent.com/s/517e33diqdnm4ww/timer_or_desk_bell.mp3
I'm getting the code to work with another audio file, so it's something wrong with Dropbox? But I've been told it's possible to do this with Dropbox
TheGr8Lemmoncawl
@TheGr8Lemmoncawl
Nov 22 2016 20:59
Does anyone here have experience with PHP?
Ken Haduch
@khaduch
Nov 22 2016 21:01
@TheGr8Lemmoncawl - I've had some experience with PHP.... what's up?
JD Tadlock
@jdtdesigns
Nov 22 2016 21:01
@bd1887 Dropbox doesn't work that way. You'll need a direct file host to play the audio from a site
@TheGr8Lemmoncawl What's the question?
TheGr8Lemmoncawl
@TheGr8Lemmoncawl
Nov 22 2016 21:02
@khaduch I'm working on a business directory that allows users to add videos, photos, descriptions, etc. Using PHP I have created a form to create a new listing or modify an existing one. Currently it is an entirely separate webpage. How would I set up the page so the listing could be editing directly from the listing page? For example, change the business name by double clicking on it.
Is this something that would be done with PHP?
Brandon
@bd1887
Nov 22 2016 21:02
@jdtdesigns Can you recommend one?
JD Tadlock
@jdtdesigns
Nov 22 2016 21:02
@TheGr8Lemmoncawl Look up ajax/php
Shawn Grooms
@SEGrooms
Nov 22 2016 21:03
Anyone willing to lend some CSS help?
TheGr8Lemmoncawl
@TheGr8Lemmoncawl
Nov 22 2016 21:03
@jdtdesigns Are the courses on FCC sufficient or can you recommend some place I could read up more on it?
Shawn Grooms
@SEGrooms
Nov 22 2016 21:04
I’m trying to click a single div, but I’m having overlap issues.
JD Tadlock
@jdtdesigns
Nov 22 2016 21:04
@TheGr8Lemmoncawl FCC doesn't teach you anything. It just challenges you. It's also focused on js fullstack. Search on youtube. There's plenty of videos on php and ajax.
@SEGrooms You'll need to post a link to your code.
TheGr8Lemmoncawl
@TheGr8Lemmoncawl
Nov 22 2016 21:05
@jdtdesigns Thanks!
CamperBot
@camperbot
Nov 22 2016 21:05
thegr8lemmoncawl sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 785 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
I added console.log for the colored buttons
I’m trying to figure out how to remove the overlap from those divs :/
JD Tadlock
@jdtdesigns
Nov 22 2016 21:07
@SEGrooms You mean the overflow on the outside of the game board?
Shawn Grooms
@SEGrooms
Nov 22 2016 21:08
@jdtdesigns what I meant is when I click the red button it is triggering all colors. However, I think that is part of the same issue
@jdtdesigns should I have avoided layering the quadrants?
@jdtdesigns overflow: hidden, maybe?
JD Tadlock
@jdtdesigns
Nov 22 2016 21:13
@SEGrooms The way you laid out your html is the reason it's messing up. It should be a wrapper with 2 containers inside. One for the buttons and one for the control circle.
Shawn Grooms
@SEGrooms
Nov 22 2016 21:14
@jdtdesigns darn :/ Wouldn’t that still give me the same problem though?
JD Tadlock
@jdtdesigns
Nov 22 2016 21:14
@SEGrooms No
@SEGrooms Here's an example https://jsfiddle.net/jdtadlock/dsn0728L/19/
i didn't contain the buttons
I just set the control board in it's own container
Shawn Grooms
@SEGrooms
Nov 22 2016 21:17
@jdtdesigns so it’s because I have them as divs vs buttons?
I’m just trying to understand :/
JD Tadlock
@jdtdesigns
Nov 22 2016 21:18
No, it's nesting each button inside the other and then nesting the control circle inside the most inner button.
Shawn Grooms
@SEGrooms
Nov 22 2016 21:19
@jdtdesigns oh!
JD Tadlock
@jdtdesigns
Nov 22 2016 21:19
They should all be separate. And the controls should be separate from the buttons.
Shawn Grooms
@SEGrooms
Nov 22 2016 21:19
@jdtdesigns thank you! I understand now :smile: :clap:
CamperBot
@camperbot
Nov 22 2016 21:19
segrooms sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 786 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Shawn Grooms
@SEGrooms
Nov 22 2016 21:19
I feel pretty silly now. That makes sense!
Greg D
@mosaic-greg
Nov 22 2016 21:20
gnhhh, finally figured out how to play the tone sequence, for the simon game :)
an event listener listens for the end of the audio, then plays the next one via a loop. When it reaches the end of the array the event listener is removed (this prevents the array playing again)

noJquery #noCheating

JD Tadlock
@jdtdesigns
Nov 22 2016 21:23
@mosaic-greg jQuery isn't cheating lol
just a way of doing the same things with less code
it's also not a do all for js
Greg D
@mosaic-greg
Nov 22 2016 21:27
yeah i like jquery. I meant no cheating as not looking at the completed example's code
Shawn Grooms
@SEGrooms
Nov 22 2016 21:41
@jdtdesigns I think I was going crossed eyed from being at my computer all day. Here’s the new asthetics! http://codepen.io/shawngrooms/pen/zowNrp?editors=0100 Thanks again :) Don’t worry @mosaic-greg I have no interest in checking out the JS. I just wanted to figure out my hold up for the CSS…which ended up being HTML!
CamperBot
@camperbot
Nov 22 2016 21:41
segrooms sends brownie points to @jdtdesigns and @mosaic-greg :sparkles: :thumbsup: :sparkles:
:warning: segrooms already gave jdtdesigns points
:cookie: 392 | @mosaic-greg |http://www.freecodecamp.com/mosaic-greg
Simon Cordova
@gbsimon87
Nov 22 2016 21:57
hey @jdtdesigns thanks a lot for the help last night
CamperBot
@camperbot
Nov 22 2016 21:57
gbsimon87 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 787 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Nov 22 2016 21:58
@gbsimon87 Welcome ;)
Simon Cordova
@gbsimon87
Nov 22 2016 21:59
I actually had an interview today for an optimization company that mainly uses jquery, I think it went really well
Greg D
@mosaic-greg
Nov 22 2016 22:19
@gbsimon87 congrats!
Cole Maly
@malycole
Nov 22 2016 22:28
could someone link me to how margin/directions work inCSS? I'm just not sure why margin-left: 50%; leads to a box that is 80% to one side
Tyler Moeller
@TylerMoeller
Nov 22 2016 22:34
@malycole I'm guessing you have a large div you want in the center. The margin-left: 50%, will push the left side of that div to the center of the screen, it won't make the center of the div 50% from the left.
So, if your div takes up 30% of the width of the screen, and you set margin-left: 50%, the left side will be in the middle and the right side will be 80% out from the left.
Check out the CSS Box Model for more details: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model
Azzeddine Tamlakoutan
@sdfddf
Nov 22 2016 22:57
Hi guys! I'm asked to code my portfolio but the sample I was provided with looks professional than my level
any one here
Daria Doronina
@Skidle
Nov 22 2016 23:03
@sdfddf It's ok you just learn as you go, if you don't know how to do something just google the solution for it or ask here
Azzeddine Tamlakoutan
@sdfddf
Nov 22 2016 23:04
ok thanks
where should I write bootstrap codes in the html or css
@Skidle thank you
CamperBot
@camperbot
Nov 22 2016 23:04
sdfddf sends brownie points to @skidle :sparkles: :thumbsup: :sparkles:
:cookie: 252 | @skidle |http://www.freecodecamp.com/skidle
Daria Doronina
@Skidle
Nov 22 2016 23:07
@sdfddf in html, you add bootstrap classes to various divs
Azzeddine Tamlakoutan
@sdfddf
Nov 22 2016 23:18
thanks
@Skidle
Ronald Roosiorg
@zinzurr
Nov 22 2016 23:20
Hey guys, im bedazzled a bit at the tribute page challenge
how come my titles and pic are not in center? :worried:

<p data-height="265" data-theme-id="0" data-slug-hash="vymxwJ" data-default-tab="html,result" data-user="ronaldroosiorg" data-embed-version="2" data-pen-title="vymxwJ" class="codepen">See the Pen <a href="http://codepen.io/ronaldroosiorg/pen/vymxwJ/">vymxwJ</a> by Ronald Roosiorg (<a href="http://codepen.io/ronaldroosiorg">@ronaldroosiorg</a>) on <a href="http://codepen.io">CodePen</a>.</p>

<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>

oops
Daria Doronina
@Skidle
Nov 22 2016 23:25
@zinzurr you need to add Bootstrap as external CSS in the settings
chunnali
@chunnali
Nov 22 2016 23:50
@zinzurr use bootstrap class=‘text-center’ or add it in css: p {text-align: center;}
Ronald Roosiorg
@zinzurr
Nov 22 2016 23:52
thank you!!! @Skidle @chunnali
CamperBot
@camperbot
Nov 22 2016 23:52
zinzurr sends brownie points to @skidle and @chunnali :sparkles: :thumbsup: :sparkles:
:cookie: 261 | @chunnali |http://www.freecodecamp.com/chunnali
:cookie: 257 | @skidle |http://www.freecodecamp.com/skidle