These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Aug 2016
Stein-T Dale
@Lofthur
Aug 22 2016 00:09
Hi. I have a question for the TwitchTv project. Do you have to make a nested ajax call to get all the information you need for your list items?
Stein-T Dale
@Lofthur
Aug 22 2016 00:16
Found out that's what i had to do :)
YUE HE
@Hmay61
Aug 22 2016 00:54
E. Vazquez
@joufflu
Aug 22 2016 01:07
@sjames1958gm thank you!
CamperBot
@camperbot
Aug 22 2016 01:07
joufflu sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2783 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Greg Duncan
@GregatGit
Aug 22 2016 01:20
@Hmay61 Good stuff - you have a typo - you have "Eamil"
tfmlol
@tfmlol
Aug 22 2016 01:37
Hello friends! Can you guys tell me where the react or angular section is?
nice portfolio @Hmay61
Brian Danowski
@mailtruck
Aug 22 2016 02:03
@Hmay61 hey looks good, one thing i noticed is the buttons dont work unless you click directly on the text in the button. if you take out the button tags and give your <a> tags the button classes "btn btn-warning" etc the a tag will be styled like a button and the whole button works when you click it, not just the text in the button
Jose Escobar Mejia
@mejiaadonay
Aug 22 2016 02:15
This message was deleted
Ken Haduch
@khaduch
Aug 22 2016 03:22
@tfmlol - I don't think that there are any lessons for React at this point, only the projects, I think that folks have been going out and finding resources on their own?
@ZacchMckinney - at least one typo in your classes <div class="col-s-10"> It should be <div class="col-sm-10"> - that seemed to be the only text that was not following the page resize, and that change seems to fix it.
Susan
@SusanGrattan
Aug 22 2016 03:43
On the twitch api can I pull the data for multiple users at once? Right now I have a for loop to loop through them but that doesn't work well with appending the data. =\
Zacch McKinney
@ZacchMckinney
Aug 22 2016 04:42
@khaduch Thank you for checking it out. I appreciate the help. It was driving me nuts. Changing and trying different fixes. Thanks again.
CamperBot
@camperbot
Aug 22 2016 04:42
zacchmckinney sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1568 | @khaduch |http://www.freecodecamp.com/khaduch
kennyq94
@kennyq94
Aug 22 2016 05:17
hi guys i really need help I can't get the temperature from the data, what is wrong with my code? I tried so many things x.x
http://codepen.io/kennyqsoftware/pen/yJXwyb?editors=1010
Sorin Ruse
@sorinr
Aug 22 2016 05:23
@kennyq94 run your pen over https and prepend your weather = with https://crossorigin.me/http.openweather......
kennyq94
@kennyq94
Aug 22 2016 05:25
@sorinr yay
@sorinr i got the temp but its like 289 degree lol
@sorinr thankssss
DJ
@qualitymanifest
Aug 22 2016 05:26
yep it's in kelvin
you can specify in the API call that you want f or c. or you can just do some conversion math
kennyq94
@kennyq94
Aug 22 2016 05:26
@sorinr thanks
CamperBot
@camperbot
Aug 22 2016 05:26
kennyq94 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 678 | @sorinr |http://www.freecodecamp.com/sorinr
kennyq94
@kennyq94
Aug 22 2016 05:26
@qualitymanifest do i switch the units to something else its in metric right now
DJ
@qualitymanifest
Aug 22 2016 05:27
hmm
kennyq94
@kennyq94
Aug 22 2016 05:27
in the api call of course
lol
DJ
@qualitymanifest
Aug 22 2016 05:27
@kennyq94 in your API call you have unit, it should be units
NixonRichard
@NixonRichard
Aug 22 2016 05:28
hi thể
hi there
DJ
@qualitymanifest
Aug 22 2016 05:28
that will get you metric correctly. since it doesn't register unit it is ignoring it and giving you kelvin
hey guyz
my wiki viewer s search engine display result as json objects
any one know how to make it done ?
kennyq94
@kennyq94
Aug 22 2016 05:29
@qualitymanifest I SEEEE thank you soooo much
CamperBot
@camperbot
Aug 22 2016 05:29
kennyq94 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1368 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Aug 22 2016 05:31
@NixonRichard that's because $("#results").html( JSON.stringify(json)); is working and then you get an error because you're trying to run a foreach on an object
you know where the data you want is. json.query.search. just run a foreach on that and ditch whatever you're trying to do with the keys foreach
kennyq94
@kennyq94
Aug 22 2016 05:33
I just want to take a moment to say I love everyone in this gitter community you guys are basically my peer programmers, I feel no pressure to know everything when I am working with this community, you guys are the best. !!!
DJ
@qualitymanifest
Aug 22 2016 05:34
@SusanGrattan there isn't. i think the key for appending the data is, inside your json calls (which are inside your loop), build up everything you want for each user, and then append that at the end of each json call
@kennyq94 :+1:
NixonRichard
@NixonRichard
Aug 22 2016 05:34
Object.keys.forEach(json.query.search[0].snippet);
@qualitymanifest is this right ?
DJ
@qualitymanifest
Aug 22 2016 05:36
no
json.query.search.forEach(function etc... that's where the data you want is
before you start trying to display things just try console.logging so you can see what is where
Hadouken
@Harry97
Aug 22 2016 05:38
Why is everything out of place when I resize the window?
http://codepen.io/Hadouken/pen/YWbPVY?editors=1100
DJ
@qualitymanifest
Aug 22 2016 05:39
gotta get back to work on my own stuff, hopefully someone else will pipe up on these
Sorin Ruse
@sorinr
Aug 22 2016 05:40
@NixonRichard here is an idea: wiki how can be done. ofc you should manage the titles
NixonRichard
@NixonRichard
Aug 22 2016 05:41
How to manage the titles ?
im not sure what u guyz mean
the api s very new to me
Sorin Ruse
@sorinr
Aug 22 2016 05:57
@NixonRichard just reload my pen above and take a look
NixonRichard
@NixonRichard
Aug 22 2016 05:58
wow diddnt notice that s ur pen s link
lol
Sorin Ruse
@sorinr
Aug 22 2016 06:00
@NixonRichard actually its ur pen i have modified
NixonRichard
@NixonRichard
Aug 22 2016 06:00
oh
right
why do u have to use <strong> ?
is it mean anything special ?
ah that s mine
nevermind
lol
Pranay Kumar
@pranaykumar389
Aug 22 2016 06:04
Hi Everybody!
I'm Pranay Kumar. I done with My 2nd Project build a personal portfolio please have a look over here https://rudrapranaykumar.github.io/MyPortfolio/
Please comment good and bad and mostly suggest me for more improvement.
Thank you
Hadouken
@Harry97
Aug 22 2016 06:07
@rudrapranaykumar lol why don't you just show us your codepen directly?
Chris Cullen
@123xylem
Aug 22 2016 06:10
http://codepen.io/123xylem/pen/JKqYZY?editors=1010
Hi could you help with my .click function.. WHy its not showing text in the div on click?
Hadouken
@Harry97
Aug 22 2016 06:11
@123xylem aren't u mssing a "}" ?
you didn't end your if statement, I suppose
there's only one "}", and it belongs to the click function
Chris Cullen
@123xylem
Aug 22 2016 06:12
Sorry its also I was using a different selector to outputter

@Harry97

var userX=1;
$("#box").click(function ()
               {
  if (userX>0){
    $("#box")..THIS BOX.text("X");????????????????????????????

  }
});

Is ther a way of me saying the above with box to apply to all boxes?

Hadouken
@Harry97
Aug 22 2016 06:14
Well, I've not taken a deep look at your code, but if you want to apply something to couple of elements; why don't you assign a class to them and then call it?
so instead of "#box" maybe ".box"?
Sorin Ruse
@sorinr
Aug 22 2016 06:19
@Harry97 try: $(".box").on('click', function () {here your logic});
Hadouken
@Harry97
Aug 22 2016 06:21
@sorinr @123xylem
Chris Cullen
@123xylem
Aug 22 2016 06:22
@Harry97 @sorinr nice one
NixonRichard
@NixonRichard
Aug 22 2016 06:28
@sorinr
why did u comment
// keys.forEach(function(key) {
// html += "<strong>" + key + "</strong>: " + val[key] + "<br>";
// });
these ?
Chris Cullen
@123xylem
Aug 22 2016 06:28
@sorinr When I click them my X moves the box and I dont know how to style the X
Sorin Ruse
@sorinr
Aug 22 2016 06:30
@123xylem i know. you should look at your css to fix that behaviour
Chris Cullen
@123xylem
Aug 22 2016 06:31
@sorinr ive managed to style it but not sure why text is moving them
Sorin Ruse
@sorinr
Aug 22 2016 06:32
@NixonRichard there is no need to loop twice as you can grab the info from the first loop
NixonRichard
@NixonRichard
Aug 22 2016 06:32
hey what does the $ character mean
Sorin Ruse
@sorinr
Aug 22 2016 06:33
its the abbreviation of jquery
instead of writing jquery.getJSON for ex you just write $.getJSON
it supposed that you have already loaded jquery lib
NixonRichard
@NixonRichard
Aug 22 2016 06:35
okay
Phanindra M
@PhaniMaddi
Aug 22 2016 06:35


$(document).ready(function(){

  function getMyLocation() {
    if(navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(getLocation);
    } else {
      alert("Oops, no support");
    }
  }

function getLocation(position) {
  var lt = position.coords.latitude;
  var lg = position.coords.longitude;
  getData(lt, lg);
}
  function getData(lati, longi) {
    var durl = "https://api.forecast.io/forecast/";
    var apiKey = "2e591f122507ef51a781deaff8643744";
    var weatherURL = durl + apiKey + "/" + lati + "," + longi + + "?callback=?";

  $.getJSON(weatherURL, function (data) {
    var conditions = data.currently.summary;
    var tempF = data.currently.temperature;
    var tempC = Math.floor((tempF - 32) * 5/9);
    var icon = data.currently.icon;
    var skycons = new Skycons({"color": "#f3e5f5"}); //this line generates the set of Skycons, and also changes the default color to a hint of purple
    skycons.set("icon1", icon); //this first points to the <canvas> element with ID "icon1," and the sets the var icon above to it
    skycons.play(); //and the animation starts!
    $("#currentWeather").append(conditions);
    $("#currentTemperature").text(Math.floor(tempF));

   });
  }
});
not getting data back from forecast.io
whats wrong with this code?
Hadouken
@Harry97
Aug 22 2016 06:37
navigator.geolocation isn't working anymore
Chris Cullen
@123xylem
Aug 22 2016 06:38
@Harry97 http://codepen.io/123xylem/pen/JKqYZY?editors=1010 can you give me ahint why my boxes jump onclick input?
Phanindra M
@PhaniMaddi
Aug 22 2016 06:38
what is the alternative?
Hadouken
@Harry97
Aug 22 2016 06:38
using the users ip
hold I'mma give a sample

@phanther8 ```$.getJSON("https://jsonip.com/?callback=?", function(user){
var ip = user.ip;
console.log(ip);

  var ipGeo = "https://freegeoip.net/json/" + ip;

$.getJSON(ipGeo,function(location){

var long = location.longitude;
var lat = location.latitude;

```

NixonRichard
@NixonRichard
Aug 22 2016 06:40
@sorinr and what is <br> ?
Hadouken
@Harry97
Aug 22 2016 06:40
and then you'd proceed calling the weather api like you were doing
Phanindra M
@PhaniMaddi
Aug 22 2016 06:40
Thanks @Harry97
CamperBot
@camperbot
Aug 22 2016 06:40
phanther8 sends brownie points to @harry97 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for harry97
Hadouken
@Harry97
Aug 22 2016 06:40
@123xylem I'm not an expert, but I'mma take a look
Sorin Ruse
@sorinr
Aug 22 2016 06:41
@NixonRichard you put them there. it adds a line feed
Sorin Ruse
@sorinr
Aug 22 2016 06:43
@Harry97 add overflow: hidden; to your .box class
Hadouken
@Harry97
Aug 22 2016 06:44
@123xylem sorin, is right using overflow:hidden would fix the issue
@sorinr with all due respect, using overflow is a nice cover up, though, but it's really fixing the root of the problem
I'm thinking that this is caused by the type of element he is using to insert is text, am I right?
Chris Cullen
@123xylem
Aug 22 2016 06:45
Im listening to both
I have little idea why this is happening
@qualitymanifest @sorinr @Harry97
Hadouken
@Harry97
Aug 22 2016 06:46
@123xylem ?
NixonRichard
@NixonRichard
Aug 22 2016 06:49
ok
Chris Cullen
@123xylem
Aug 22 2016 06:51
@Harry97 sorry was just saying im reading you guys conversation as I am learning from all of u
Sorin Ruse
@sorinr
Aug 22 2016 06:51
@Harry97 the board has a fixed width and height and the .box the same and there is the problem
thats why overflow fix it
Chris Cullen
@123xylem
Aug 22 2016 06:51
@sorinr ok it was just him saying it onlu fixes the root of the problem that i was waiting for
Hadouken
@Harry97
Aug 22 2016 06:52
huh! turns out there are multiple solutions to this
adding vertical-align: top; to box class seems to fix the problem too
@123xylem There's a nice explanation in the link, if you are interested
Chris Cullen
@123xylem
Aug 22 2016 06:58
@Harry97 yea reading now thanks! :)
CamperBot
@camperbot
Aug 22 2016 06:58
123xylem sends brownie points to @harry97 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for harry97
TopKlar
@topklar
Aug 22 2016 07:11
anyone has an idea of how to crack the "Escape Sequences in Strings" way point in FreeCodeCamp
Tilak Raj
@trdhiman
Aug 22 2016 07:12
hi ,
how i can generate random colors for text on every click ???
Alexander Domikov
@AlexanderDom
Aug 22 2016 07:18
@trdhiman with Math.random() javascript function
exemple for hsl color 'hsl(' + Math.floor(Math.random() *360)+',60%, 50%)'
Sorin Ruse
@sorinr
Aug 22 2016 07:36
@Harry97 instead of x or 0 just make it "hello" to see result using v-align: top
Chris Cullen
@123xylem
Aug 22 2016 07:39
http://codepen.io/123xylem/pen/JKqYZY
how can i make my switch use my Divs ID Value?
Michiel
@MichielHuijse
Aug 22 2016 07:40
Does anyone know what is the most convenient way to host and maintain a portfolio website? This must be with at least hassle as possible, a personal clean url and preferable cheap or low cost. What is commonly used here?
Alexander Domikov
@AlexanderDom
Aug 22 2016 07:40
@MichielHuijse llook at github pages
TopKlar
@topklar
Aug 22 2016 07:41
"Escape Sequences in Strings" cracked it myself.
var myStr = "FirstLine\n\SecondLine\\rThirdLine";
Alexander Domikov
@AlexanderDom
Aug 22 2016 07:41
@topklar :clap:
Michiel
@MichielHuijse
Aug 22 2016 07:46
@AlexanderDom thanks this is a convenient tip!
CamperBot
@camperbot
Aug 22 2016 07:46
michielhuijse sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 349 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Sorin Ruse
@sorinr
Aug 22 2016 07:46
@123xylem var id = $(this).attr('id'); to get the id of the clicked element. after u do whatever you want
Alexander Domikov
@AlexanderDom
Aug 22 2016 07:47
you're welcome @MichielHuijse
Norvin Burrus
@ndburrus
Aug 22 2016 08:30
This message was deleted
Dany Din
@danydin
Aug 22 2016 09:07
@sjames1958gm @sorinr what is the purpse of JSON.parse(request.response) what it does acutally?
Manar Kurmanov
@manar-mk
Aug 22 2016 09:19

Hi all, can anybody tell me what am I doing wrong?
I'm trying to write test for this

class Test {
  public $inject = ['$cookies']
  constructor(public $cookies){

  }
  getData() {
    return 1 + 2;
  }
}

export default Test;

My test.spec

/// <reference path="../../typings/index.d.ts" />

import * as angular from 'angular';
import 'angular-mocks';
import Test from './test';

describe('Test service', () => {
  beforeEach(() => {
    angular
      .module('Test', [])
      .service('Test', Test);
    angular.mock.module('Test');
  });

  it('should', angular.mock.inject((Test: Test) => {
    expect(Test.getData()).toEqual(3);
  }));
});

it says error starts with

PhantomJS 2.1.1 (Windows 8 0.0.0) Test service should FAILED
        inject
        getService
        getService
        injectionArgs
        instantiate
        invoke
        enforcedReturnValue
        invoke
        getService
        injectionArgs
        invoke
        workFn
        eval code
        eval@[native code]
...
Bryan Park
@BryanP37
Aug 22 2016 09:19
Any of you know how to run backstretch.js on a fullPage.js based website?
NixonRichard
@NixonRichard
Aug 22 2016 09:37
hello
James
@1KuX
Aug 22 2016 09:45
Nice tribute Jhon
Stephen James
@sjames1958gm
Aug 22 2016 10:03
@danydin request.reponse is a string and JSON.parse converts that string to an actual javascript object
Dany Din
@danydin
Aug 22 2016 10:03
@sjames1958gm ah ok cool thanks
CamperBot
@camperbot
Aug 22 2016 10:03
danydin sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2785 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 22 2016 10:08
@danydin :)
Jack Lyons
@JackEdwardLyons
Aug 22 2016 10:18
hey guys, im working on my calculator, and have a weird bug where the first calculation is always positive (even when you subtract numbers) the calculation after that allows subraction... but im wondering why this is happening?
jaiswalpragati
@jaiswalpragati
Aug 22 2016 10:41
I have saved my program and given title first project,,,but i am not able to find it in git hub.
Rada
@Radascript
Aug 22 2016 10:50

hey guys, so I'm not sure why I'm getting the error where my carousel can't find images (you can see if you pull up the console). It works fine locally, and when I follow the path in my github they are all there.

https://radascript.github.io/portfolio/index.html

Stephen James
@sjames1958gm
Aug 22 2016 11:03
@Radascript https://radascript.github.io/ - this gives me 404 in browser address bar
Rada
@Radascript
Aug 22 2016 11:04
@sjames1958gm and anyone else who may be helping - my issue got solved, thanks!
CamperBot
@camperbot
Aug 22 2016 11:04
radascript sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2788 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 22 2016 11:04
@Radascript :+1:
RagnarMjol
@RagnarMjol
Aug 22 2016 11:48
hey guys, I'm loking for a bit of help. I'm having an issue where there is unwanted white space between my divs (about me & portfolio) and I was wondering - how do I get rid of them? http://codepen.io/RangarMjol/pen/RROmmP
do I modify my margins?
RagnarMjol
@RagnarMjol
Aug 22 2016 11:54
nevermind, found it. I added float:left;
clear:none; to all my divs
don't know if that was a good idea or not, but it worked
Dave Sayer
@luxumbra
Aug 22 2016 11:57
hi all, can I get help here for non FCC related issues - it’s a jQuery issie
*issue
what do you thinkof it
i didn't finish it yet*
RagnarMjol
@RagnarMjol
Aug 22 2016 12:04
verify your e-mail so that we can get a full page view
Dave Sayer
@luxumbra
Aug 22 2016 12:07
Hi, I’ve got a menu with multiple menu items and then each parent has between 2 and 14 child menu items in drop downs. I’m using jQuery to add tints to the background colours to make a gradient going down the list of parent items. We want the same for the child items but I cant seem to get it to apply the tint only to the child items of specific parents, so the gradient just runs down all child items instead of starting and ending within the children of one parent.
Fahrettin Can Mekikoğlu
@fcanmekikoglu
Aug 22 2016 12:21
hey guys
Chris Cullen
@123xylem
Aug 22 2016 12:25
$(document).ready(function(){
 var user= prompt("Choose X or O","Make sure its Caps!");

if (user=="X") {
   userX=1 ;
 var id = $(".box").attr('id'); 
  switch($(id)) {   //THIS PART I NEED TO SELECT THE ID!!
    case a:
answer.push("A");       break;
    case b:
answer.push("B");         break;
   case c:
answer.push("C");       break;   
   case d:
answer.push("D");       break;   
   case e:
answer.push("E");       break;    
   case f:
answer.push("F");       break;  
   case g:
answer.push("G");       break;    
   case h:
answer.push("H");       break;    
   case i:
answer.push("I");       break;
      console.log(answer);

}
}
  else(userO=1);
});
My prompt no longer works after I said dont open new dialogue boxes... Ive closed reopend chrome even restarted the cpu and reset chrome settings.. Still no worky. Is my prompt code just wrong now?
Jefferson
@jeffersonnnn
Aug 22 2016 12:26
hi guys, i have a question.
does anyone know how to make the navbar point to different parts of the site?
Phanindra M
@PhaniMaddi
Aug 22 2016 12:39
@jeffersonnnn Add different parts of site with different ID. And in your navbar href the buttons with respective ID.
Adriana
@Adrianacmy
Aug 22 2016 12:43
Hi, my js codes totally not loading, is there any reason for this?
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 12:43
yes
Adriana
@Adrianacmy
Aug 22 2016 12:43
what are they?
CasiqueJhon
@CasiqueJhon
Aug 22 2016 12:44
@CasiqueJhon
can somebody help me?
the nav bar is with jquety rigth?
Im really stuck at this
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 12:46
@VenusGrape You are not correctly linking to the file, either a typo, or you are linking to it before the stuff it affects exists on the page, move it to the bottom of the page just above </body> and make sure the script tag is written correctly. If that is good, then you have an issue in the .js file itself
@CasiqueJhon Without seeing your code there is no way for anyone to know that
Adriana
@Adrianacmy
Aug 22 2016 12:46
@TheJaredWilcurt I used the same file head with other projects though, they worked just fine
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 12:47
@VenusGrape that's an anti-pattern. Javascript is render blocking. It should always be the last thing to load on the page. it will also fix any document.ready issues
Adriana
@Adrianacmy
Aug 22 2016 12:49
@TheJaredWilcurt I am using bootstrap , it says the jq has to go before the boothstrap.min.js though
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 12:50
Good, put them both at the bottom, in the correct order. The order the JS runs is important. the order it loads is also important
it should load last and run in the correct order
Adriana
@Adrianacmy
Aug 22 2016 12:52
the bottom , do you mean between </body> and </html> ?
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 12:54
<!DOCTYPE html>
<html>
  <head>
    <title>Example</title>
  </head>
  <body>
    <h1>Example</h1>
    <script src="file.js"></script>
  </body>
</html>
Adriana
@Adrianacmy
Aug 22 2016 12:56
Thanks @TheJaredWilcurt but I tried with those simple codes , they even are not working
CamperBot
@camperbot
Aug 22 2016 12:56
venusgrape sends brownie points to @thejaredwilcurt :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for thejaredwilcurt
Adriana
@Adrianacmy
Aug 22 2016 12:56
$(document).ready(function(){
  $("#btn1").click(function(){
    $("#test1").html("Hello world!");
  });

});
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 12:57
is there an element on your page with an id="btn1" and another element with an id="test1"
what type of tags do they have
Adriana
@Adrianacmy
Aug 22 2016 12:58
yes
<div class="container">
      <button id="button1" class="btn btn-default">click</button>
      <p id="test1">6777</p>
    </div>
Pavel Antonov
@pavel-antonov
Aug 22 2016 13:01
Hey guys : )
Can some1 tell me, how can i add a navigator bar that when is clicked redirect to a different section of my page ?
Adriana
@Adrianacmy
Aug 22 2016 13:01
I am trying to finish the Show the Local Weather chanllenge , did you get that one done yet? @TheJaredWilcurt
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 13:01
Send me a link
The Jared Wilcurt
@TheJaredWilcurt
Aug 22 2016 13:03
<nav>
  <a href="#contacts">Go to Contacts Section</a>
 </nav>
<section id="contacts">
  <h2>This is the contacts section</h2>
</section>
@VenusGrape if you are doing it on CodePen, you should not be putting an html, head, or body into the HTML panel. everything in that panel gets injected into the <body> in the preview.
also <b> tags are deprecated, use <strong>
and your issue is you do not have anything on the page with and ID of btn1 which is what your JS is targeting
it cannot bind a click event to an element that does not exist
there is an element with an ID of button1 though
perhaps you meant to target that
Adriana
@Adrianacmy
Aug 22 2016 13:07
oh yeah, I just changed this part,
<div class="container">
      <button id="btn1" class="btn btn-default">click</button>
      <p id="test1">6777</p>
    </div>
not working though
but my goal is to make the weather js work,,
$(document).ready(function(){
   $(".icon").html("haha");  //for debugging

  function getLocation(){
    $(".location").html("haha");  //for debugging
    if(navigator.geolocation){
        navigator.geolocation.getCurrentPosition(showWeather, showError);
    }else{
      $(".location").html("Your device dosen't support geolocation. ");
    }
  }

  function showWeather(position){
    $(".location").html("haha");  //for debugging
    var lat = position.coords.latitude;
    var lon = position.coords.longitude;
    var result = [];
    var id;

    $.getJSON("http://bulk.openweathermap.org/sample/city.list.json.gz", function(result1){
      result.push(result1);
      for(var i=0; i < result.length; i++){
        if (result.lat === lat && result.lon === lon){
          id = result.id;
          }
      }
    });
    $.getJSON("http://api.openweathermap.org/data/2.5/weather?id=id&APPID={42c334b64e17431f427c2a2159051bcb}", function(data){
    $(".location").html("haha");
  });

  }

  function showError(error){
    switch(error.code)
    {
        case error.PERMISSION_DENIED:
            $(".location").html("User denied geolocation.")
            break;
        case error.POSITION_UNAVAILABLE:
           $(".location").html("position is unavailble.")
            break;
        case error.TIMEOUT:
            $(".location").html("Timeout.")
            break;
        case error.UNKNOWN_ERROR:
            $(".location").html("unknow error.")
            break;
    }
  }
  getLocation();

});
the debugging part didn't show
Adriana
@Adrianacmy
Aug 22 2016 13:13
I think the loop is a problem, but other than that i don't know how to get the city id
cogdesign
@cogdesign
Aug 22 2016 13:14
is there anyone here who thinks they are especially good with aesthetics/design (as opposed to the technical aspects of front end)?
going to work, you're on your own
cogdesign
@cogdesign
Aug 22 2016 13:16
no one?
dev-warner
@dev-warner
Aug 22 2016 13:18
anyone need any help with html and css?
cogdesign
@cogdesign
Aug 22 2016 13:21
i need help with making a site super awesome, as opposed to just awesome. :)
Adriana
@Adrianacmy
Aug 22 2016 13:22
@TheJaredWilcurt Thanks
CamperBot
@camperbot
Aug 22 2016 13:22
venusgrape sends brownie points to @thejaredwilcurt :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for thejaredwilcurt
Adriana
@Adrianacmy
Aug 22 2016 13:22
yeal yours is working
can you help me check those codes


Chris Cullen
@123xylem
Aug 22 2016 13:23
 var id = $(".box").click().attr("id"); 
  switch(id) {   //THIS PART I NEED TO SELECT THE ID!!
    case "a":
answer.push("A");       break;
    case "b":
answer.push("B");         break;
   case "c":
answer.push("C");       break;   
   case "d":
answer.push("D");       break;   
   case "e":
answer.push("E");       break;    
   case "f":
answer.push("F");       break;  
   case "g":
answer.push("G");       break;    
   case "h":
answer.push("H");       break;    
   case "i":
answer.push("I");       break;

}      console.log(answer);

}
  else(userO=1);
});
QUICK Q: How to make my switch activate ONLY On THE CLICK OF .box.attr(ID) ? Right now it activates ID right away even though no ID was clicked!
Adriana
@Adrianacmy
Aug 22 2016 13:23
$(document).ready(function(){
   $(".location").html("location1");  //for debugging

   function showWeather(position){
     $(".location").html("location2");  //for debugging
     var lat = position.coords.latitude;
     var lon = position.coords.longitude;
     var result = [];
     var id;

     $.getJSON("http://bulk.openweathermap.org/sample/city.list.json.gz", function(result1){
       result.push(result1);
       for(var i=0; i < result.length; i++){
         if (result.lat === lat && result.lon === lon){
           id = result[i].id;
           }
       }
     });
     $.getJSON("http://api.openweathermap.org/data/2.5/weather?id=id&APPID={42c334b64e17431f427c2a2159051bcb}", function(data){
     $(".location").html("showdata");
   });

   }

   function showError(error){
     switch(error.code)
     {
         case error.PERMISSION_DENIED:
             $(".location").html("User denied geolocation.")
             break;
         case error.POSITION_UNAVAILABLE:
            $(".location").html("position is unavailble.")
             break;
         case error.TIMEOUT:
             $(".location").html("Timeout.")
             break;
         case error.UNKNOWN_ERROR:
             $(".location").html("unknow error.")
             break;
     }
   }

  function getLocation(){
    $(".location").html("haha");  //for debugging
    if(navigator.geolocation){
        navigator.geolocation.getCurrentPosition(showWeather, showError);
    }else{
      $(".location").html("Your device dosen't support geolocation. ");
    }
  }


  getLocation();

});
Chris Cullen
@123xylem
Aug 22 2016 13:23
 var id = $(".box").click().attr("id"); 
  switch(id) {   //THIS PART I NEED TO SELECT THE ID!!
    case "a":
answer.push("A");       break;
    case "b":
answer.push("B");         break;
   case "c":
answer.push("C");       break;   
   case "d":
answer.push("D");       break;   
   case "e":
answer.push("E");       break;    
   case "f":
answer.push("F");       break;  
   case "g":
answer.push("G");       break;    
   case "h":
answer.push("H");       break;    
   case "i":
answer.push("I");       break;

}      console.log(answer);

}
  else(userO=1);
});
QUICK Q: How to make my switch activate ONLY On THE CLICK OF .box.attr(ID) ? Right now it activates ID right away even though no ID was clicked!
cogdesign
@cogdesign
Aug 22 2016 13:26
can either of you make a code pen?
xylem,it looks like you have an unessessary brace to me
you have two closing braces, one before console one after
I think you need to get rid of the one after
Chris Cullen
@123xylem
Aug 22 2016 13:34
@cogdesign i need 3 missing some code above
cogdesign
@cogdesign
Aug 22 2016 13:34

var id = $(".box").click().attr("id");
switch(id) { //THIS PART I NEED TO SELECT THE ID!!
case "a":
answer.push("A"); break;
case "b":
answer.push("B"); break;
case "c":
answer.push("C"); break;
case "d":
answer.push("D"); break;
case "e":
answer.push("E"); break;
case "f":
answer.push("F"); break;
case "g":
answer.push("G"); break;
case "h":
answer.push("H"); break;
case "i":
answer.push("I"); break;

}

console.log(answer);

else(userO=1);

Chris Cullen
@123xylem
Aug 22 2016 13:35
var id = $(".box").click().attr("id"); 
  switch(id)
thats the crux of the code.. hOW DO I WRITE THIS TO make it only used on clicked .box ???
cogdesign
@cogdesign
Aug 22 2016 13:35
ok then
i don't know , but your if statement was clearly messed up, so I tried to see if that could be causing the problem.
Chris Cullen
@123xylem
Aug 22 2016 13:36
@cogdesign yea there was a function before it hence the 3rd bracket
cogdesign
@cogdesign
Aug 22 2016 13:38
@123xylem ok this says using an index is how you do it:

@123xylem You need to use the index of this.

switch( $(this).index(".ClientButtonPic") )

@123xylem here's something else to try. I'm sorry I can't give you better advice, I haven't done that before: http://stackoverflow.com/questions/30163297/how-can-i-make-a-switch-for-ids-with-a-click-event-in-jquery
cogdesign
@cogdesign
Aug 22 2016 13:45
@123xylem this answer from the second link looks pretty good:

@123xylem
``` (shift+enter for line break)

$(document).on('click', 'selector', function() {
var id = $(this).attr('id');

switch(id) {
    case 'home': 
        //
        break;
    case 'contact':
        //
        break;
    default:
        console.log('No id');
}

});

```

@123 xylem, I can never figure out how to get the coding markup to work
 ``` 

var code = "formatted";

```

Adi2Point0
@Adi2Point0
Aug 22 2016 13:49

just do it like

```js
your code here
```

cogdesign
@cogdesign
Aug 22 2016 13:49
your code here
Adi2Point0
@Adi2Point0
Aug 22 2016 13:49
There you go!
cogdesign
@cogdesign
Aug 22 2016 13:49
$(document).on('click', 'selector', function() {
    var id = $(this).attr('id');

    switch(id) {
        case 'home': 
            //
            break;
        case 'contact':
            //
            break;
        default:
            console.log('No id');
    }
});
Adi2Point0
@Adi2Point0
Aug 22 2016 13:49
now replace your code here with your actual code :D
correct!
cogdesign
@cogdesign
Aug 22 2016 13:50
their example is messed up in their help thing, it is confusing,
in that m+ box next to the chat
Thanks @Adi2Point0
CamperBot
@camperbot
Aug 22 2016 13:51
cogdesign sends brownie points to @adi2point0 :sparkles: :thumbsup: :sparkles:
:cookie: 9 | @adi2point0 |http://www.freecodecamp.com/adi2point0
Adi2Point0
@Adi2Point0
Aug 22 2016 13:51
@cogdesign : Binding events like $(document).on('click', 'selector', is a bad idea.
it's a cheat code to get around apparent lack of understanding of event handling. :)
cogdesign
@cogdesign
Aug 22 2016 13:52
@Adi2Point0 I was just using an answer i found on stack to help @123xylem , maybe you can help him. I don't know about this issue.
Adi2Point0
@Adi2Point0
Aug 22 2016 13:52
@cogdesign : I've already helped him in other chat room. He seems away
cogdesign
@cogdesign
Aug 22 2016 13:53
@Adi2Point0 @123xylem I think he's trying stuff out.
Adi2Point0
@Adi2Point0
Aug 22 2016 13:53
@cogdesign : I'd prefer implementation instead
$(".box").on('click', function(){
  var id = $(this).attr('id');
  switch(id){ ....
})
Adi2Point0
@Adi2Point0
Aug 22 2016 13:54
It's logically doing the same thing, only dfference is the event is not bound to the entire document.
cogdesign
@cogdesign
Aug 22 2016 13:54
@Adi2Point0 @123xylem that makes sense and looks good to me.
 ```js
$(".box").on('click', function(){
var id = $(this).attr('id');
switch(id){ ....
})
```
hahah @adi it didn't work
what did my markup fail again
Adi2Point0
@Adi2Point0
Aug 22 2016 13:56
@cogdesign : I;m assuming you copy pasted my code :P
cogdesign
@cogdesign
Aug 22 2016 13:56
yes
Adi2Point0
@Adi2Point0
Aug 22 2016 13:56
cheaters always fail :P
cogdesign
@cogdesign
Aug 22 2016 13:56
to give to @123xylem , you didn't put his name in it
Adi2Point0
@Adi2Point0
Aug 22 2016 13:57
anyways, when you paste, make sure there aren't extra ` there
cogdesign
@cogdesign
Aug 22 2016 13:57
@Adi2Point0 but there is no extra symbol
Adi2Point0
@Adi2Point0
Aug 22 2016 13:58
it's not shown after you post. You can edit your previous post and see if there are extra backticks
cogdesign
@cogdesign
Aug 22 2016 13:58
i hate that symbol, how do you get it with your keyboard?
i really am annoyed that they chose that syntax for markup.
@adi are you good with design/aesthetics?
Adi2Point0
@Adi2Point0
Aug 22 2016 13:59
@cogdesign : backtick is located above tab key and below escape key
or on the left side of 1
that ~ key
cogdesign
@cogdesign
Aug 22 2016 14:00
oh right, the tilda button
k
yeah
Adi2Point0
@Adi2Point0
Aug 22 2016 14:00
This message was deleted
cogdesign
@cogdesign
Aug 22 2016 14:00
here is a fx
:)
Adi2Point0
@Adi2Point0
Aug 22 2016 14:00
cool
and no I am artistically void :(
cogdesign
@cogdesign
Aug 22 2016 14:01
something weird happens if I copy and paste the example from their help box
Adi2Point0
@Adi2Point0
Aug 22 2016 14:01
could be the case
cogdesign
@cogdesign
Aug 22 2016 14:01
yay if i can remember this i'll never get angry at gitter markup again
Adi2Point0
@Adi2Point0
Aug 22 2016 14:02
lol
then you better remember it :D
cogdesign
@cogdesign
Aug 22 2016 14:02
@Adi2Point0 let's hope
Adi2Point0
@Adi2Point0
Aug 22 2016 14:02
:+1:
cogdesign
@cogdesign
Aug 22 2016 14:03
I'm excited I'm getting an ipad today, im broke as hell but i needed some device to test safari with
i got an ipad mini 2 used
for $200 usd
it is arriving today
@Adi2Point0 are you familiar with the differences between browser coding - it is so annoying.
Adi2Point0
@Adi2Point0
Aug 22 2016 14:05
what do you mean browser coding?
cogdesign
@cogdesign
Aug 22 2016 14:06
like adding browser specfic css - for svgs especially
I want to murder safari
Adi2Point0
@Adi2Point0
Aug 22 2016 14:06
nah mate! Not familiar with any of that!
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:06
^^
before it was worst
cogdesign
@cogdesign
Aug 22 2016 14:07
flexbox and svg are all wacko on safari
@AlexanderDom i believe you
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:07
you don't zoom:1 paradise
know
cogdesign
@cogdesign
Aug 22 2016 14:07
im glad i wasn't coding then
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:08
for svg yes, but you can read some Sara Soueidan articles and you have this pages for flex bugs
cogdesign
@cogdesign
Aug 22 2016 14:10
I managed to get the svg working on some media queries, and used block workarounds on others
sorry I mean I managed to get flex, not svg
i still can't get the svg alignment to work, but I have some ideas gathered, I"m waiting for my ipad to arrive today to try them
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:11
you say safari for flex, go to the dark side of internet explorer 9, 10, 11 :)
cogdesign
@cogdesign
Aug 22 2016 14:11
i can't believe they don't make make safari for windows, apple sucks
make life so hard for developers
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:12
actually i thaught they make it
cogdesign
@cogdesign
Aug 22 2016 14:12
they used to
they stopped
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:12
like ie who stopped at 5.0 version on Mac
cogdesign
@cogdesign
Aug 22 2016 14:12
so you can't tell anything about recent compatibility
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:13
yes you can at can i use
cogdesign
@cogdesign
Aug 22 2016 14:13
but you can't test your code there
i need to see it working to believe it, you know.
im not skilled enough
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:13
you czn see known issues
cogdesign
@cogdesign
Aug 22 2016 14:14
right but Im like still basically a beginner.
often things work but you need to use specific browser syntax
that's how i got flexbox to work in safar
it worked, but i needed to add some lines of code.
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:15
little advice (you can test on ipads in apple stores ^^) or later there are browser stack or you can install xcode simulators if you're on mac
cogdesign
@cogdesign
Aug 22 2016 14:15
right, but I can't bring my windows machine and code in the apple store, can i?
im not on a mac
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:15
if your site is online oor on github or something
codepen
cogdesign
@cogdesign
Aug 22 2016 14:16
i don't want to run a vmware mac - i did that before, its too huge
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:16
yes this too
cogdesign
@cogdesign
Aug 22 2016 14:17
i can't get that link to load anything
i shouldn't have clicked - did you just invade my machine. :)
??
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:19
you watch mr robot too much :)
cogdesign
@cogdesign
Aug 22 2016 14:19
hahah mr robot
quick ssh
we're gonna run telnet
and infect the world
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:20
fork society i mean
Chris Cullen
@123xylem
Aug 22 2016 14:21
@cogdesign @Adi2Point0 really good stuff thanks!
CamperBot
@camperbot
Aug 22 2016 14:21
123xylem sends brownie points to @cogdesign and @adi2point0 :sparkles: :thumbsup: :sparkles:
:cookie: 10 | @adi2point0 |http://www.freecodecamp.com/adi2point0
:warning: could not find receiver for cogdesign
cogdesign
@cogdesign
Aug 22 2016 14:21
@123xylem did you get it working?
dev-warner
@dev-warner
Aug 22 2016 14:22
cogdesign xD no its places you can go a try different
cogdesign
@cogdesign
Aug 22 2016 14:23
huh? @dev-warner ?
dev-warner
@dev-warner
Aug 22 2016 14:23
devices
im at work sorry xD designer shouting me
cogdesign
@cogdesign
Aug 22 2016 14:24
do you have a link
google it if you prefer xD
cogdesign
@cogdesign
Aug 22 2016 14:25
that's great -t hank you
dev-warner
@dev-warner
Aug 22 2016 14:25
no worries :) no use to me though in the UK there isnt enough set up but i think its larger in the US
Chris Cullen
@123xylem
Aug 22 2016 14:29

$(document).ready(function(){
 var user=  prompt("Choose X or O","Make sure its Caps!");

if (user==="X") {
   userX=1 ; 
  $(".box").on('click', function(){
  var id = $(".box").attr('id');
  switch(id){ 
    case "a":
answer.push("A");       break;
    case "b":
answer.push("B");         break;
   case "c":
answer.push("C");       break;   
   case "d":
answer.push("D");       break;   
   case "e":
answer.push("E");       break;    
   case "f":
answer.push("F");       break;  
   case "g":
answer.push("G");       break;    
   case "h":
answer.push("H");       break;    
   case "i":
answer.push("I");       break;

)};   console.log(answer);   

  }else {userO=1};

});
It doesnt recognise my ELSE ANd says unexpected else?
its just a compley if else
comp[;ex
cogdesign
@cogdesign
Aug 22 2016 14:33
huh?? @123xylem
Chris Cullen
@123xylem
Aug 22 2016 14:34
it was a brackets issue
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:34
@123xylem remplace your end code by this
answer.push("I");       break;

};
console.log(answer);   

  });
}else {userO=1};

});
Chris Cullen
@123xylem
Aug 22 2016 14:34
@cogdesign But yea good one
cogdesign
@cogdesign
Aug 22 2016 14:34
@123xylem so your switch is working, but you can't trigger your else?
Chris Cullen
@123xylem
Aug 22 2016 14:34
Bu problem is now @AlexanderDom the first element only is recorded
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:35
bu ?
cogdesign
@cogdesign
Aug 22 2016 14:35
hey i just got my ipad mini two used, but it doesn't have a cable, can i get a generic lightenng cable at big stores, or is mac the only manufacturer i can find in a store?
Chris Cullen
@123xylem
Aug 22 2016 14:35
Wait only A is still the only case that works
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:35
@cogdesign you can
cogdesign
@cogdesign
Aug 22 2016 14:36
ok i know walgreens has a lot of cords, and target too
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:38
@123xylem show all of your code please
Chris Cullen
@123xylem
Aug 22 2016 14:38
var userX=0;
var userO=0;

var answer=[];

$(document).ready(function(){
 var user=  prompt("Choose X or O","Make sure its Caps!");

if (user=="X") {
   userX=1 ; 
  $(".box").on('click', function(){
  var id = $(".box").attr('id');
  switch(id){ 
    case "a":
answer.push("A");       break;
    case "b":
answer.push("B");         break;
   case "c":
answer.push("C");       break;   
   case "d":
answer.push("D");       break;   
   case "e":
answer.push("E");       break;    
   case "f":
answer.push("F");       break;  
   case "g":
answer.push("G");       break;    
   case "h":
answer.push("H");       break;    
   case "i":
answer.push("I");       break;

};   console.log(answer);   
 });

  }else {userO=1;}

});


$(".box").click(function ()
               { 
  if (userX>0){
    $(this).text("X");

     }
  else { 
    $(this).text("O");
  }
  });
For some reason it cant get past the firs case
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:41
and where's html plz
Sorin Ruse
@sorinr
Aug 22 2016 14:41
@123xylem this instead of ".box". i mean var id = $(this).attr('id');
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:41
you box have id of a ?
your
cogdesign
@cogdesign
Aug 22 2016 14:47
@AlexanderDom im just gonna get the expensive cable -the reviews for the generic one at target are awful, I don't want to have to buy another one.
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:48
@cogdesign as you wish expensive one is litlle bit fragile too
cogdesign
@cogdesign
Aug 22 2016 14:49
@AlexanderDom goddamn it.. seriously ? the manufacturers do it on purpose. so expensive and it is still fragile. :(
so you know about the cable
can you recommend one?
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:50
yeah but i said just don't pull on it if you handle it with care it's gonna be ok
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:51
check if it's ok for your model
and yes it's enough
cogdesign
@cogdesign
Aug 22 2016 14:51
oh no - wait - @AlexanderDom it makes them blow up
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:51
Oo
cogdesign
@cogdesign
Aug 22 2016 14:51
read the 1 star reviews
Im gonna google to see if there is a hack to prevent the damage ...
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:52
it can blow if you give too much power, ipad charger has more power delivered than iphone one
i seriously doubt about blown up stuff
cogdesign
@cogdesign
Aug 22 2016 14:53
melting
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:53
just check out if it's ok with your model
cogdesign
@cogdesign
Aug 22 2016 14:53
nononon don't bother
its ok
thank you
dev-warner
@dev-warner
Aug 22 2016 14:55
theres plenty of good lighting cables on amazon
Chris Cullen
@123xylem
Aug 22 2016 14:56
@AlexanderDom my box class has id a-i
so depending which box is which case I want displayed
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:58
show html of your box please
@123xylem
cogdesign
@cogdesign
Aug 22 2016 14:58
@dev-warner im just gonna splurge I want this running soon., the apple store is within walking distance
Chris Cullen
@123xylem
Aug 22 2016 14:58
@AlexanderDom IT WORKS!
;0
thanks @AlexanderDom
CamperBot
@camperbot
Aug 22 2016 14:58
123xylem sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 350 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
cogdesign
@cogdesign
Aug 22 2016 14:59
@123xylem what did you change?
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:59
what ><
my recommandation or what ? ^^
Chris Cullen
@123xylem
Aug 22 2016 14:59
$(document).ready(function(){
 var user=  prompt("Choose X or O","Make sure its Caps!");

if (user=="X") {
   userX=1 ; 
  $(".box").on('click', function(){
  var id = $(this).attr('id');
yea .this
cogdesign
@cogdesign
Aug 22 2016 14:59
@alex you are good at javascript arent' you? i have a challenge if you want it, i"m warning you its ugly
Alexander Domikov
@AlexanderDom
Aug 22 2016 14:59
all right than you're welcome ^^ @123xylem
cogdesign
@cogdesign
Aug 22 2016 15:00
@AlexanderDom I wasn't going to deal with it for a week or two until I fixed my safari svg issue, but stince I have a good js guy I might have you fix it
:)
Chris Cullen
@123xylem
Aug 22 2016 15:00
godbless all the helpers here ;)
cogdesign
@cogdesign
Aug 22 2016 15:00
@AlexanderDom its not the ugliest
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:00
i'm more html css good guy actually :)
cogdesign
@cogdesign
Aug 22 2016 15:00
its resizing changing css iwth js
but my js loop is messed up
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:01
show us
cogdesign
@cogdesign
Aug 22 2016 15:02
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:02
alright alright
cogdesign
@cogdesign
Aug 22 2016 15:03
```js
```js
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:03
shift + enter
cogdesign
@cogdesign
Aug 22 2016 15:03

 $(document).ready(function() {

    var sectionIndex = 1;
    var animationName = 'indexAnimateLand';
    var resizeHappened = 0;
    var needToResizeLandingOnLand = 0;


    startAnimation();   //includes resizing background image and resizing svgs
    footerShow();       // shows the footer when user scrolls up
    toggleIntroClass();  //adds css depending on section of page
    animateLink();      //animates scroll when user clicks on navigation 


    // if the user resizes the window, run the animation again

    $(window).on('resize', function(){
      startAnimation();
    });



      // if the user is below landing/intro section during resize, 
      // indicate that the landing image will need to be resized if they return to the top of page.

      $(window).on('resize', function(){
       if (sectionIndex == 2) {needToResizeLandingOnland = 1;}
      else {resizeLanding();};
      });


      //sizes the landing image and the icons
      function startAnimation() {

        resizeSVG();
        $('.areaSVG').css('display', 'inline');

       if(resizeHappened  < 2) { 
           resizeLanding();
           resizeHappened = resizeHappened + 1;
         }

        window.requestAnimationFrame(startAnimation);

       }


    //resizes the landing image and sets top margin for the following section

    function resizeLanding() {

      var $lndFooter = $('#indexFooter');
      var $bgLand = $('#section0img');
      var $contactSection = $('#contactSection');
      var winHeight = $(window).height();
      var lndFooterHeight = $lndFooter.height();

      bgFinalHeight = winHeight - lndFooterHeight;
      $bgLand.css("height", bgFinalHeight);

       $contactSection.css("margin-top", bgFinalHeight);

      }


     //sizes the icons on landing section


  function resizeSVG() {

// the row
 var $linksRow = $('.ey-nav-bar');

// the text
   var $areaText = $('.ey-text-content');

//the entire row below "research Area"



         // the actual svg container

      var $area = $('.areaSVG');

      var scale = 0.6;

         //the wrapper containing the svg div, its height and its width
      var $eyCol = $(".ey-col-svg");
      var eyWidth = $eyCol.width();
      var eyHeight = $eyCol.height();

              //the window
      var winHeight = $(window).height();
      var winWidth = $(window).width();

      //max Height caclulated based on window
      var maxHeight = .33 * winHeight;


        // if the height of the column is less than the width, and below the max height

      if (eyHeight < eyWidth && eyHeight < maxHeight)

                  //make the height of the svg the max heihgt
        $area.height(maxHeight);

          // use the scaling factor times the width of the svg wrapper

      var imageWidth = scale * $eyCol.width();
                // get the hight of the column       

      var imageHeight = $eyCol.height();


          // will be the dimensions used to size lenth and width of the svg

      var tot;

          //apsect ratio of the screen (horizontal/vertical)

      var ratio = winWidth / winHeight;
          // if the screen is landscape or if the user has left the landing section

      if (ratio >= 1 || sectionIndex > 1) 

          //if the image widith is greter than the height, set tot it the height
           // otherwise set it the imageWwidth

//        tot = imageWidth > imageHeight ? imageHeight : imageWidth;
        tot = imageWidth > imageHeight ? imageHeight: imageWidth;


       else {

            if  (winWidth < 400)
                tot = imageWidth / 2 > imageHeight / 2 ? imageHeight / 2 : imageWidth / 2;

            else  tot = imageWidth * .33> imageHeight / 2 ? imageHeight / 2 : imageWidth * .33;

        }


         // set the height and the width of the the svg to tot


       // $eyCol.css("height", (tot+10));
        //$eyCol.css("width", (tot+10));

maxTextHeight = maxHeight * .07;
maxTotHeight = maxHeight * .5;

if (tot < maxTotHeight)

{        $area.css("height", tot);
@AlexanderDom its a lot
i can explain what I need
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:04
yes please
cogdesign
@cogdesign
Aug 22 2016 15:04
just focus on wide screen for now
so all of this exists because svgs need to resize
the bottom row
i wanted them to be responsive
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:05
you don't paste all of the js your if is not closed
cogdesign
@cogdesign
Aug 22 2016 15:05
let me try again:
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:07
for the bottom or the top bar svgs ?
ok bottom
cogdesign
@cogdesign
Aug 22 2016 15:08
there is too much code, I"l put it in a codepen
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:09
i watch your svgs for now :)
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:09
@sorinr I'm sorry, I was knocked out for awhile. I love your portfolio.
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:10
@cogdesign for start display: inline and height don't work together
ìnline-block` yes or block or any other but not inline
cogdesign
@cogdesign
Aug 22 2016 15:12
ok @AlexanderDom
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:14
i think we can resolve your responsive problem in css, explain what's the problem
cogdesign
@cogdesign
Aug 22 2016 15:14
let me explain
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:14
@cogdesign
cogdesign
@cogdesign
Aug 22 2016 15:14
1) i don't want the svg footer on the landing first section to be more that 33% ever
but I want it to be smaler if the size gets smaller, ti does that
the thing is, this makes me have to resize the the picture above AFTER i resize the svg footer
dev-warner
@dev-warner
Aug 22 2016 15:15
max-width: 33%;
width: 100%
cogdesign
@cogdesign
Aug 22 2016 15:15
@dev-warner this is complicatd hold on
@dev-warner - did you see how much i have going on there...hold on, i appreciate your help
but it also has to do this when i resize the page
and i noticed that for some reason it was going into an infinite loop before so only allowed it to do it twice
this might be too hard for you guys
and if you have a mac don't bother
or use chrome rather
this is completely messed up on safari still
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:17
@cogdesign Try adding bootstrap to your codepen settings, and then on the css panel type in the code that dev-warner gave your for your svg element that you will use in the html panel. Also, you may want to add a viewport meta tag in the html setting.
cogdesign
@cogdesign
Aug 22 2016 15:18
koni, i don't want to get into bootstrap
@KoniKodes its almost done, there's just some wackiness that needs to be fixed
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:19
@cogdesign That's ok. It's a friendly tool but you don't have to use it. However, you do need to add the code to your css. And adding the viewport meta tag tells the machine to resize properly.
cogdesign
@cogdesign
Aug 22 2016 15:19
i don't want to learn a whole new framework..
i dont' know it at all
if it truly is easy - can you tell me exactly all thes teps tha twould be required
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:20
@cogdesign No problem. It's just that the only thing I see on your pen is JS.
cogdesign
@cogdesign
Aug 22 2016 15:20
i pasted the page
youc an right click and view the source
and the css
(Im only looking for help on large sizes)
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:21
i am at symmetric challenge i want to get the same elements between both the arrays and then concat the arrays and delete those which were same is this the right approach
@KoniKodes
@cogdesign
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:22
@cogdesign little advice you can put many elements in one jQuery selector if it's for the same action
$('#newHeader','#nameBoxIndexTop','#indexIconsContainer','#indexIconsList','#staffSVG','#contactSVG','#cvSVG','#pubsSVG','#linkCell','#indexFooter','.ey-text-content','.ey-col-svg','.ey-col-1','.ey-row-scale','.ey-nav-bar','.areaSVG').addClass('fixed');
$('.areaSVG').attr("class", "areaSVG");
i watch your js
cogdesign
@cogdesign
Aug 22 2016 15:23
thanks
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:23
@cogdesign Oh, I was looking on the pen. Give me a minute.
cogdesign
@cogdesign
Aug 22 2016 15:24
listen guys, if it is too much for you to process don't sweat it...after i deal with my safari isues I had planned on making a smaller version with a code pen to recruit targeted help. I don't have time to minimize my code now..
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:25
@cogdesign Oh, safari I don't know.
cogdesign
@cogdesign
Aug 22 2016 15:25
@KoniKodes Im not asking for help...
@KoniKodes about safari
@KoniKodes i just wanted @AlexanderDom to look at my js because he seems pretty skilled at it.
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:27
^^ i'm not so much skilled :) there are much more skilled guys here
but i'm pretty sure that we can resolve it in css but i watch you js however
cogdesign
@cogdesign
Aug 22 2016 15:27
you know two things better than I - 1)height doesn't go with inline, and 2) that click stuff
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:28
@cogdesign I'm sorry I interrupted. I was looking at the codepen you posted, and only just received your other link.
cogdesign
@cogdesign
Aug 22 2016 15:28
@AlexanderDom soI think you are ok
@koni its fine
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:29
@cogdesign carefull with
      if (ratio >= 1 || sectionIndex > 1) 

          //if the image widith is greter than the height, set tot it the height
           // otherwise set it the imageWwidth

//        tot = imageWidth > imageHeight ? imageHeight : imageWidth;
        tot = imageWidth > imageHeight ? imageHeight: imageWidth;
add curly brackets you playing with fire :)
and there are many places like that
cogdesign
@cogdesign
Aug 22 2016 15:32
ok @AlexanderDom do you think that's what's causing it though?
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:32
not sure, but possibly
cogdesign
@cogdesign
Aug 22 2016 15:32
@alex would you mind if I stepped away for a while, maybe we can work on this later
@AlexanderDom I'll friend yo8u
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:33
@MohammadHasham Hi Mohammed, slice, reduce and indexOf will be your friends on this one. You are going to want to create a new array to concat, and then slice by index comparing the values, and save the unique values into a different array. I hope that helps.
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:33
^^ thank's but i didn't really helped you for now
cogdesign
@cogdesign
Aug 22 2016 15:34
thanks for taking the time to help me @AlexanderDom
CamperBot
@camperbot
Aug 22 2016 15:34
cogdesign sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 351 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
cogdesign
@cogdesign
Aug 22 2016 15:34
@AlexanderDom and for the fun conversation
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:42
@KoniKodes Okay i'll look forward to it
Dale
@dwhale84
Aug 22 2016 15:44
Hi everyone, I'm working on my random quote machine, and have run into an issue with my 'share tweet' button that I can't figure out and was wondering if someone could help me
specifically, i can't get the anchor element to be clickable
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:46
@MohammadHasham check out camper Stephen Mayeux on youtube. He's been a great help for me to understand the advance algos.
@dwhale84 do you have a codepen?
Dale
@dwhale84
Aug 22 2016 15:47
yes, do you want a link?
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:47
@KoniKodes Thats really nice of u
Dale
@dwhale84
Aug 22 2016 15:47
here it is...or i can copy code https://codepen.io/dwhale84/pen/VjgJrz
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:47
@MohammadHasham We're all on the same team, right?
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:48
@KoniKodes Thanks
CamperBot
@camperbot
Aug 22 2016 15:48
mohammadhasham sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 357 | @konikodes |http://www.freecodecamp.com/konikodes
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:49
is that channel providing solutions?
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:49
@MohammadHasham Thank you for the brownie :-)
CamperBot
@camperbot
Aug 22 2016 15:49
konikodes sends brownie points to @mohammadhasham :sparkles: :thumbsup: :sparkles:
:cookie: 320 | @mohammadhasham |http://www.freecodecamp.com/mohammadhasham
Darshan
@Dave1089
Aug 22 2016 15:49
@dwhale84 check console log after clicking your tweet button
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:49
@KoniKodes i hope so it does'nt provide me solution bt hints
Dale
@dwhale84
Aug 22 2016 15:49
@Dave1089 I can't click the tweet button, which is the issue
Darshan
@Dave1089
Aug 22 2016 15:50
well, I could
Dale
@dwhale84
Aug 22 2016 15:50
hmmmmm
Darshan
@Dave1089
Aug 22 2016 15:50
what browser?
Dale
@dwhale84
Aug 22 2016 15:50
chrome
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:50
@dwhale84 try placing your tweet button in an <a href > with target=_blank on the html panel. Take it out of the JS panel.
Dale
@dwhale84
Aug 22 2016 15:50
I'm pretty sure I could click it at some point while I was building it, but can't anymore. I'm even on a different computer now
does that need to be inside a <script>?
Darshan
@Dave1089
Aug 22 2016 15:51
@KoniKodes there is no button tag.. he has just the link I think
Dale
@dwhale84
Aug 22 2016 15:51
making it a button could be the solution, I just defaulted to anchor
Mohit Sharma
@xxholyChalicexx
Aug 22 2016 15:51
why is my jquery code ain't working...... somebody could please help me here.....
http://codepen.io/HolyChalice/pen/yJwVjE
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:52
@Dave1089 @dwhale84 That is correct. Ok, make the link into a button so it's easier to see and click.
Dale
@dwhale84
Aug 22 2016 15:52
ok, thanks @Dave1089 and @KoniKodes I'll try that
CamperBot
@camperbot
Aug 22 2016 15:52
dwhale84 sends brownie points to @dave1089 and @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 358 | @konikodes |http://www.freecodecamp.com/konikodes
:cookie: 412 | @dave1089 |http://www.freecodecamp.com/dave1089
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:52
@xxholyChalicexx put your js in js tab
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:53
@KoniKodes is it okay if i see all those videos and then solve or i should think myself first?
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:53
@xxholyChalicexx Did you place your js and css codes into codepen?
Alexander Domikov
@AlexanderDom
Aug 22 2016 15:54
@xxholyChalicexx and you don't need to write html tag and body in codepen it's already there, it's like you write inside body tag
Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:54
@MohammadHasham Try it yourself first :sparkles: There are many ways to come up with a solution. But if you are stuck, Stephen is great at putting into english so that it makes sense.
Muhammad Hasham
@MohammadHasham
Aug 22 2016 15:55
@KoniKodes Thanks Once Again!
CamperBot
@camperbot
Aug 22 2016 15:55
mohammadhasham sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave konikodes points
flindip
@flindip
Aug 22 2016 15:55

hi, I'm finishing up the rough draft/functionality of the Comodoro clock. I can get pretty much everything to work except the session time funnels down and transfers over to break time. For whatever reason the break time count down is randomly counting to infinity.

I pretty much just copied and pasted what I did for the session timer(converting into minutes). But, I'm guessing I'm over looking something. Would someone mind taking a look at it?

http://codepen.io/flindip/pen/zBXZEj

Toni Shortsleeve
@KoniKodes
Aug 22 2016 15:58
@flindip It looks good. I like being able to set the time. But give me 4.5 minutes to see how it responds :-)
flindip
@flindip
Aug 22 2016 15:58
@KoniKodes yeah, I know. Sorry. I thought I had it working so I put in the non-testing times. You'll see what happens
Mohit Sharma
@xxholyChalicexx
Aug 22 2016 15:59
@AlexanderDom yeah i did.....its from setting...then javascript and "Quick add" jquery...... isn't it ?
flindip
@flindip
Aug 22 2016 15:59
@KoniKodes thanks btw
CamperBot
@camperbot
Aug 22 2016 15:59
:cookie: 359 | @konikodes |http://www.freecodecamp.com/konikodes
flindip sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
Dale
@dwhale84
Aug 22 2016 15:59
Hi guys, sorry, I'm back. I've turned the tweet link into a button, and I still can't get it to do anything
Tomáš Kalný
@Sleepy-guy
Aug 22 2016 15:59

Can I use setTimeout in loops ? cuz it breaks the whole browser and I need to restart it ...

 combo.map(function(item){
    var $el = $('#'+item);
       var origbackground = $el.css('background');
      $el.css('background','blue');

            setTimeout (function(){
   $el.css('background',origbackground);
      },1000);
       $('#'+item).trigger('onclick');

    });

I need it to play the button and change its collor for a few seconds

Dale
@dwhale84
Aug 22 2016 16:00
I'm wondering if it's something with my browser blocking opening new tabs or something
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:00
@xxholyChalicexx like this
greg
@wearenotgroot
Aug 22 2016 16:00
@flindip make sure that those interval ids are on higher scope so it is easier to access and stop the interval
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:00
Capture d’écran 2016-08-22 à 17.59.50.png
@xxholyChalicexx look at image
Dale
@dwhale84
Aug 22 2016 16:02
again, my page is here https://codepen.io/dwhale84/pen/VjgJrz?editors=1011 I tried commenting out the JS parts of the button and get it to just open a new tab of twitter.com, and nothing's happening
flindip
@flindip
Aug 22 2016 16:02
@wearenotgroot Well breakNumbers is a global. Could it be that I don't have the brackets properly positioned?
@wearenotgroot thanks
CamperBot
@camperbot
Aug 22 2016 16:02
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1423 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:02
@dwhale84 you have two js errors
Mohit Sharma
@xxholyChalicexx
Aug 22 2016 16:02
@AlexanderDom ooooookhay...... so the script part i should write inside the JS text editor....... which i haven't done......
greg
@wearenotgroot
Aug 22 2016 16:03
@flindip talking about
  • times and beginBreak these two variables(these will hold the id for each interval you fire up)
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:03
@dwhale84
js
Dale
@dwhale84
Aug 22 2016 16:03
@AlexanderDom it's not showing any that I can see. normally theres a red !, right?
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:03
Uncaught ReferenceError: shareTweet is not defined(anonymous function)
Uncaught SyntaxError: missing ) after argument list
Mohit Sharma
@xxholyChalicexx
Aug 22 2016 16:03
@AlexanderDom thnx mate....... long live and keep coding
CamperBot
@camperbot
Aug 22 2016 16:03
xxholychalicexx sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:04
@xxholyChalicexx you're welcome same to you :)
@dwhale84 you commented your shareTweet function
Dale
@dwhale84
Aug 22 2016 16:05
@AlexanderDom yeah, I was trying to comment that out so I could get the button to do something simple, guess I screwed it up more
where did you see those errors?
like, the notifications of them so I can find them in the future
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:05
in your browser console
Dale
@dwhale84
Aug 22 2016 16:06
oh, the console isn't showing anything to me
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:06
in which browser do you test ?
Dale
@dwhale84
Aug 22 2016 16:06
chrome
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:06
so try to right click inspect element
Wesley Schulte
@WesSchulte
Aug 22 2016 16:06
so for this user story shenanigans, do we just pick a dead person to give mad props to? with fun links and info?
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:06
than you can push escape and console gonna show up or press console tab
Dale
@dwhale84
Aug 22 2016 16:07
ahhhh ok
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:07
@flindip Oh, I see what you mean. Session Time is perfect, but the Break time is not breaking at 0.
Stephen James
@sjames1958gm
Aug 22 2016 16:07
@WesSchulte Just pick anyone, I used my favorite band.
Giacomo Caruso
@GiacomoCaruso
Aug 22 2016 16:07
Hey folks! Anyone with experience in using MaterializeCSS? I have a cross-browser issue with the CSS of my search input. On Google Chrome looks fine but on all the other browsers I tested the word "City" is way too much on the right. Is it a problem of Materialize or is it me? How could I fix it?
http://codepen.io/giacomo_caruso/pen/QEPVaL
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:08
@WesSchulte yes anyone, Morty, Rick, Naruto, Mr Robot anyone :)
flindip
@flindip
Aug 22 2016 16:08
@KoniKodes yeah its doing some odd thing. I'm messing with the minute converter. Seeing if that may be the cause
Wesley Schulte
@WesSchulte
Aug 22 2016 16:08
@AlexanderDom rick and morty, morty and rick, for 1000 years
flindip
@flindip
Aug 22 2016 16:09
@KoniKodes pretty sure its not syntax issue
Dale
@dwhale84
Aug 22 2016 16:09
@AlexanderDom thanks for clearing that up for me. Now that I've undone that damage, I still am no closer to getting the button to actually work
CamperBot
@camperbot
Aug 22 2016 16:09
dwhale84 sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 353 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:10
@dwhale84 yes we gonna help you :)
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:11
@flindip Yes, it seems to be the same for each, so that doesn't make sense. I'm going to fork it for a closer look.
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:11
@WesSchulte Yeah
Dale
@dwhale84
Aug 22 2016 16:12
@AlexanderDom ok. so I tried to make an onclick function that would change the text into URI code, then append that to the end of the twitter link. I think that part makes sense, but I can't really test it because the button isn't doing anything when clicked
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:14
@dwhale84 for me i made a <a target="_blank" href with https://twitter.com/intent/tweet that change
?text="+textForTweeter); at the end
Susan
@SusanGrattan
Aug 22 2016 16:14
Can someone give me a little nudge on the Twitch TV app? I'm confused as to how to pull the logos for the users who aren't online. And also confused as to why my logos don't work. I know some of them are undefined but the ones who are online should work. http://codepen.io/SusanGrattan/pen/PzvqwA
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:14
where i change textForTweeter at the end
flindip
@flindip
Aug 22 2016 16:15

@KoniKodes I'm thinking it has something to do with the breakNumbers *=60;

I took that out and it seemed to run the original 5 second countdown fine.

Dale
@dwhale84
Aug 22 2016 16:16
@AlexanderDom ok, that's basically what I had earlier. I came here earlier because my anchor element wasn't clickable without a defined href, and it was suggested that I should turn it into a button. I did, and now I can click the button, but it doesn't lead to anything
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:16
@flindip It is good now? I was looking at breakNumbers +=5;
greg
@wearenotgroot
Aug 22 2016 16:16
@SusanGrattan appending the html you build should happen inside the $.getJSON callback($.getJSON is asynchronous, response from the api is not guaranteed to arrive immediately)
$(document).ready(function() {
  var userNames = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];
  var userName, userLogo;
  var iconOn = "mega-octicon octicon-check";
  var iconOff = "mega-octicon octicon-x";
  var online = false;
  for (var i = 0; i < userNames.length; i++) {
    console.log(userNames[i]);
    $.getJSON('https://api.twitch.tv/kraken/streams/' + userNames[i] + '?callback=?', function(data) {
      userLogo = data.stream.channel.logo;
      console.log(userLogo);
      console.log(data);

      $(".content").append(
      '<div><img src="' + userLogo + '"><h4>' + userNames[i] + '</h4><span class="' + iconOff + '"></span></div>'
      );
    }); // end JSON


}

}); // end doc ready
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:16
@dwhale84 wait i gonna see for that one
Dale
@dwhale84
Aug 22 2016 16:17
@AlexanderDom I changed it back to what I had just now
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:18
@dwhale84 I'm sorry that was my fault. But I still think it should be a button because it is easier for the user to recognize.
Dale
@dwhale84
Aug 22 2016 16:18
@KoniKodes that makes sense. just need to get the functionality down
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:19
@KoniKodes with bootstrap you can add btn btn-defaultto <a hreftoo :)
greg
@wearenotgroot
Aug 22 2016 16:19
@SusanGrattan Note! only those you are streaming will be displayed on the page
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:19
actually you go to a new page so it's link role
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:19
@dwhale84 I sent you a private message. Did you get it?
Dale
@dwhale84
Aug 22 2016 16:20
@KoniKodes ah, yeah, sorry, missed that
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:20
if you try to open new page you can be blocked by browser i think
with javascript i mean
Unknown
@Unknownhezipaz
Aug 22 2016 16:20
https://codepen.io/majedmahmood23/pen/NAzoQb my protfolio part of the page is not streching so it is making the contents on that part of the page overlap
Susan
@SusanGrattan
Aug 22 2016 16:21
@wearenotgroot I was just told earlier to move my append out of the JSON function. =\ I'm utterly confused.
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:21
@dwhale84 What is encodeURI?
Dale
@dwhale84
Aug 22 2016 16:22
it changes a string into URL code
at least I thought it did
so that spaces are %20, etc
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:22
Susan
@SusanGrattan
Aug 22 2016 16:22
@wearenotgroot How do I go about getting it to display all of the users whether they are currently streaming or not
and thank you for your help so far @wearenotgroot
CamperBot
@camperbot
Aug 22 2016 16:23
susangrattan sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1424 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Dale
@dwhale84
Aug 22 2016 16:23
@AlexanderDom yeah, this is where I started this tweet button odyseey
odyssey
greg
@wearenotgroot
Aug 22 2016 16:23
@SusanGrattan you need to make another $.getJSON call to the api with /channel instead of /streams on the url
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:23
^^ ok
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:23
@dwhale84 I expected to see a var for it. But only because I am not familiar with that.
Susan
@SusanGrattan
Aug 22 2016 16:23
Thanks! @wearenotgroot
CamperBot
@camperbot
Aug 22 2016 16:23
:warning: susangrattan already gave wearenotgroot points
susangrattan sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:24
@wearenotgroot Thank you. You helped me understand those pesky streams when I was in the middle of it, too.
CamperBot
@camperbot
Aug 22 2016 16:24
konikodes sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1425 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Aug 22 2016 16:24
@KoniKodes :smile:
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:28
@dwhale84 while (entry === currentEntry); risk to not work
greg
@wearenotgroot
Aug 22 2016 16:28
@SusanGrattan you should test for (inside the callback function of the $.getJSON, /streams)
if(data.stream === null){

          //offline
         //do another $.getJSON call using /channel to get channel info
}
else
{
           //online
           //build html and append
           //to display
}
Alexander Domikov
@AlexanderDom
Aug 22 2016 16:35
see you all, good code everybody
greg
@wearenotgroot
Aug 22 2016 16:35
@AlexanderDom :wave:
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:35
@AlexanderDom Have a good one
flindip
@flindip
Aug 22 2016 16:38

@wearenotgroot Greg, I commented out the numbers=60, and breakNumbers=60. You can see the functionality is working. The minute converter for numbers is fine(if you remove the comments). But, breakNumbers is all messed up.

is it because line 14 beginBreak variable need to be in the breakTime function?

http://codepen.io/flindip/pen/zBXZEj

greg
@wearenotgroot
Aug 22 2016 16:39
This message was deleted
Muhammad Hasham
@MohammadHasham
Aug 22 2016 16:40
how can i search for duplicates in an array?using loops?
@KoniKodes
greg
@wearenotgroot
Aug 22 2016 16:40
@flindip i wrote some comments and move things a bit, like the declaration of functions
flindip
@flindip
Aug 22 2016 16:41
@wearenotgroot I'm just curious, is it scope issue thats garbling it?
greg
@wearenotgroot
Aug 22 2016 16:41
@flindip i think the issue was also that you keep multiplying breakNumber by 60
@flindip each time the interval execute the breakTime function
@flindip that is why you convert it first before triggering the interval
flindip
@flindip
Aug 22 2016 16:43
@wearenotgroot ty for the code btw. Weird, I thought I was just using the same modelo pattern like I did with the numbers variable
CamperBot
@camperbot
Aug 22 2016 16:43
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: flindip already gave wearenotgroot points
Muhammad Hasham
@MohammadHasham
Aug 22 2016 16:43
 for (var i=1;i<fery.length;i++)
    {
      if (fery.indexOf(i) >0)
        {
          arr.push(i);
        }
    }
  return arr
is this the right way?
Unknown
@Unknownhezipaz
Aug 22 2016 16:45
do you guys know any good domain and hosting websites
greg
@wearenotgroot
Aug 22 2016 16:46
@flindip do you have the code now, can i delete it to clean up the chat?
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:46
@MohammadHasham No. Use an filter function with an if statement to compare the values of both arrays (indexOf)
greg
@wearenotgroot
Aug 22 2016 16:47
@flindip I'll just send it to you in pm
Muhammad Hasham
@MohammadHasham
Aug 22 2016 16:47
@KoniKodes okay
Thanls
Thanks @KoniKodes
CamperBot
@camperbot
Aug 22 2016 16:47
mohammadhasham sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave konikodes points
flindip
@flindip
Aug 22 2016 16:48
@wearenotgroot yeah I got it
greg
@wearenotgroot
Aug 22 2016 16:48
:+1:
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:48
@majedmahmood27 I like cheapdomain . com - but I've been with them for years. I've been told that you can be hosted at your repository on GitHub. And of course, codepen is a help.
@MohammadHasham Good luck, and do check out the videos I mentioned. I promise it will all come together eventually.
greg
@wearenotgroot
Aug 22 2016 16:51
@SusanGrattan you wanted to access the links if the channel is not streaming?
@SusanGrattan with undescore on the links(_links)
data._links.channel
Dale
@dwhale84
Aug 22 2016 16:51
after much googling, I think I've got it. thanks for your help @KoniKodes and @AlexanderDom
CamperBot
@camperbot
Aug 22 2016 16:51
dwhale84 sends brownie points to @konikodes and @alexanderdom :sparkles: :thumbsup: :sparkles:
:warning: dwhale84 already gave konikodes points
:warning: dwhale84 already gave alexanderdom points
Susan
@SusanGrattan
Aug 22 2016 16:51
Haha, thanks! I was just wondering if I needed that underscore there.. @wearenotgroot
CamperBot
@camperbot
Aug 22 2016 16:51
susangrattan sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: susangrattan already gave wearenotgroot points
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:54
@dwhale84 Thank you for the brownies :-) I'm glad it came together for you.
CamperBot
@camperbot
Aug 22 2016 16:54
konikodes sends brownie points to @dwhale84 :sparkles: :thumbsup: :sparkles:
:cookie: 263 | @dwhale84 |http://www.freecodecamp.com/dwhale84
Unknown
@Unknownhezipaz
Aug 22 2016 16:55
@KoniKodes oh okay thanks.Also I need help with my portfolio page im having alot of problems
CamperBot
@camperbot
Aug 22 2016 16:55
majedmahmood27 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @konikodes |http://www.freecodecamp.com/konikodes
Toni Shortsleeve
@KoniKodes
Aug 22 2016 16:55
@majedmahmood27 what is the codepen?
flindip
@flindip
Aug 22 2016 17:03

@wearenotgroot Greg, I plugged the code you gave into a forked copy of the project. But it doesn't seem to be functioning. The buttons seem to be dead..

https://codepen.io/flindip/pen/zBXZEj

greg
@wearenotgroot
Aug 22 2016 17:05
@flindip it cut off the $ on $(document) :)
Wesley Schulte
@WesSchulte
Aug 22 2016 17:05
im struggling to add an image to my tribute page. is it not smart to use an image from google?
Toni Shortsleeve
@KoniKodes
Aug 22 2016 17:05
@majedmahmood27 Your images need to be on a secure site, otherwise you may experience a cross-origin problem. I would suggest something like https://postimg.org/ . It's free and hasn't crashed on me yet, however it will not accept copyright material such as wiki logos.
Because it looks like English is not your native language, I would strongly suggest creating a free account on www.grammarly.com to help with your grammar errors.
On codepen, you may want to add a viewport meta in the html heading, and add bootstrap (to help with your navigation) to the css sections from the Settings at the top right of the codepen page.
Jason Luboff
@JLuboff
Aug 22 2016 17:06
@WesSchulte Its best to host your own. I host mine through photobucket.com
flindip
@flindip
Aug 22 2016 17:06
@wearenotgroot LOL
Jason Luboff
@JLuboff
Aug 22 2016 17:06
A lot of times an website will not allow external linking (like imgur)
Wesley Schulte
@WesSchulte
Aug 22 2016 17:06
@JLuboff thanks mate!
CamperBot
@camperbot
Aug 22 2016 17:06
wesschulte sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 299 | @jluboff |http://www.freecodecamp.com/jluboff
flindip
@flindip
Aug 22 2016 17:06
@wearenotgroot Ty Greg for your time. I appreciate. I'm probably going to move onto the tic toe thing
CamperBot
@camperbot
Aug 22 2016 17:06
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1426 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Aug 22 2016 17:07
@flindip You're Welcome :smile:
flindip
@flindip
Aug 22 2016 17:07
@wearenotgroot I won't turn this stuff in for a while though. I wanna get rough drafts off all the last projects first. So I can play with the code.
greg
@wearenotgroot
Aug 22 2016 17:08
@flindip well you can turn it in and you can still update it, they only need the links.
Unknown
@Unknownhezipaz
Aug 22 2016 17:10
@KoniKodes how comes my portfolio part of the body I cannot strectch as the thumbnails wont fit
flindip
@flindip
Aug 22 2016 17:10
@wearenotgroot I'm curious, do they still check the projects or is that only when they assign you to the non profits down the road?
greg
@wearenotgroot
Aug 22 2016 17:10
@SusanGrattan I think someone reviews it
Sorin Ruse
@sorinr
Aug 22 2016 17:11
@KoniKodes hi. welcome back
flindip
@flindip
Aug 22 2016 17:11
@wearenotgroot I had hell of a time with the algorithms. I figured I needed to get Eloquent Javascript because that stuff a lot of the algorithms went over my head.
@wearenotgroot So, my next step is to just read through that and fine tune my weak points with JS
greg
@wearenotgroot
Aug 22 2016 17:13
@flindip sounds like a plan :+1:
Egarat
@egarat
Aug 22 2016 17:13
Hello everybody, I just finished my tribute page project. I would really appreciate, if someone could take the time and give me a feedback what I could do better. :smile: http://http://codepen.io/egarat/pen/xOZXbj
flindip
@flindip
Aug 22 2016 17:13
@wearenotgroot yep, well I'm off. Thanks again
CamperBot
@camperbot
Aug 22 2016 17:13
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: flindip already gave wearenotgroot points
Dave Sayer
@luxumbra
Aug 22 2016 17:13
Anyone about for a bit of jQuery help?
greg
@wearenotgroot
Aug 22 2016 17:14
Egarat
@egarat
Aug 22 2016 17:15
will do that, thanks @wearenotgroot
CamperBot
@camperbot
Aug 22 2016 17:15
egarat sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1427 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Jason Luboff
@JLuboff
Aug 22 2016 17:15
@luxumbra Whats the question?
greg
@wearenotgroot
Aug 22 2016 17:20
@SusanGrattan A suggestion, you can create a function for displaying(appending the html that you build) the channel info. this way you can just call it whenever you want and just supply it with proper arguments. This also saves you from rewriting
function display(username, logo, icon){

   $(".content").append(
      '<div><img src="' + logo + '" class="logo"><h4>' + username + '</h4><span class="' + icon + '"></span></div>'
      );
 }
Susan
@SusanGrattan
Aug 22 2016 17:22
Thanks @wearenotgroot I'll do that. I'm having issues with the online users being shown twice. So I'll see if that helps
CamperBot
@camperbot
Aug 22 2016 17:22
susangrattan sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: susangrattan already gave wearenotgroot points
greg
@wearenotgroot
Aug 22 2016 17:23
@SusanGrattan you need to move that append inside that else if. Right now it's triggering on both
Wesley Schulte
@WesSchulte
Aug 22 2016 17:25
how do i share my tribute page on here for you beautiful people to check out its code?
Sorin Ruse
@sorinr
Aug 22 2016 17:25
@WesSchulte copy paste codepen link
Wesley Schulte
@WesSchulte
Aug 22 2016 17:25
its html one?
Susan
@SusanGrattan
Aug 22 2016 17:25
@wearenotgroot I fixed it. I just called the display function inside the if else =]
greg
@wearenotgroot
Aug 22 2016 17:25
@SusanGrattan uhmm you need to declare that function outside the for loop
Susan
@SusanGrattan
Aug 22 2016 17:26
@wearenotgroot Why? it works.
greg
@wearenotgroot
Aug 22 2016 17:27
@SusanGrattan it looks cleaner that way :smile: also name some function parameters
Susan
@SusanGrattan
Aug 22 2016 17:28
Yes sir
Muhammad Hasham
@MohammadHasham
Aug 22 2016 17:28
How can i get wiki for symmetric difference?
@SusanGrattan
@sorinr
Sorin Ruse
@sorinr
Aug 22 2016 17:30
@MohammadHasham what do you mean?
Dave Sayer
@luxumbra
Aug 22 2016 17:30
@JLuboff Sorry man, I didn’t see your reply. I’ve got a nav on a site im building and have got a gradient running down the top level items using a function to apply tints per item but I can’t seem to apply thi same principal to the child items, so they have their own gradient
Muhammad Hasham
@MohammadHasham
Aug 22 2016 17:30
there is a wiki avaialbe by fcc for every challenge how can i get that
@sorinr
Dave Sayer
@luxumbra
Aug 22 2016 17:31
@JLuboff http://ipsamedical.crafted.im/ - is the site in question
Sorin Ruse
@sorinr
Aug 22 2016 17:31
@MohammadHasham try help symmetric difference
help format
CamperBot
@camperbot
Aug 22 2016 17:31
no wiki entry for: format
Muhammad Hasham
@MohammadHasham
Aug 22 2016 17:31
help symmetric difference
CamperBot
@camperbot
Aug 22 2016 17:32
no wiki entry for: symmetric difference
Sorin Ruse
@sorinr
Aug 22 2016 17:32
help wiki
CamperBot
@camperbot
Aug 22 2016 17:32
no wiki entry for: wiki
Muhammad Hasham
@MohammadHasham
Aug 22 2016 17:32
help Symmetric Difference
CamperBot
@camperbot
Aug 22 2016 17:32
no wiki entry for: symmetric difference
Sorin Ruse
@sorinr
Aug 22 2016 17:32
@MohammadHasham it seems that camperbot is trolling :)
Jason Luboff
@JLuboff
Aug 22 2016 17:33
@luxumbra Ah...thats a little beyond my jQuery experience..sorry :worried:
greg
@wearenotgroot
Aug 22 2016 17:33
@SusanGrattan :+1:
Muhammad Hasham
@MohammadHasham
Aug 22 2016 17:33
@sorinr can you help me with this challenge
Sorin Ruse
@sorinr
Aug 22 2016 17:35
@MohammadHasham not right now coz i had to go. i don't even remember that challenge
Muhammad Hasham
@MohammadHasham
Aug 22 2016 17:35
@sorinr Okay :smile:
Dave Sayer
@luxumbra
Aug 22 2016 17:36
@JLuboff no worries, thanks for taking the time to respond
CamperBot
@camperbot
Aug 22 2016 17:36
:cookie: 300 | @jluboff |http://www.freecodecamp.com/jluboff
luxumbra sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
Felipe Joglar
@fjoglar
Aug 22 2016 17:50
Hi campers, maybe you could help me. I can't make work my local weather app on codepen but it works perfectly on localhost in my computer. anyone knows how to solve this issue?
Jason Luboff
@JLuboff
Aug 22 2016 17:51
@fjoglar Are you connecting with codepen over http or https?
If https, change to http and see if it works then
Felipe Joglar
@fjoglar
Aug 22 2016 17:52
tried both and nothing...
Jason Luboff
@JLuboff
Aug 22 2016 17:52
post your codepen?
Jason Luboff
@JLuboff
Aug 22 2016 17:53
If I change to: http://codepen.io/fjoglar/pen/vKPoXA it works. If you're using Chrome, it won't work though
Felipe Joglar
@fjoglar
Aug 22 2016 17:56
ok thanks @JLuboff !! so this may be an issue with chrome, i've tried with firefox and, as you say, it works. Thanks!
CamperBot
@camperbot
Aug 22 2016 17:56
fjoglar sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 301 | @jluboff |http://www.freecodecamp.com/jluboff
Jason Luboff
@JLuboff
Aug 22 2016 17:57
@fjoglar Yup, Chrome doesn't allow http connections. You'll have to use a proxy like https://crossorigin.me to have it function through chrome (you append that url to the beginning of your openweathermap url and then connect to codepen via https)
Jayesh Bhatia
@Jay-20
Aug 22 2016 18:32
Can someone please tell me what is a placehoder and how to use it in your portfolio challenge?
greg
@wearenotgroot
Aug 22 2016 18:34
@Jay-20 placeholder for images?
Jason Luboff
@JLuboff
Aug 22 2016 18:36
@Jay-20 A placeholder is just an image/text/whatever that takes the place for future content
I.e An image that says "Future content coming..."
Jayesh Bhatia
@Jay-20
Aug 22 2016 18:38
okay so is it okay if we left it as blank for now and later add image/text ?@JLuboff
Jason Luboff
@JLuboff
Aug 22 2016 18:39
@Jay-20 Sure...although I'd advice to still have something there..maybe some text to indicate that there will be something there later
Stanley Griggs II
@ST215
Aug 22 2016 18:41
Hello
Jayesh Bhatia
@Jay-20
Aug 22 2016 18:41
@JLuboff Okay thanks a lot!
CamperBot
@camperbot
Aug 22 2016 18:41
jay-20 sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @jluboff |http://www.freecodecamp.com/jluboff
Stanley Griggs II
@ST215
Aug 22 2016 18:42
Anyone have a second to look over my Tribute page source. I really trying not to cheat. I need help with nesting my divs to get bullet points centered correctly and the white space around the image and text under it.
Joffrey Nolting
@Yovvel
Aug 22 2016 18:43
can you send the link?
Islam Ibakaev
@dagman
Aug 22 2016 18:44
i am a bit confusing with material-ui.
Should i install it as dependency or devDependecy ?
Stanley Griggs II
@ST215
Aug 22 2016 18:46
Joffrey Nolting
@Yovvel
Aug 22 2016 18:47
thanks one moment please
Stanley Griggs II
@ST215
Aug 22 2016 18:47
My plan was to match the sample as much as possible before adding my extra sauce.
Joffrey Nolting
@Yovvel
Aug 22 2016 18:47
thats a great start
Stanley Griggs II
@ST215
Aug 22 2016 18:47
Thanks @Yovvel
CamperBot
@camperbot
Aug 22 2016 18:47
st215 sends brownie points to @yovvel :sparkles: :thumbsup: :sparkles:
:cookie: 143 | @yovvel |http://www.freecodecamp.com/yovvel
Joffrey Nolting
@Yovvel
Aug 22 2016 18:47
your first line you can delete by the way
in codepen it is not needed
and in settings you can add the css bootstrap
just a few small things
Stanley Griggs II
@ST215
Aug 22 2016 18:49
Removed and Added
The HTML linter added that first line. I would have caught that using git.
Joffrey Nolting
@Yovvel
Aug 22 2016 18:50
it could be, not a big problem
i am looking at your list now
ttimon
@ttimon
Aug 22 2016 18:50
Hello everybody, quick question. I am doing the weather app challenge. And I have this so far: http://codepen.io/ttimon/pen/QEPZJW?editors=1111
just a question out of curiosity: is there a better way how I can make it show the weather immediately after I load the page. It works, but I feel it isn't right.
Reggie
@Reggie01
Aug 22 2016 18:53
@dagman I read this SO on dependency v. dev-dependencies. I think material-ui is a dependency.
Joffrey Nolting
@Yovvel
Aug 22 2016 18:55
@ST215 i have found the problem
Stanley Griggs II
@ST215
Aug 22 2016 18:55
Excellent! I appreciate the help and learning. Did I nest something wrong?
Does codepen have revision control like github?
Joffrey Nolting
@Yovvel
Aug 22 2016 18:56
@ST215 you have centered all the text in your body, so your list will do the same, center in the page. to solve this, you add a new <div> around your list
Jason Boxman
@jboxman
Aug 22 2016 18:56
@ttimon I get excepts on XMLHttpRequest in Opera/Chrome
Joffrey Nolting
@Yovvel
Aug 22 2016 18:56
you start use <div align="left"> so everything you place under this div will be aligned to the left
  <div align="left">
    <ul>
      <li>1918 - Born to Joshua and Joylette Coleman in White Sulphur Springs,
        Greenbrier County, West Virginia.</li>                
    </ul>
  </div>
Islam Ibakaev
@dagman
Aug 22 2016 18:58
@Reggie01 thx for help :smile:
CamperBot
@camperbot
Aug 22 2016 18:58
dagman sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @reggie01 |http://www.freecodecamp.com/reggie01
Stanley Griggs II
@ST215
Aug 22 2016 18:58
hand on face it's always something simple. @Yovvel I appreciate the code review I will pay it forward when I can!
Joffrey Nolting
@Yovvel
Aug 22 2016 18:58
np love to help.
Stanley Griggs II
@ST215
Aug 22 2016 18:58
@Yovvel Thanks!
CamperBot
@camperbot
Aug 22 2016 18:58
st215 sends brownie points to @yovvel :sparkles: :thumbsup: :sparkles:
:warning: st215 already gave yovvel points
Stanley Griggs II
@ST215
Aug 22 2016 18:59
@Yovvel Outside of that issue how am I looking? I know I need to get some items in the CSS File
Joffrey Nolting
@Yovvel
Aug 22 2016 18:59
when helping others, i see other code which help me read code what i didn't write and this makes me better too, so we both get better this way
@ST215 it is looking good. you only miss a dot with the ul class in you css section
you need .ul {...
instead of ul{...
but gtg
bye!
and good luck
vincentwue
@vincentwue
Aug 22 2016 19:16
how to open twitter with custom text to tweet? its always just the url :X
Alexander Domikov
@AlexanderDom
Aug 22 2016 19:18
@VincentWue look here
vincentwue
@vincentwue
Aug 22 2016 19:19
@AlexanderDom thx
CamperBot
@camperbot
Aug 22 2016 19:19
vincentwue sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 354 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Alexander Domikov
@AlexanderDom
Aug 22 2016 19:20
@VincentWue you're welcome
vincentwue
@vincentwue
Aug 22 2016 19:21
2 secs and ready, just blind
Justin Scoggin
@jscogg
Aug 22 2016 19:50

Hey @all. I need some jQuery help. I'm just trying to get the box to change shades each time the button is clicked. Right now, it changes once and then stops. I need it to keep going!

http://codepen.io/anon/pen/GqamZJ

Ideas:question:

Ajay Tanwar
@ajayt365
Aug 22 2016 19:58
https://codepen.io/ajayt365/full/RRYOdk/ . on web it's working fine but on phone , there is no data about the city. only loading data is there in the box . can anyone help out? ?
Juan Sierra
@juan-sierra
Aug 22 2016 20:06
hello guys need help with making text responsive
Alexander Domikov
@AlexanderDom
Aug 22 2016 20:11
@jasierragarcia tell us
Juan Sierra
@juan-sierra
Aug 22 2016 20:13
Screen Shot 2016-08-22 at 4.12.15 PM.png
hi @AlexanderDom this is the issue I’m having
the top text is being hidden when I make the window smaller
Alexander Domikov
@AlexanderDom
Aug 22 2016 20:16
you need to make your text 100% wide or reduce his font-size
did you have your code online on codepen or somewhere else ?
Juan Sierra
@juan-sierra
Aug 22 2016 20:18
got it thanks, just need to make the text 100% wide
Dranaxel
@Dranaxel
Aug 22 2016 20:20
Hello
Alexander Domikov
@AlexanderDom
Aug 22 2016 20:22
@Dranaxel hello
Dranaxel
@Dranaxel
Aug 22 2016 20:28
I'm experimenting some trouble trying to beat the local weather challenge, can someone help me a little bit ? :)
Jason Luboff
@JLuboff
Aug 22 2016 20:29
@Dranaxel Post up your question
Dranaxel
@Dranaxel
Aug 22 2016 20:30
I'm using getJson() to get the information from OWM
But i keep getting the error "server can't find any correspondance for the URI requested"
Jason Luboff
@JLuboff
Aug 22 2016 20:31
Did you get an API key and append it to your URL?
If you can post your codepen too that is always helpful
Dranaxel
@Dranaxel
Aug 22 2016 20:32
Ha yes you're right, sorry ^^"
The url I use is good, I get a result when i past it in my navigator
the design is still in progress ^^'
Jason Luboff
@JLuboff
Aug 22 2016 20:33
add http:// to the beginning of your URL
Dranaxel
@Dranaxel
Aug 22 2016 20:34
Great :D
Thanks @JLuboff
CamperBot
@camperbot
Aug 22 2016 20:34
dranaxel sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @jluboff |http://www.freecodecamp.com/jluboff
Jason Luboff
@JLuboff
Aug 22 2016 20:40
:+1:
Fahrettin Can Mekikoğlu
@fcanmekikoglu
Aug 22 2016 20:42
hi people
Stephen James
@sjames1958gm
Aug 22 2016 20:42
@fcanmekikoglu Hello
Juwdohr
@Juwdohr
Aug 22 2016 20:43
hey trying to put a footer on page but it keeps showing up halfway through the page when I use position: absolute;. Shows how I want it when nothing is on the page, but then I add things in and it doesn't adjust down. Any idea why this is happening?
Fahrettin Can Mekikoğlu
@fcanmekikoglu
Aug 22 2016 20:43
anyone using visual studio 2015 for this portfolio webpage?
im having a really hard time
which program are you people using?
LPR-309
@LPR-309
Aug 22 2016 20:46
@Juwdohr position: absolute ignores any other elements on the page, so adding other elements in won't shift the footer at all
might need to use a different value
Juwdohr
@Juwdohr
Aug 22 2016 20:48

@LPR-309 your thinking fixed. From w3schools.com:
"position: absolute;
An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed).

However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.

Note: A "positioned" element is one whose position is anything except static."

Nabil
@nsayeed
Aug 22 2016 20:51
Hi, I am currently trying to create my personal portfolio page, I want to be able to use the social media buttons with bootstrap and I have included (https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css) under settings in codepen however when I used the class "btn-facebook" there are no changes. If anyone knows where I am going wrong please let me know. My codepen link is https://codepen.io/nsayeed/pen/VjNVXK
LPR-309
@LPR-309
Aug 22 2016 20:54
@Juwdohr Ah, you're right. Still, adding anything that isn't a parent shouldn't affect the position of it. Is it just inside body? Hopping up to the middle of the page by itself seems strange.
Juwdohr
@Juwdohr
Aug 22 2016 20:57
@nsayeed need to add in an <i> tag with class="fa fa-something" where something is you'll need to look at font awesomes icon section and find the right wording.
Nabil
@nsayeed
Aug 22 2016 20:57
@fcanmekikoglu I am just using codepen and I am finding it really difficult, think ive spent more time researching on how to do things/what things mean rather than actually coding
Juwdohr
@Juwdohr
Aug 22 2016 20:57
@LPR-309 here is the page I am working on.
http://codepen.io/Rainelishes/pen/yOjEvN
@nsayeed also make sure your links are correct and in the gear if your putting it into the HTML section your adding it to the body of the document.
LPR-309
@LPR-309
Aug 22 2016 20:59
@Juwdohr body { postion: relative; } That's probably what's doing it.
Juwdohr
@Juwdohr
Aug 22 2016 20:59
@LPR-309 no that was an attempt to fix it. but it didn't work.
Nabil
@nsayeed
Aug 22 2016 21:02
@Juwdohr Ahh thank you! Got it working
CamperBot
@camperbot
Aug 22 2016 21:02
nsayeed sends brownie points to @juwdohr :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @juwdohr |http://www.freecodecamp.com/juwdohr
Juwdohr
@Juwdohr
Aug 22 2016 21:03
@LPR-309 take a look at it now. Cuase that part I removed and it's still doing the same thing.
quasarjohn
@quasarjohn
Aug 22 2016 21:05
Hi, I need help with creating a user story. Can I use any user story for my sample website?
Wesley Schulte
@WesSchulte
Aug 22 2016 21:19
@quasarjohn yeah! i picked rick and morty lol
LPR-309
@LPR-309
Aug 22 2016 21:21
@Juwdohr Unsure, honestly. I think it's acting as intended since it's scrolling with the page and the initial position is on page load. relative always keeps it at the bottom of the document and fixed keeps it within view, though. Sorry I can't be of more help
Wesley Schulte
@WesSchulte
Aug 22 2016 21:24
This message was deleted
well shit that didnt work lol
how do i put my code pen on here
Jason Luboff
@JLuboff