These are chat archives for FreeCodeCamp/HelpFrontEnd

23rd
Sep 2016
Monesul Haque
@mones-cse
Sep 23 2016 00:00
.
.
.
    weather = json.weather[0].main;
    setBackground();
    $("#estado").html(weather);
 .
.
.
Ken Haduch
@khaduch
Sep 23 2016 00:00
@zarruk - I made a few changes in my open copy of your project and got it to work:
  • remove the <body code from your HTML. (CodePen already puts a separate body tag in there from the template - I didn't know if that would cause a conflict with your attempt to use it again?)
  • add a css body { background-color: black; }
  • change your code to set the background to this:
    function setBackground(){
    if (true || weather == "Clouds"){
      $("body").css("background-image", "url(http://www.familyandhome.org/sites/g/files/g20561/f/clouds.jpg)")
    }
    }
    adding the true || to make sure that it attempted to load that image, not being sure if the weather would be "Clouds" or not. And use the body element directly.
@zarruk - you would want to remove that true || after you had all of the other cases covered in the different types of weather.
Salomon
@zarruk
Sep 23 2016 00:04
@mones-cse Ok yes, you're right. Now I'm assigning a value to var weatherinside the getCoords()function. Why isn't it still working?
Monesul Haque
@mones-cse
Sep 23 2016 00:05
This message was deleted
Salomon
@zarruk
Sep 23 2016 00:06
@mones-cse in fact, as soon as I define var weatherinside getCoords(), the values inside my page disappear. You know what I mean?
Monesul Haque
@mones-cse
Sep 23 2016 00:06
@zarruk ok 1 min
Salomon
@zarruk
Sep 23 2016 00:07
@mones-cse but anyways weatheris already defined in getWeather()function, so I dont understand why would it be undefined
@mones-cse Sorry, I saw my mistake in my second-to-last message. Please ignore it.
Amirul Asraf
@apie08
Sep 23 2016 00:09
Good job @zarruk
Salomon
@zarruk
Sep 23 2016 00:10
@apie08 thanks!
CamperBot
@camperbot
Sep 23 2016 00:10
zarruk sends brownie points to @apie08 :sparkles: :thumbsup: :sparkles:
:cookie: 25 | @apie08 |http://www.freecodecamp.com/apie08
Monesul Haque
@mones-cse
Sep 23 2016 00:11
@zarruk your problem solved ?
Salomon
@zarruk
Sep 23 2016 00:12
@mones-cse No. Background is still black :worried:
Monesul Haque
@mones-cse
Sep 23 2016 00:12
give me current codepen link
Monesul Haque
@mones-cse
Sep 23 2016 00:14
there is no "general" class in your html section
Salomon
@zarruk
Sep 23 2016 00:17
http://codepen.io/zarruk/pen/dpNyOj?editors=1000 @mones-cse now there is and still
Monesul Haque
@mones-cse
Sep 23 2016 00:17

add

<body class="general">

and add

setBackground();

after when you get wether value

weather = json.weather[0].main;
@zarruk now is it working?
Salomon
@zarruk
Sep 23 2016 00:20
@mones-cse how would you do it?
I dont get it
Monesul Haque
@mones-cse
Sep 23 2016 00:20
This message was deleted
in js file read 19 number line
@zarruk if you still have any problem tell me
Salomon
@zarruk
Sep 23 2016 00:25
@mones-cse oh thanks youre a genious
CamperBot
@camperbot
Sep 23 2016 00:25
zarruk sends brownie points to @mones-cse :sparkles: :thumbsup: :sparkles:
:warning: zarruk already gave mones-cse points
Monesul Haque
@mones-cse
Sep 23 2016 00:26
@zarruk did you understand where was the problem ?
Salomon
@zarruk
Sep 23 2016 00:27
yes, the function was executed before the variable was defined, right? @mones-cse
Monesul Haque
@mones-cse
Sep 23 2016 00:27
yes you got it :)
Salomon
@zarruk
Sep 23 2016 00:29
@mones-cse :smile: :+1:
Amirul Asraf
@apie08
Sep 23 2016 00:34
good job @mones-cse
Monesul Haque
@mones-cse
Sep 23 2016 00:35
:smile:
Stephen Suratos
@stephenfs
Sep 23 2016 00:48
function greeting(){

  if( inAmerica ){
    return "Good evening ya'll!";
  }else {
    return "Howdy everybody!";
  }

}
Abdulrahman Alhadhrami
@alhadhrami
Sep 23 2016 01:26
I'm trying to do the Local Weather project. I use https to get geolocation, but now I can't call the Open weather API because it's not https. What should I do?
Kevin Mulligan
@kmulligan
Sep 23 2016 01:45
@alhadhrami Hmmm yea just noticed my old project isn't working anymore
Vincent Simone
@vmsimone
Sep 23 2016 01:47
Hello friends, I'm having trouble getting jQuery to work in CodePen. My syntax looks fine, but nothing is happening
$(document).ready(function() {
$("button").click(function(){
$(".qbox").css({"background-color": "blue"});
});
});
(Also, let me know if I'm in the wrong chatroom)
Santiago Fernandez
@sf-jd
Sep 23 2016 01:49
@jackuhlantern did you enable jquery in codepen?
Santiago Fernandez
@sf-jd
Sep 23 2016 01:49
click on the gear icon, and in the bottom dropdown for quickadd, select jquery @jackuhlantern
Vincent Simone
@vmsimone
Sep 23 2016 01:51
@sf-jd it's already on "auto-run"
Santiago Fernandez
@sf-jd
Sep 23 2016 01:51
I didnt tell you to set auto-run
Vincent Simone
@vmsimone
Sep 23 2016 01:51
or should I turn off auto-run and set it to manual?
ah, that did it
Vincent Simone
@vmsimone
Sep 23 2016 01:52
sorry, saw the first message first
@sf-jd thank you!
CamperBot
@camperbot
Sep 23 2016 01:52
jackuhlantern sends brownie points to @sf-jd :sparkles: :thumbsup: :sparkles:
:cookie: 301 | @sf-jd |http://www.freecodecamp.com/sf-jd
Santiago Fernandez
@sf-jd
Sep 23 2016 01:52
np
Josef Saltz
@JosefSaltz
Sep 23 2016 02:16
Hola, I've got some Bootstrap that is misaligning just ever so slightly can anyone lend a hand?
Santiago Fernandez
@sf-jd
Sep 23 2016 02:18
sure @inkuplex share your code and your question
if its a codepen.io link just paste it and let me know what you need fixed
Josef Saltz
@JosefSaltz
Sep 23 2016 02:19
Sure give me a minute to get it out of the text editor to get into Codepen
@sf-jd hmm my colors aren't rendering correctly
Santiago Fernandez
@sf-jd
Sep 23 2016 02:22
lets see it, dont be shy (?)
Josef Saltz
@JosefSaltz
Sep 23 2016 02:22
nvm just redundant links in the head
Santiago Fernandez
@sf-jd
Sep 23 2016 02:22
lol k
This message was deleted
The way it's centering now doesn't make sense either the col numbers don't add up to 12
Santiago Fernandez
@sf-jd
Sep 23 2016 02:30
looking now
offset is not the way btw
Josef Saltz
@JosefSaltz
Sep 23 2016 02:31
what is the way
that's how codeschool taught it
Santiago Fernandez
@sf-jd
Sep 23 2016 02:32
thinking, 1 sec.
i hate bootstrap
Josef Saltz
@JosefSaltz
Sep 23 2016 02:32
Okay?
Santiago Fernandez
@sf-jd
Sep 23 2016 02:32
i dont like doing things with it, its 10x easier to write your own css :D
Santiago Fernandez
@sf-jd
Sep 23 2016 02:38
k
Josef Saltz
@JosefSaltz
Sep 23 2016 02:38
?
Igor Amidzic
@igoramidzic
Sep 23 2016 02:39
Can someone help me with html/css positioning?
I want the notification icon (div id="notifImg") to be in the center of the gray circle (div id="notifications")
Both vertically and horizontally.
http://codepen.io/amidzicigor/pen/RGKvGV
Thank you!
Santiago Fernandez
@sf-jd
Sep 23 2016 02:39
look at what i did @inkuplex
Josef Saltz
@JosefSaltz
Sep 23 2016 02:40
you auto'd the margins?
added some additional colum screen sizes
Santiago Fernandez
@sf-jd
Sep 23 2016 02:41
mhm
Josef Saltz
@JosefSaltz
Sep 23 2016 02:42
anything else I'm missing?
Santiago Fernandez
@sf-jd
Sep 23 2016 02:42
@amidzicigor you can add transform: translateY(25%);
i added the xs classes @inkuplex
Josef Saltz
@JosefSaltz
Sep 23 2016 02:43
right keeps the button from squirming
Santiago Fernandez
@sf-jd
Sep 23 2016 02:43
so when you rescale, it doesnt all crash towards one of the edges
:thumbsup:
Igor Amidzic
@igoramidzic
Sep 23 2016 02:43
@sf-jd Hey thanks!
CamperBot
@camperbot
Sep 23 2016 02:43
amidzicigor sends brownie points to @sf-jd :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @sf-jd |http://www.freecodecamp.com/sf-jd
Santiago Fernandez
@sf-jd
Sep 23 2016 02:43
yw
Josef Saltz
@JosefSaltz
Sep 23 2016 02:43
right
Hadouken
@Harry97
Sep 23 2016 02:44
@amidzicigor position: absolute; top: 50%; left: 50%; margin-right: -50%; transform: translate(-50%, -50%)
Santiago Fernandez
@sf-jd
Sep 23 2016 02:44
what @Harry97 is actually better lol
i just did a lazy fix :angel:
Igor Amidzic
@igoramidzic
Sep 23 2016 02:44
@Harry97 which of my current css should I remove and replace?
Aaron
@crazyxrp
Sep 23 2016 02:44
@sf-jd why you hate bootstrap?
Santiago Fernandez
@sf-jd
Sep 23 2016 02:45
but it might not work on your example
you need to set the container as relative, i think its not
and its still -25%, -25% for some reason hrm.
Hadouken
@Harry97
Sep 23 2016 02:46
@amidzicigor just remove the margin and paste the code I gave to you
Josef Saltz
@JosefSaltz
Sep 23 2016 02:46
can't seem to implement jquery.fadeIn correctly either
Hadouken
@Harry97
Sep 23 2016 02:47
guys can you please recommend some react tutorials?
I've tried multiple sources but I can't really seem to get things done
Igor Amidzic
@igoramidzic
Sep 23 2016 02:47
@Harry97 http://codepen.io/amidzicigor/pen/RGKvGV
That makes the icon go away entirely lol
Santiago Fernandez
@sf-jd
Sep 23 2016 02:47
remove the margin 0 auto
and the transformation i gave you
and add position: relative; to the container

notifications

Igor Amidzic
@igoramidzic
Sep 23 2016 02:49
@sf-jd Can you edit my codepen?
I don't think I'm doing it right
Igor Amidzic
@igoramidzic
Sep 23 2016 02:52
@sf-jd Are you using anything other than html/css? Because its not working on my site: http://utilitan.com/google/google.html
Hadouken
@Harry97
Sep 23 2016 02:53
@amidzicigor check the console
looks like something is wrong with the getting the icon in the first place
Santiago Fernandez
@sf-jd
Sep 23 2016 02:54
its there
you can see it
overlapped over the orange div lol
Hadouken
@Harry97
Sep 23 2016 02:54
@sf-jd lol u r right
Santiago Fernandez
@sf-jd
Sep 23 2016 02:55
youre not setting
notifications
as relative
told you to do it like 5 times rofl
#notifications {
position: relative;
etc
etc
etc
Igor Amidzic
@igoramidzic
Sep 23 2016 02:56
@sf-jd Aye... I knew that
@sf-jd Spank you thank you
CamperBot
@camperbot
Sep 23 2016 02:56
amidzicigor sends brownie points to @sf-jd :sparkles: :thumbsup: :sparkles:
:warning: amidzicigor already gave sf-jd points
Santiago Fernandez
@sf-jd
Sep 23 2016 02:56
lol
I guess it looks good now without but I've modified the margins manually which might not be the optimal thing to do
Santiago Fernandez
@sf-jd
Sep 23 2016 03:02
@Harry97 your previous solution was better
he was just not doing the relative/absolute thing
Hadouken
@Harry97
Sep 23 2016 03:03
@sf-jd oh, well luckily you pointed it out, since I didn't notice it :+1:
Santiago Fernandez
@sf-jd
Sep 23 2016 03:03
:D
i mean, i like your previous solution better but a friend told me to never ever go the transform way (?)
and sent me on my way to learn flexbox
lol
(which i must say makes life so much easier but duno about cross browser support)
Hadouken
@Harry97
Sep 23 2016 03:04
yeah, flexbox I never really managed to wrap my head around it
is a css built in library or what
just feels weird
isn't bootstrap meant for such work?!
Santiago Fernandez
@sf-jd
Sep 23 2016 03:05
its not a library
its an actual css module
you set display: flex and you're on your way
Hadouken
@Harry97
Sep 23 2016 03:06
why didn't FCC made it mandatory to learn it then?!
i guess theres still some browsers that dont support it full
y*
bootstrap is not mandatory, it just lets you tackle problems more quickly
Hadouken
@Harry97
Sep 23 2016 03:07
lol I was about to send you the css-tricks link
Santiago Fernandez
@sf-jd
Sep 23 2016 03:08
i mean, dunno, this lady hired me to do some updates for her clients
and she built all their sites with bootstrap
Hadouken
@Harry97
Sep 23 2016 03:08
you got me wrong I'm meant that if flexbox is that powerful why are we learning bootstrap then?
Santiago Fernandez
@sf-jd
Sep 23 2016 03:08
but i've come across some problems when updating stuff
Hadouken
@Harry97
Sep 23 2016 03:08
cuz I know flexbox is all about responsiveness
Santiago Fernandez
@sf-jd
Sep 23 2016 03:08
that require you get into the css
and ignore bootstrap
erm, bootstrap is not about responsiveness per se
flexbox is not a prefabricated solution like bootstrap
Hadouken
@Harry97
Sep 23 2016 03:09
more of a quick prototyping?
Santiago Fernandez
@sf-jd
Sep 23 2016 03:09
flexbox could be included inside bootstrap
you dont have to write anything with bootstrap, you just add the class names to your elements in the html
you do 0 css, its all been done for you
Hadouken
@Harry97
Sep 23 2016 03:10
hmm well in case you were interested there's a framework similar to boostrap called bulma that's build entirely on flexbox
Santiago Fernandez
@sf-jd
Sep 23 2016 03:11
i just love to complicate my life and do the actual writing to learn why stuff is happening :P
but imma take a look at that now
Hadouken
@Harry97
Sep 23 2016 03:12
you are definitely right about taking an organic approach and even understanding how things work under the hood It's really but I guess the only down side is that it takes time
Amit Patel
@AmitP88
Sep 23 2016 03:13
hey guys, I'm working on the media queries for my portfolio site (working on viewport 320px) and whenever I click on the scroll down button for the projects section it always goes down lower than I want it to, but on desktop view it works fine https://amitp88.github.io/New-Portfolio/
Hadouken
@Harry97
Sep 23 2016 03:13
it's really nice*
Santiago Fernandez
@sf-jd
Sep 23 2016 03:15
bottom 5% and bottom 10% on your span and buttons are the problem @AmitP88
remove those when the query hits the mobile width
Amit Patel
@AmitP88
Sep 23 2016 03:15
@sf-jd thank man, I'll try it
CamperBot
@camperbot
Sep 23 2016 03:15
amitp88 sends brownie points to @sf-jd :sparkles: :thumbsup: :sparkles:
:cookie: 306 | @sf-jd |http://www.freecodecamp.com/sf-jd
Santiago Fernandez
@sf-jd
Sep 23 2016 03:16
@Harry97 you just spot these kinda things quicker if you know where to look. Bootstrap involves removing the class and using a new one
but if youre dealing with no bootstrap css, then what do you do?
Hadouken
@Harry97
Sep 23 2016 03:18
lol you got me :D
tbh its kinda a big deal for me to land a job as a developer so I'm learning as fast as I can and really not looking back on my choices like learning bootstrap without fully understand css
Amit Patel
@AmitP88
Sep 23 2016 03:20
@sf-jd hmm, I set the bottoms of the span and buttons to zero and it didn't work
Santiago Fernandez
@sf-jd
Sep 23 2016 03:21
weird
gimme a min gonna try and fork your brank
ch
Amit Patel
@AmitP88
Sep 23 2016 03:22
ok
Santiago Fernandez
@sf-jd
Sep 23 2016 03:22
so you removed it from .scroll-btn
and from a.btn, .btn
Amit Patel
@AmitP88
Sep 23 2016 03:22
yeah, that and the a.btn, btn class that you showed me in the pic
Santiago Fernandez
@sf-jd
Sep 23 2016 03:22
weird
Amit Patel
@AmitP88
Sep 23 2016 03:23
I removed it from styles.css and set them both to 0 in the media query and it didn't work
Santiago Fernandez
@sf-jd
Sep 23 2016 03:24
no, you shouldnt remove it from styles.css
because its gonna affect your desktop version
where are you importing your media query?
nm saw it
Amit Patel
@AmitP88
Sep 23 2016 03:25
yeah, I didn't remove it at first from styles.css, but set it to zero in the query. when that didnt work I removed it from styles.css and still had it set to 0 in the query
Santiago Fernandez
@sf-jd
Sep 23 2016 03:27
can you add it to just the media_query and commit the code?
Amit Patel
@AmitP88
Sep 23 2016 03:27
yeah, gimme a sec
Santiago Fernandez
@sf-jd
Sep 23 2016 03:27
leave styles.css untouched, and add it on the query css :)
cool
Amit Patel
@AmitP88
Sep 23 2016 03:30
ok, it's done
Santiago Fernandez
@sf-jd
Sep 23 2016 03:30
oh you got min-width
Amit Patel
@AmitP88
Sep 23 2016 03:31
yeah, I thought we were supposed to use min-widths for media queries
Santiago Fernandez
@sf-jd
Sep 23 2016 03:31
for lulz lets try max-width
see what happens
Amit Patel
@AmitP88
Sep 23 2016 03:32
lol ok
Santiago Fernandez
@sf-jd
Sep 23 2016 03:32
they work almost fine now, bt theres still some missalignment going on
and they are overlapping everything in my iphone 5 screen
might have to do with the position: absolute youre setting
Amit Patel
@AmitP88
Sep 23 2016 03:33
yeah, it's still doing the same thing
the position: absolute with the scroll down buttons?
Santiago Fernandez
@sf-jd
Sep 23 2016 03:34
yea. im thinking 1 sec
Amit Patel
@AmitP88
Sep 23 2016 03:35
k
Santiago Fernandez
@sf-jd
Sep 23 2016 03:38
hrm, might have to redesign how youre doing this
Amit Patel
@AmitP88
Sep 23 2016 03:39
damn
I mean, it seems like just a small issue though
Santiago Fernandez
@sf-jd
Sep 23 2016 03:40
all beautiful bugs do lol
Salomon
@zarruk
Sep 23 2016 03:47
Does anybody know why when I press the temperature it changes to celsius (which is ok) but when I press back again it does not change back to farhenheit? http://codepen.io/zarruk/pen/dpNyOj?editors=0010
Is it working?
Salomon
@zarruk
Sep 23 2016 03:55
@Harry97 No it isn't
I got a vpn so I can't really tell if it's working, but my console is free of errors
Santiago Fernandez
@sf-jd
Sep 23 2016 04:17
Aplicativo?
what
:)
Hadouken
@Harry97
Sep 23 2016 04:22
@zarruk I guess It's working now, but we only have to round the celsius number
There's a function called math.round for this purpose
lol I hope you're not afk :D
Hadouken
@Harry97
Sep 23 2016 04:28
@zarruk oh and also make sure to modify your images when I resized my window they were out of place
Duong Van Thai
@duongvanthai
Sep 23 2016 05:36
Hi, I have a trouble. I’m working with Wikipedia Viewer. I have a input text. All text will lost after I pressed ‘Enter’ or ‘Search’ button. http://codepen.io/thaidv/full/bwgBqx/
How to i fix it? :)
And I put $('#bt-search').click(getDataFromSearch()); in $(document).ready. But it always auto-loading. So, how to i stop it until user input text in search field
underOneFlag
@underOneFlag
Sep 23 2016 05:42
@duongvanthai i think just remove () from click(getData...())
IslandForShans
@IslandForShans
Sep 23 2016 05:44
hi, i've been making something and html and i cant get past my first objective, which is to make a block of color on the page, im very new at this, plz help, should i make a div?
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:45
for(i=1;i<20;i++){
$('p').append("<p><a href ='"+json[3][i]+"'target='_blank'>"+json[1][i]+"</a>"+json[2][i]+"</p>");
}
why it is an infinite loop?
Duong Van Thai
@duongvanthai
Sep 23 2016 05:45
I can’t get value on input element. :( var textInput = $('#text-input-search').val;
it’s always return underfine
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:45
var textInput = $('#text-input-search').val(); @duongvanthai
IslandForShans
@IslandForShans
Sep 23 2016 05:46
I want to make a grey-ish "block" of color on the page that i can resize to my liking...
my code is <div style="color:grey"></div> will this work?
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:47
@IslandForShans please send your code
IslandForShans
@IslandForShans
Sep 23 2016 05:47

<style>

pic-bg {

background-color: #000000;

}
</style>

<div id="pic-bg">
</div>

i made it an id to see if it would work better, but still no result
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:48

pic-bg{}

please put#
Duong Van Thai
@duongvanthai
Sep 23 2016 05:49
@durgakiran thank you very much. :D
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:49
like #pic-bg{}
CamperBot
@camperbot
Sep 23 2016 05:49
:cookie: 288 | @durgakiran |http://www.freecodecamp.com/durgakiran
duongvanthai sends brownie points to @durgakiran :sparkles: :thumbsup: :sparkles:
IslandForShans
@IslandForShans
Sep 23 2016 05:49
i did, it still wont work
its set in the style tags as #pic-bg {}
when i pasted my code into the chat, it changed it a little
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:50
@IslandForShans please send the link of your challenge
IslandForShans
@IslandForShans
Sep 23 2016 05:51
heres the challenge im supposed to do: https://www.freecodecamp.com/challenges/build-a-tribute-page
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:51
then send your codepen link
Daniel Tait
@4xDMG
Sep 23 2016 05:51
@IslandForShans have you got content in the div? if not does the div have a height or width?
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:52
@IslandForShans you dont have any content in div
IslandForShans
@IslandForShans
Sep 23 2016 05:52
oh, ok, if i want to make it just a block of color, would i then set a height and width for it?
Daniel Tait
@4xDMG
Sep 23 2016 05:53
@IslandForShans yep as a % or in pixels
IslandForShans
@IslandForShans
Sep 23 2016 05:53
ok, cool
it worked! cool, thank you :) i'm super new at this, so i appreciate the help
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:54

$(document).ready(function(){
$('.enter').click(function(){
var srcv = $('#search').val();
if(srcv==""){
alert("enter something to search");
}else{
$.getJSON('https://en.wikipedia.org/w/api.php?action=opensearch&search='+srcv+'&format=json&limit=20&callback=?', function(json){
console.log(json);
console.log(srcv);
$('.content').html("<p> <a href ='"+json[3][0]+"'target='_blank'>"+json[1][0]+"</a><br>"+json[2][0]+"</p>");
for(i=1;i<20;i++){
$('p').append("<p><a href ='"+json[3][i]+"'target='_blank'>"+json[1][i]+"</a>"+json[2][i]+"</p>");
}

});
}

});

});
why my for loop became an infinite loop

Daniel Tait
@4xDMG
Sep 23 2016 05:54
@IslandForShans or as vh or vw (view height and view width)
@durgakiran try something like for (var i in data.query.pages) {}
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:58
@4xDMG why my code is giving infinite loop. do you have any idea
Daniel Tait
@4xDMG
Sep 23 2016 05:58
@durgakiran can you link codepen?
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 05:59
This message was deleted
sorry
Daniel Tait
@4xDMG
Sep 23 2016 06:03
@durgakiran i think it might be something to do with your api call. You're not actually getting 20 results back every time. I changed the for loop to for (var i in data) {} and it didnt crash
Palakurthi Durga Kiran Kumar
@durgakiran
Sep 23 2016 06:04
@4xDMG may be your right thankyou
CamperBot
@camperbot
Sep 23 2016 06:04
durgakiran sends brownie points to @4xdmg :sparkles: :thumbsup: :sparkles:
:cookie: 356 | @4xdmg |http://www.freecodecamp.com/4xdmg
Daniel Tait
@4xDMG
Sep 23 2016 06:05
@durgakiran you can use data to refer to the json object that gets returned from the api call. it took me ages to work out how to make my api call so i got all the data i wanted.
Duong Van Thai
@duongvanthai
Sep 23 2016 06:05
My request to wikipedia API is not return anything. But when i paste it link to browser. It’s working normal. LOL… :D Please, help me.
http://codepen.io/thaidv/full/bwgBqx/
Daniel Tait
@4xDMG
Sep 23 2016 06:06
@duongvanthai do you have a callback?
Duong Van Thai
@duongvanthai
Sep 23 2016 06:07
$.ajax({ type: "GET", url: urlRequest, dataType: "json", success: hanldeDataToDisplay, error: function () { console.log("Failed to get search data"); } });
I have a function hanldeDataToDisplay to handle data after i get it
I’m a newbie.
hanldeDataToDisplay is callback?
Daniel Tait
@4xDMG
Sep 23 2016 06:09
@duongvanthai nah thats the function you call to handle the data youve got from your api call
make a variable that has &callback=? and append it to your call
Duong Van Thai
@duongvanthai
Sep 23 2016 06:12
@4xDMG ok, i will learn about callback :)
Thank you. :)
Daniel Tait
@4xDMG
Sep 23 2016 06:18
@duongvanthai I'm trying to find something about it for you
Duong Van Thai
@duongvanthai
Sep 23 2016 06:22
$.ajax({ type: "GET", url: urlRequest, dataType: "jsonp", success: hanldeDataToDisplay, error: function () { console.log("Failed to get search data"); } });
kirbyedy
@kirbyedy
Sep 23 2016 06:25
try to change this: success: function(hanldeDataToDisplay)
I dont see your full code, so I am just guessing
This is my code
I’m trying with $.getJSON
:D
It’s not working.. :(
Daniel Tait
@4xDMG
Sep 23 2016 06:33
@duongvanthai hmmm
Duong Van Thai
@duongvanthai
Sep 23 2016 06:34
I don’t know why. Because. It’s work normal at yesterday. =))
with ajax
if i change dataType with ajax to jsonp it fire error
but with dataType + json it don’t return anything.
Daniel Tait
@4xDMG
Sep 23 2016 06:38
@duongvanthai im looking but i cant see anything obvious
Duong Van Thai
@duongvanthai
Sep 23 2016 06:43
what’s obvious? :)
Daniel Tait
@4xDMG
Sep 23 2016 06:43
@duongvanthai nothing :P
Annu Nirmal
@annunirmal
Sep 23 2016 06:49
kirbyedy
@kirbyedy
Sep 23 2016 06:51
this is crazy, exactly same code works on my codepen, but your code just does not run... @duongvanthai
Duong Van Thai
@duongvanthai
Sep 23 2016 06:52
@kirbyedy =)) really?
Daniel Tait
@4xDMG
Sep 23 2016 06:57
@duongvanthai its hurting my brain
Duong Van Thai
@duongvanthai
Sep 23 2016 06:58
I’m sorry… :smile:
Daniel Tait
@4xDMG
Sep 23 2016 06:59
lol
@annunirmal hows it going?
kirbyedy
@kirbyedy
Sep 23 2016 07:04
@duongvanthai ok so were were we
Annu Nirmal
@annunirmal
Sep 23 2016 07:04
@4xDMG yeah so i was reading about object.key() but cant understand how to implement it here
Daniel Tait
@4xDMG
Sep 23 2016 07:05
@kirbyedy @duongvanthai good luck guys! sorry i cant help
Duong Van Thai
@duongvanthai
Sep 23 2016 07:06
@4xDMG Thank you. :smile:
CamperBot
@camperbot
Sep 23 2016 07:06
:cookie: 357 | @4xdmg |http://www.freecodecamp.com/4xdmg
duongvanthai sends brownie points to @4xdmg :sparkles: :thumbsup: :sparkles:
Daniel Tait
@4xDMG
Sep 23 2016 07:11
@annunirmal i cant remember how i did it sorry just working it out
Annu Nirmal
@annunirmal
Sep 23 2016 07:12
@4xDMG okay take your time
kirbyedy
@kirbyedy
Sep 23 2016 07:15
@duongvanthai
$(document).ready(function() {
  $('#bt-search').click(getDataFromSearch);
});

function getDataFromSearch() {
  var textInput = document.getElementById('text-input-search').value;

  var apiWiki = 'https://en.wikipedia.org/w/api.php?callback=?&action=opensearch&search=' + textInput + '&limit=20&namespace=0&format=json';

  $.ajax({
        url: apiWiki,
        type: 'GET',
        dataType: 'jsonp',
        success: function(data) {
          console.log(data);
        }
  });
}
this works
BUT !
you have to remove the form group from html
for some reason it does not work with it
this line: <form class="form-group" role="search">
Duong Van Thai
@duongvanthai
Sep 23 2016 07:28
:( it’s not work for me & I don’t know why.
kirbyedy
@kirbyedy
Sep 23 2016 07:37
this is your pen and its working
check the console, the result is displayed
Duong Van Thai
@duongvanthai
Sep 23 2016 07:43
LOL =)) It’s working. @kirbyedy
@kirbyedy thank you. :)
CamperBot
@camperbot
Sep 23 2016 07:43
duongvanthai sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1408 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
So. It’s not working with <form> tag
??? :D
kirbyedy
@kirbyedy
Sep 23 2016 07:51
when I removed that form it started working
strange
maybe because of the class I dont know
Duong Van Thai
@duongvanthai
Sep 23 2016 07:53
:)
Sorin Ruse
@sorinr
Sep 23 2016 07:55
@duongvanthai its working with the form tag but in js you have to prevent the default event of posting the form when you press enter in the input field or a submit type button
Duong Van Thai
@duongvanthai
Sep 23 2016 07:57
How to i prevent it? i’m sorry about this. But I’m newbie. :(
Chris Cullen
@123xylem
Sep 23 2016 08:09

$(".panel").on("click",function(){

  var panelId=$(this).attr("id");

  audioF[panelId.toLowerCase()].play(); //<-----use id as key
  $("#"+panelId).toggleClass("animate");
  //sort out this animation
   pSeq.push(panelId);

  var correct = pSeq.every(function(element, index) {
    if(pSeq.length===cSeq.length&&element === cSeq[index]){
     setInterval(cpuSeq(), 2000);//WHy Is this autotriggering cpuSeq even when pSeq isnt same length as cSeq??!!
    }
    else {pSeq=[];
          console.log("wrong");
    audioF['wrong'].play();
}
});
});
Im trying to code so that user input is recorded, measured against cpu input and if correct cpuSeq() plays where it picks another input...When i press only 1 panel cpuSeq starts though
Sorin Ruse
@sorinr
Sep 23 2016 08:12
@duongvanthai take a look here: https://api.jquery.com/submit/
Duong Van Thai
@duongvanthai
Sep 23 2016 08:14
@sorinr Thank you. :)
CamperBot
@camperbot
Sep 23 2016 08:14
duongvanthai sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 719 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Sep 23 2016 08:14
@duongvanthai welcome
Phanindra M
@PhaniMaddi
Sep 23 2016 11:28
In my twitch JSON API project I can't toggle between Online and Offline users...
Can anyone check what is wrong?
kirbyedy
@kirbyedy
Sep 23 2016 11:33
are you sure ? its working for me
William Maes
@maeswilliam
Sep 23 2016 11:45
Can anyone tell me why my vertical navigation bar for small screens isn't properly centred? http://williammaes.tk/Projects/Basic%20Layout%20Skills/index.html
sourabhatt
@sourabhatt
Sep 23 2016 11:49
how should i start with building a portfolio page ?
William Maes
@maeswilliam
Sep 23 2016 11:50
@sourabhatt make a mock up
sourabhatt
@sourabhatt
Sep 23 2016 11:50

<html>
<head>
<title>
</title>
</head>
</html>

this doesn't works in codepen

William Maes
@maeswilliam
Sep 23 2016 11:50
@sourabhatt forgot body mate
sourabhatt
@sourabhatt
Sep 23 2016 11:50
@maeswilliam can u share your's portfolio page ?
William Maes
@maeswilliam
Sep 23 2016 11:51
it's in my icon
williammaes.tk
Sarah Chima
@sayrah901
Sep 23 2016 11:51
hey guys. please what do u think about my random quote machine. https://codepen.io/sayrah901/pen/ozjamg
Johnny
@JohnnyBizzel
Sep 23 2016 12:05
@sayrah901 The API seems a little slow at responding but that's not your fault. Layout is responsive :+1:
kirbyedy
@kirbyedy
Sep 23 2016 12:11
API is slow because of the crossorigin.me
if you remove it it will work fine
but you also have to remove the https from the codepen link
use only http
Salomon
@zarruk
Sep 23 2016 12:25
Help please. Does anybody know why my weather app is not working? Yesterday it was perfectly working and now it isn't, don't know why.
CamperBot
@camperbot
Sep 23 2016 12:25
no wiki entry for: please does anybody know why my weather app is not working yesterday it was perfectly working and now it isnt dont know why
kirbyedy
@kirbyedy
Sep 23 2016 12:30
@zarruk it shows the weather for me @zarruk
it is a bit off... by 65km but its working :)
Monesul Haque
@mones-cse
Sep 23 2016 12:32
@zarruk put the general class into body section then the background image will show in full window
and rest of the thing is working
Gary Siu
@GarySiu
Sep 23 2016 12:33
@zarruk It’s working for me (once I unblocked the ip geocoder). Do you have any error messages in your console?
Arvin
@arvkh
Sep 23 2016 13:08
Does anyone here have jQuery validation experience? I have an issue, when I click the button and if it's correct, for a couple of seconds the error message is visible until it loads to the other page. I don't want that. Anyone have any ideas? My code can be found here: https://github.com/arvkh/kontakta-oss
Abubakar
@Ashinkafi
Sep 23 2016 13:22
Please i need help on building my tribute page
Salomon
@zarruk
Sep 23 2016 13:24
@kirbyedy @mones-cse @GarySiu Is it working perfectly? Does it show the city, temperature, weather and background image properly?
Monesul Haque
@mones-cse
Sep 23 2016 13:24
yup
Salomon
@zarruk
Sep 23 2016 13:24
@kirbyedy @mones-cse @GarySiu I am now working on another computer and still won't work and can't find out why. yesterday it was :worried:
Gary Siu
@GarySiu
Sep 23 2016 13:25
Working fine here
No errors?
Monesul Haque
@mones-cse
Sep 23 2016 13:25
blob
Salomon
@zarruk
Sep 23 2016 13:30
@GarySiu @mones-cse I really can't find out why.
Monesul Haque
@mones-cse
Sep 23 2016 13:33
@zarruk is your location is on in your browser ?
Salomon
@zarruk
Sep 23 2016 13:34
@mones-cse well, as far as I know, that doesn't matter because it works on the IP address, not on the location
Monesul Haque
@mones-cse
Sep 23 2016 13:35
@zarruk do you saw any error in your console ?
Salomon
@zarruk
Sep 23 2016 13:36
@mones-cse Oh yes! I hadn't looked at the console! I removed the https and now it works! Thank you
CamperBot
@camperbot
Sep 23 2016 13:36
zarruk sends brownie points to @mones-cse :sparkles: :thumbsup: :sparkles:
:cookie: 398 | @mones-cse |http://www.freecodecamp.com/mones-cse
Monesul Haque
@mones-cse
Sep 23 2016 13:37
(y)
:)
Salomon
@zarruk
Sep 23 2016 13:39
@mones-cse Ok, now I have a question if you're willing to help me :smile:
When I press the temperature it changes to ºC but when I press back again the temperature it doesn't change back to ºF. Do you know why?
Monesul Haque
@mones-cse
Sep 23 2016 13:39
let me check
Sorin Ruse
@sorinr
Sep 23 2016 13:39
@arvkh i don't see where you are preventing the default behaviour of submiting the form
Arvin
@arvkh
Sep 23 2016 13:40
What do you mean? @sorinr
I am new to this btw
Sorin Ruse
@sorinr
Sep 23 2016 13:42
@arvkh it seems that your $("form").validate function does not prevent the post submitting of your form to action=""
Arvin
@arvkh
Sep 23 2016 13:42
It does
I also use php @sorinr
Monesul Haque
@mones-cse
Sep 23 2016 13:43
@zarruk your
$("#temperatura").html(temperature + "ºF")
condition is not right
Salomon
@zarruk
Sep 23 2016 13:44
@mones-cse actually I think that condition is ok and that's why when I click it, it changes to ºC. The problem is when I click it again, it doesn't change back to ºF
Monesul Haque
@mones-cse
Sep 23 2016 13:44
so each time you press that it goes to if section
never goes to else section
that condtion is always true
Salomon
@zarruk
Sep 23 2016 13:46
but after I click, it would be false, no? @mones-cse
Sorin Ruse
@sorinr
Sep 23 2016 13:46
@arvkh you can take a look here: https://jqueryvalidation.org/validate/
Monesul Haque
@mones-cse
Sep 23 2016 13:46
nope it still remain true
Salomon
@zarruk
Sep 23 2016 13:47
@mones-cse why is that? after i click it, $("#temperatura").html(temperature + "ºF")would be false
Andrew Canter
@AndrewDylan
Sep 23 2016 13:47
I am currently just trying to get a functional .getJSON function to work on my Wikepedia Viewer. Although I am unable to find the issue at the moment, and my API seems to work fine.
http://codepen.io/NoboFish/pen/Xjmvpp?editors=1011
Arvin
@arvkh
Sep 23 2016 13:48
@sorinr I have already
Can't find the appropriate
Monesul Haque
@mones-cse
Sep 23 2016 13:49

@zarruk when you writing
if ($("#temperatura").html(temperature + "ºF")){......}

you basically writing
if ([div#temperatura]object )){ ....}

and an object is always true
Salomon
@zarruk
Sep 23 2016 13:51
@mones-cse I don't understand why yet. However, how can I do for the button to change from F to C and backwards every time I click it?
Sorin Ruse
@sorinr
Sep 23 2016 13:51
@arvkh if your form does not validate the form submission stops?
Arvin
@arvkh
Sep 23 2016 13:52
I am sorry, can't understand what you mean. @sorinr
:)
Sorin Ruse
@sorinr
Sep 23 2016 13:53
This message was deleted
Monesul Haque
@mones-cse
Sep 23 2016 13:53
you can add a global variable celcius =true
and when that thing click make celcius =false
and make your checking condition
if(celcius ){
 celcius=false
..............................
..........................
}else{
celcius=true 
...............................
.....................
}
in short use flag
@zarruk
Andrew Canter
@AndrewDylan
Sep 23 2016 13:58
I am currently just trying to get a functional .getJSON function to work on my Wikepedia Viewer. Although I am unable to find the issue at the moment, and my API seems to work fine.
http://codepen.io/NoboFish/pen/Xjmvpp?editors=1011
Sorin Ruse
@sorinr
Sep 23 2016 13:59
@arvkh what is the "other page" you r talking about?
Salomon
@zarruk
Sep 23 2016 14:00
@mones-cse Ok, I more or less got it. Take a look please and tell me if that's somehow what you meant :smile: http://codepen.io/zarruk/pen/dpNyOj?editors=0010
Stephen James
@sjames1958gm
Sep 23 2016 14:00
@AndrewDylan You are running into cross origin issue where requests from some origins have to be specifically allowed.
There are a couple of ways around this - jsonp - solved by adding &callback=?to the end of you URL.
Or using a proxy like https://crossorigin.me/
Arvin
@arvkh
Sep 23 2016 14:01
it's the same message but it loads @sorinr
Stephen James
@sjames1958gm
Sep 23 2016 14:01
Monesul Haque
@mones-cse
Sep 23 2016 14:01
@zarruk yah :clap: :)
Andrew Canter
@AndrewDylan
Sep 23 2016 14:02
@sjames1958gm Thank you! That helped and I will be sure to read that wiki article.
CamperBot
@camperbot
Sep 23 2016 14:02
andrewdylan sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3448 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Salomon
@zarruk
Sep 23 2016 14:06
@mones-cse thanks!
CamperBot
@camperbot
Sep 23 2016 14:06
zarruk sends brownie points to @mones-cse :sparkles: :thumbsup: :sparkles:
:warning: zarruk already gave mones-cse points
christocarr
@christocarr
Sep 23 2016 14:46
Hi! I need help with the Build a Tribute Page project.
How do I now what classes to give to my HTML elements?
christocarr
@christocarr
Sep 23 2016 14:52
How do I add an image to CodePen?
Gary Siu
@GarySiu
Sep 23 2016 14:56
@christocarr If you are using Bootstrap then you can find the classes available here: http://getbootstrap.com/css/
Otherwise just make the class names meaningful
Images need to be hosted on a third party service like https://imgur.com
christocarr
@christocarr
Sep 23 2016 14:57
thanks @GarySiu
CamperBot
@camperbot
Sep 23 2016 14:57
christocarr sends brownie points to @garysiu :sparkles: :thumbsup: :sparkles:
:cookie: 367 | @garysiu |http://www.freecodecamp.com/garysiu
Igor Amidzic
@igoramidzic
Sep 23 2016 15:05
Hello, can someone help me with html/css positioning?
Here is my project: http://utilitan.com/google/google.html
When I make my browser smaller, and then scroll to the right, my header div stops.
Its as if its taking up 100% of the screen, but I want it to be 100% even when scrolling.
Here is my codepen: http://codepen.io/amidzicigor/pen/YGkyJR
JD Tadlock
@jdtdesigns
Sep 23 2016 15:08
@amidzicigor You're using fixed widths. They will stay the same no matter the screen size
Igor Amidzic
@igoramidzic
Sep 23 2016 15:09
@jdtdesigns My mainDiv is set to margin: 0 auto, so when I make my browser smaller in the horizontal direction and then scroll to the right, my header stops, but the page keeps scrolling
Capture.PNG
JD Tadlock
@jdtdesigns
Sep 23 2016 15:11
@amidzicigor Not sure what you're trying to achieve. Are you keeping the colors the way they are?
Igor Amidzic
@igoramidzic
Sep 23 2016 15:11
@jdtdesigns See how the gray header div stops like 200px from the right?
and no, this is just to see the divs in action
JD Tadlock
@jdtdesigns
Sep 23 2016 15:13
@amidzicigor case in point, don't use fixed widths for responsive design
Igor Amidzic
@igoramidzic
Sep 23 2016 15:13
@jdtdesigns My header doesn't have a fixed width. I didn't declare a width at all

header {

background-color: #cccccc;
margin-top: 0px;
height: 65px;
}
codedisorder
@codedisorder
Sep 23 2016 15:14
hello?
JD Tadlock
@jdtdesigns
Sep 23 2016 15:15
@amidzicigor Do you have an example of what you're trying to achieve?
Igor Amidzic
@igoramidzic
Sep 23 2016 15:15
google.com
@jdtdesigns go to google, and make your browser small enough horizontally so that you get a vertical scroll bar.
You see how the profile picture and everything remain to the right
JD Tadlock
@jdtdesigns
Sep 23 2016 15:17
@amidzicigor The only reason google's site stays fixed in width is because javascript tells the browser when to change. If you load it on your phone or tablet it will be different. ;)
Igor Amidzic
@igoramidzic
Sep 23 2016 15:17
@jdtdesigns So there is no way with just html/css to make it stay to the right?
JD Tadlock
@jdtdesigns
Sep 23 2016 15:18
@amidzicigor Responsive design is about keeping the content on the viewable screen at all times in a user friendly way.
There's never a good reason to have content off the screen horizontally
google doesn't
that's just their desktop version
Chris
@chrisdav6
Sep 23 2016 15:19

Good Morning All. So it's looks like they are closing down the PHP room so i will ask my question here :)
With regard to variable scope within php. What is the correct method of making your variables available to functions? I have always been taught that using global variables is BAD, however some of the php tutorials i'm watching, that is the solution they are using. Would it be better to pass the variable as a parameter to the function? Like this...

$name = "Chris";

function sayHello($name) {
echo "Hey there $name!";
}

sayHello($name);

the method i saw someone using which i though was bad or frowned upon was...

$name = "Chris";

function sayHello() {
global $name;
echo "Hey there $name!";
}

sayHello();
ChinTatt Ng
@ChinTatt-Ng
Sep 23 2016 15:20
@ChinTatt-Ng
hi is anyone here available for help ?
i'm doing the portfolio page and then i faced a problem in the contact form. I searched for sample contact form codes to compare and noticed that they arrange everything using foat css. but when i use float, the labels are not arranged nicely. This is my Pen
http://codepen.io/Chintatt/pen/QKdooE
Igor Amidzic
@igoramidzic
Sep 23 2016 15:20
@jdtdesigns Yes, I know that. But how are they able to keep their header from cutting off when scrolling horizontally?
Stephen James
@sjames1958gm
Sep 23 2016 15:21
@chrisdav6 If at all possible do not use globals, if you have to use globals limit their usage. In the second example the call to sayHello
Is using a global, but the function is not, if you wanted to use the function with some other variable, no go with first example.
JD Tadlock
@jdtdesigns
Sep 23 2016 15:23
@chrisdav6 You would typically create a class that handles the steps for you.
@ChinTatt-Ng Look up flexbox. Use that and it'll make your life easier. It's fully supported in browsers now. ;)
Chris
@chrisdav6
Sep 23 2016 15:24
I think i understand @sjames1958gm back to the books i guess! Thanks man :+1:
CamperBot
@camperbot
Sep 23 2016 15:24
chrisdav6 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3450 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
christocarr
@christocarr
Sep 23 2016 15:25
My img is not showing. Help
JD Tadlock
@jdtdesigns
Sep 23 2016 15:25
@amidzicigor I'm telling you. You're looking at a desktop version of the site and just shrinking it down. That's not their mobile version and it will NOT look like that on a smaller device. NEVER and I say NEVER design a site with content off the screen horizontally.
Chris
@chrisdav6
Sep 23 2016 15:26
@jdtdesigns is that similar to a javascript class? So now all of your variables would have scope within the class and be available to all functions within that class?
Igor Amidzic
@igoramidzic
Sep 23 2016 15:26
@jdtdesigns I'm not making a mobile version.. I'm making a desktop version.
Do you even know what my question was? Because you don't seem to understand
christocarr
@christocarr
Sep 23 2016 15:27
<img src="http://imgur.com/a/jkYrA" class="image-responsive" alt="Portrait photo of Sir Titus Salt">
Stephen James
@sjames1958gm
Sep 23 2016 15:28
@chrisdav6 :+1:
ChinTatt Ng
@ChinTatt-Ng
Sep 23 2016 15:28
@jdtdesigns thanks. i'll look it up
CamperBot
@camperbot
Sep 23 2016 15:28
chintatt-ng sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 603 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Chris
@chrisdav6
Sep 23 2016 15:28
@jdtdesigns then you would declare the variables within that class public?
JD Tadlock
@jdtdesigns
Sep 23 2016 15:29
@amidzicigor I understand what you're saying, but you are trying to replicate something that isn't right. Google has js running in the background that reads your device, screen size, ip, location, and 100 other things and outputs a version of their site based on all that info. You're trying to create a terrible practice that no one will ever do.
@chrisdav6 You could have private properties storing the data when you instantiate the class. It would have methods that do something with the data.
Igor Amidzic
@igoramidzic
Sep 23 2016 15:30
@jdtdesigns That's all I asked when I said "So there is no way with just html/css to make it stay to the right?"
All you had to do was say no
JD Tadlock
@jdtdesigns
Sep 23 2016 15:30
@amidzicigor Of course there is a way, but there is no way you should be doing it lol.
Chris
@chrisdav6
Sep 23 2016 15:30
@jdtdesigns ahhh, thank you!
CamperBot
@camperbot
Sep 23 2016 15:30
chrisdav6 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 604 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Igor Amidzic
@igoramidzic
Sep 23 2016 15:30
@jdtdesigns Do you know the way?
JD Tadlock
@jdtdesigns
Sep 23 2016 15:31
@amidzicigor I know how, but I'm not going to teach you how to code badly.
Learn the right way
Igor Amidzic
@igoramidzic
Sep 23 2016 15:32
@jdtdesigns What is the right way den
I know js and jQuery
Gabe Laughlin
@Gslaughl
Sep 23 2016 15:32
I have a question about CodePen. How do the different windows interact with each other? What do you put in the CSS box? All I know how to do is put the CSS stuff into the style element in my HTML. Do you just start writing in the CSS box as if you were already inside the style element?
Igor Amidzic
@igoramidzic
Sep 23 2016 15:34

@Gslaughl Yes, basically.
The syntax goes like this:

elementID {

      font-size: 20px;

}

For example

Gary Siu
@GarySiu
Sep 23 2016 15:34
@Gslaughl Codepen does a lot of things automatically for you.
Igor Amidzic
@igoramidzic
Sep 23 2016 15:34
@Gslaughl You have to put a # before elementID
Gary Siu
@GarySiu
Sep 23 2016 15:34
@Gslaughl Anything in the html window is assumed to be in the body
Gabe Laughlin
@Gslaughl
Sep 23 2016 15:35
Okay, so basically the same as if you were writing it into your style element?
Gary Siu
@GarySiu
Sep 23 2016 15:35
@Gslaughl Anything in the css window is assumed to already be in a style tag
Stephen James
@sjames1958gm
Sep 23 2016 15:35
@Gslaughl When executing the code in those windows is combined into an iframe. The css window is put into a <style> tag
and the js is put into a <script> tag. It also places the external includes in the correct place
JD Tadlock
@jdtdesigns
Sep 23 2016 15:35
@amidzicigor I can show you a quick version of how it would work.
Gabe Laughlin
@Gslaughl
Sep 23 2016 15:35
Gotcha, thanks @GarySiu @amidzicigor
CamperBot
@camperbot
Sep 23 2016 15:35
gslaughl sends brownie points to @garysiu and @amidzicigor :sparkles: :thumbsup: :sparkles:
:cookie: 368 | @garysiu |http://www.freecodecamp.com/garysiu
:cookie: 10 | @amidzicigor |http://www.freecodecamp.com/amidzicigor
Gary Siu
@GarySiu
Sep 23 2016 15:35
@Gslaughl Anything in the js window is assumed to be in a script tag loaded after the html has loaded (so you don’t need $(document).ready())
Igor Amidzic
@igoramidzic
Sep 23 2016 15:36
@jdtdesigns Hit me with it
christocarr
@christocarr
Sep 23 2016 15:36
I need help pls.
Gary Siu
@GarySiu
Sep 23 2016 15:36
@christocarr What do you need help with?
christocarr
@christocarr
Sep 23 2016 15:38
@GarySiu my imgur hosted img doesn't show. <img src="http://imgur.com/a/jkYrA" class="image-responsive" alt="Portrait photo of Sir Titus Salt">
Gary Siu
@GarySiu
Sep 23 2016 15:39
@christocarr You’re linking to the album, not the image
Michael Bomholt
@bomholtm
Sep 23 2016 15:39
https://codepen.io/bomholt/full/WGbVQA/ anyone an idea how to make the extended key section something like a off canvas menu on mobile? (without jquery)?
Gary Siu
@GarySiu
Sep 23 2016 15:39
@christocarr try https://i.imgur.com/AIvStYg.jpg as the src
christocarr
@christocarr
Sep 23 2016 15:40
@GarySiu Ahhh.. right. I forgot .jpg :+1:
nope :-1:
Gary Siu
@GarySiu
Sep 23 2016 15:44
@christocarr If you go to [username].imgur.com/all/ you should see a button for copying the “Direct link"
JD Tadlock
@jdtdesigns
Sep 23 2016 15:44
@amidzicigor If you go here http://codepen.io/jdtadlock/pen/ZpZQOv, you can watch me code.
Gary Siu
@GarySiu
Sep 23 2016 15:44
@christocarr Or it will be on the page you get after you upload anonymously.
Rimi.
@Codevotee
Sep 23 2016 15:45
@christocarr you right click the image on imgur and then click copy url
@christocarr copy image address*
Gary Siu
@GarySiu
Sep 23 2016 15:46
@christocarr https://i.imgur.com/AIvStYg.jpg works fine for me though… show your codepen?
@bomholt Do you know how to do the animation with a css transition?
Gary Siu
@GarySiu
Sep 23 2016 15:51
@bomholt You can adapt this to use vanilla js if you understand what you’re doing: https://scotch.io/tutorials/off-canvas-menus-with-css3-transitions-and-transforms
christocarr
@christocarr
Sep 23 2016 15:51
thanks! got it to work.
Michael Bomholt
@bomholtm
Sep 23 2016 15:59
@GarySiu i will look into it.. maybe i need to have a look into css transitions first. thank you
CamperBot
@camperbot
Sep 23 2016 15:59
bomholt sends brownie points to @garysiu :sparkles: :thumbsup: :sparkles:
:cookie: 369 | @garysiu |http://www.freecodecamp.com/garysiu
sean9
@sean9
Sep 23 2016 16:06
Hey all I am working on the tweet a quote challenge and I dont know how to open a new window or if I even did it correctly.
Jason Luboff
@JLuboff
Sep 23 2016 16:09
@sean9 To have a link open in a new window, you add target="_blank" to your anchor tag(<a href="#" target="_blank">)
sean9
@sean9
Sep 23 2016 16:14
so i am guessing I didnt do the js part properly
$("#tweeThis").on('click', function() {
  window.location = "https://twitter.com/intent/tweet?text=" + hopeAlot;
})
Jason Luboff
@JLuboff
Sep 23 2016 16:16
@sean9 My method was
var tweet = 'https://twitter.com/intent/tweet?text=' + randomQuote + " " + author;
    $(".twitter-share-button").attr("href", tweet);
There is one problem with mine, in that it does not account for quotes over 140 characters
ChinTatt Ng
@ChinTatt-Ng
Sep 23 2016 16:21
why is the Message label at the bottom
  <label for="Message">Message: </label>
        <textarea name="Message" cols="20" rows="20" placeholder="Type your message here." id="message" required></textarea>
.input, textarea {
  border-radius:5px;
  width:400px;
  padding:10px;
 margin:10px;

  }
textarea {
  height:150px;

}
JD Tadlock
@jdtdesigns
Sep 23 2016 16:23
@amidzicigor I haven't even added any responsive styling, but you can see just how much flexbox does for you. http://codepen.io/jdtadlock/pen/ZpZQOv?editors=1100
Rimi.
@Codevotee
Sep 23 2016 16:26
@jdtdesigns that background ...
JD Tadlock
@jdtdesigns
Sep 23 2016 16:29
@APRim05 ?
Rimi.
@Codevotee
Sep 23 2016 16:29
@jdtdesigns same as my pic lol
JD Tadlock
@jdtdesigns
Sep 23 2016 16:30
the slider image @APRim05?
Rimi.
@Codevotee
Sep 23 2016 16:30
@jdtdesigns yeah
JD Tadlock
@jdtdesigns
Sep 23 2016 16:30
ah, just random images from unsplash lol
lucky you i guess :P
ChinTatt Ng
@ChinTatt-Ng
Sep 23 2016 16:31
@jdtdesigns flexbox is good. but i still dont know how to really utilize it. somehow i have managed to make my contact form looks like what i've shown above. but can you help me with the Message label?
JD Tadlock
@jdtdesigns
Sep 23 2016 16:39
@ChinTatt-Ng There are a few ways to do it. Can you post your codepen again?
@amidzicigor The slider is working now too. ;)
http://codepen.io/jdtadlock/pen/ZpZQOv?editors=0010
ChinTatt Ng
@ChinTatt-Ng
Sep 23 2016 16:41
@jdtdesigns i just managed to used float out of a sudden. haha. i'll try flexbox for my footer and i'll seek for your help again later. Thanks
CamperBot
@camperbot
Sep 23 2016 16:41
chintatt-ng sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 605 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Sep 23 2016 16:43
@ChinTatt-Ng Floats should always be avoided if possible. They are the crippled remnants of old css.
sean9
@sean9
Sep 23 2016 16:43
sorry guys im still stuck on the random quote tweeter. im pretty sure i dont have the javascript done properly targeting "tweetThis
http://codepen.io/sean9/pen/wzzWoG
JD Tadlock
@jdtdesigns
Sep 23 2016 16:46
@sean9 Instead of using window.open, just set the href of the link to intent url with the quote concatenated on the end. ;)
Mohit Sharma
@xxholyChalicexx
Sep 23 2016 16:50
JD Tadlock
@jdtdesigns
Sep 23 2016 16:52
@xxholyChalicexx Can you post your codepen?
sean9
@sean9
Sep 23 2016 16:52
@jdtdesigns
$("#tweeThis").on('click', function() {
  $("thisTweet").attr('href', tweetThat);
});
sean9
@sean9
Sep 23 2016 16:54
also just fixed that thistweet that should be tweetThis. Did I write it properly?
vínαч puppαl
@vinaypuppal
Sep 23 2016 16:56
@xxholyChalicexx just append this &callback=? to your URL to make API request JSONP request
Final URL:
'https://en.wikipedia.org/w/api.php?action=opensearch&search=fly&limit=5&namespace=0&format=json&callback=?'
Tyler Moeller
@TylerMoeller
Sep 23 2016 16:57
@sean9 Don't forget the # for the ID: $("#tweetThis").attr('href', tweetThat); and you'll need to strip the <p>- </p> from the tweet text
JD Tadlock
@jdtdesigns
Sep 23 2016 16:58
@xxholyChalicexx You should just run it from http and not https. Most people will load codepen through standard http.
Mohit Sharma
@xxholyChalicexx
Sep 23 2016 16:58
@vinaypuppal yup that worked...... but when i used weather api i didnt have to do that.... but why now
@jdtdesigns its working if i append with '&callback=?' .....
@vinaypuppal (y)
@jdtdesigns (y)
JD Tadlock
@jdtdesigns
Sep 23 2016 16:59
@xxholyChalicexx Based on the server you're connecting to, they will have different security measures.
Sorin Ruse
@sorinr
Sep 23 2016 17:00
@xxholyChalicexx this pen is working. what is the problem?
JD Tadlock
@jdtdesigns
Sep 23 2016 17:00
@xxholyChalicexx It will work fine as long as people load your codepen through https. If they don't it will throw an error due to mixed content.
vínαч puppαl
@vinaypuppal
Sep 23 2016 17:01
@xxholyChalicexx may be your weather API supported just simple request (or you used crossorigin hack) but WIKI API does not support CORS request so we need to make JSONP request
Mohit Sharma
@xxholyChalicexx
Sep 23 2016 17:01
@sorinr well it wasn't untill i appened '&callback=?' in the url..... thnx anyways
CamperBot
@camperbot
Sep 23 2016 17:01
xxholychalicexx sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 721 | @sorinr |http://www.freecodecamp.com/sorinr
Mohit Sharma
@xxholyChalicexx
Sep 23 2016 17:02
@vinaypuppal thnx
CamperBot
@camperbot
Sep 23 2016 17:02
xxholychalicexx sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 558 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Mohit Sharma
@xxholyChalicexx
Sep 23 2016 17:02
@jdtdesigns thnx
CamperBot
@camperbot
Sep 23 2016 17:02
xxholychalicexx sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 606 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Gus Beringer
@gusberinger
Sep 23 2016 17:07

I'm having trouble with the Tribute Page Challenge.

I'm trying to setup the captions in the image, but I can't get it working. Here's my code. I'm trying to get it to look like this. From what I can tell my code is identical. I have no clue why it won't work.

Thanks for your help.

vínαч puppαl
@vinaypuppal
Sep 23 2016 17:13
@gusberinger try to add class='img-responsive' on img tag to get full width image and remove CSS you added for your img
@gusberinger and verify your email in codepen to get access to Fullpage view in codepen
sean9
@sean9
Sep 23 2016 17:15
@jdtdesigns alright i seem to have most of it, how do I get it to tweet non alphanumeric characters?
vínαч puppαl
@vinaypuppal
Sep 23 2016 17:16
@sean9 use encodeURIComponent(your-tweet) in your URL
@sean9
$("#tweetThis").attr('href', 'https://tweet-url/text='+encodeURIComponent(tweetThat))
Gus Beringer
@gusberinger
Sep 23 2016 17:20
@vinaypuppal It worked! how would I be able to shrink the image. Modifying the class thumbnail works, but I can't figure out how to center it.
vínαч puppαl
@vinaypuppal
Sep 23 2016 17:21
@gusberinger add this
.thumbnail {
  width: 50%;
  margin: 0 auto;
}
@gusberinger margin: 0 auto; would center it
Gus Beringer
@gusberinger
Sep 23 2016 17:23
thanks @vinaypuppal
CamperBot
@camperbot
Sep 23 2016 17:23
gusberinger sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 559 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Ravishasthri
@ravi6112
Sep 23 2016 17:45
guys help me with creating portfolio webpage
i wanna know how to make header
Jamie Weston
@monotone2k
Sep 23 2016 17:50
How do you want it to look/work?
christocarr
@christocarr
Sep 23 2016 17:50
Am I allowed to use jquery in the first project?
vínαч puppαl
@vinaypuppal
Sep 23 2016 17:50
@christocarr yes you can
christocarr
@christocarr
Sep 23 2016 17:52
@vinaypuppal :+1:
Jamie Weston
@monotone2k
Sep 23 2016 18:05
@christocarr I'm pretty sure the only rules are that you meet the user stories.
fuad47
@fuad47
Sep 23 2016 18:55
Hi I want to know how make the step 8 in portfolio task
( navigate to different sections of the webpage by clicking buttons in the navigation)
MMDF
@MMDF
Sep 23 2016 18:55
easy
give your divs an id
then set your anchors href to #id
so it would be <a href="#section1">
when you click it the browser will navigate to the element
to make it scroll smoothly you can look up some plugins that do tha :)
fuad47
@fuad47
Sep 23 2016 18:58
hmm really interesting solution
I didint know that
MMDF
@MMDF
Sep 23 2016 18:58
look at my portfolio
even though its not done
you can click the first button
and it will bring you there
fuad47
@fuad47
Sep 23 2016 19:00
o MEhmet
Masallah
MMDF
@MMDF
Sep 23 2016 19:00
türk?
:D
14 yaşındayım :smile:
fuad47
@fuad47
Sep 23 2016 19:00
helal olsun sana
14 yawindan bawaldiysan 24-de facebook kurarsin
MMDF
@MMDF
Sep 23 2016 19:01
bir süredir öğreniyorum
bu gitterda türkçe konuşmak yasak sanırım
so lets stick to english :)
fuad47
@fuad47
Sep 23 2016 19:01
azerbaycandanim
MMDF
@MMDF
Sep 23 2016 19:01
ooh
ilginç
size de iyi şanslar
portfolyonuzla
fuad47
@fuad47
Sep 23 2016 19:02
sana da sagol my friend
i want to take front end certificate asap
MMDF
@MMDF
Sep 23 2016 19:03
gotta work hard then!
fuad47
@fuad47
Sep 23 2016 19:06
how long have been you coding
MMDF
@MMDF
Sep 23 2016 19:06
I started this camp 3 months ago approx.
I took a break
to learn more css html and other programming languages
fuad47
@fuad47
Sep 23 2016 19:06
is this your first experience
MMDF
@MMDF
Sep 23 2016 19:06
now I started again a week before
hmm basically yes
i did learn some html before
fuad47
@fuad47
Sep 23 2016 19:07
i see quick developemnt
MMDF
@MMDF
Sep 23 2016 19:07
basic stuff h p
fuad47
@fuad47
Sep 23 2016 19:07
i think you read risale
MMDF
@MMDF
Sep 23 2016 19:07
?
fuad47
@fuad47
Sep 23 2016 19:07
nur collection
MMDF
@MMDF
Sep 23 2016 19:08
no i didnt read any books
i learned fromt he internet
watched videos
fuad47
@fuad47
Sep 23 2016 19:08
hmm you can read from here erisale.com
fuad47
@fuad47
Sep 23 2016 19:23
what do you thinkh which way I should use to list my portfolio works
i am thinking on divs or table
BK_5000
@briankidd9design
Sep 23 2016 19:38
I noticed on the tribute page project that the image is made responsive by using the class "thumbnail" and not "img-responsive" I tried to use img-responsive and that did not work. I am wondering why this is
fuad47
@fuad47
Sep 23 2016 19:38
And how I add image in my pc to ipen
codepen I am sorry
vínαч puppαl
@vinaypuppal
Sep 23 2016 19:39
@fuad47 upload to dropbox or any cloud image hosting service like http://cloudinary.com and use that URL in your pen
fuad47
@fuad47
Sep 23 2016 19:40
hmm thanks
BK_5000
@briankidd9design
Sep 23 2016 19:40
I used flicker and that worked
But the img-responsive class did not work
I peeked at Qincy's code and he used the thumbnail class
vínαч puppαl
@vinaypuppal
Sep 23 2016 19:41
@briankidd9design can you provide link to your pen
I just started this this morning
vínαч puppαl
@vinaypuppal
Sep 23 2016 19:45
@briankidd9design i removed thumbnail class on div and added img-responsive on img tag it worked, the image is responsive. So what you want to achieve.
fuad47
@fuad47
Sep 23 2016 19:45
@fuad47
what do you thinkh which way I should use to list my portfolio works
i am thinking on divs or table
vínαч puppαl
@vinaypuppal
Sep 23 2016 19:47
@briankidd9design By adding thumbnail class to div just adds some padding, background-color, it also makes img responsive and provides some styles to caption thats the only difference
BK_5000
@briankidd9design
Sep 23 2016 19:48
ok thanks!
Monesul Haque
@mones-cse
Sep 23 2016 20:10
guys give me some feedback
http://codepen.io/m1s/full/LRWRpX/
and i want to put the calculator in the midel responsively any idea how ?
fuad47
@fuad47
Sep 23 2016 20:12
its already in middle not?
Monesul Haque
@mones-cse
Sep 23 2016 20:12
horizontally middle
but not vertically
@fuad47
fuad47
@fuad47
Sep 23 2016 20:13
its horizontally ok maybe you mean vertically
Monesul Haque
@mones-cse
Sep 23 2016 20:13
@fuad47 yes
fuad47
@fuad47
Sep 23 2016 20:13
try margin: auto auto
Monesul Haque
@mones-cse
Sep 23 2016 20:18
@fuad47 i am using http://materializecss.com/
may be thats why margind :auto auto not working
vínαч puppαl
@vinaypuppal
Sep 23 2016 20:19
@mones-cse try these
body{
  /* min-height: 800px;*/
}
.container{
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
Monesul Haque
@mones-cse
Sep 23 2016 20:20
@vinaypuppal wow it works thanks :)
CamperBot
@camperbot
Sep 23 2016 20:20
:cookie: 560 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
mones-cse sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
Hansi2468
@Hansi2468
Sep 23 2016 20:20

Is there anyone that can tell me why i am getting TypeError: str.toLowerCase is not a function when my code is:
function titleCase(str) {
str = str.split(" ");
str = str.toLowerCase();

return str;
}

titleCase("I'm a little tea pot");

vínαч puppαl
@vinaypuppal
Sep 23 2016 20:21
@Hansi2468 because str is Array not String after executing this line str = str.split(" "); since split converts str to array
Hansi2468
@Hansi2468
Sep 23 2016 20:22
@vinaypuppal should i switch em?
Monesul Haque
@mones-cse
Sep 23 2016 20:23
@Hansi2468 just at first try lower case then split like
function titleCase(str) {
str = str.toLowerCase();
str = str.split(" ");
return str;
}
titleCase("I'm a little tea pot");
JD Tadlock
@jdtdesigns
Sep 23 2016 20:23
@Hansi2468 Your capitalizing the first letter of each word, so you need to iterate through the array and change the first letter of each value in the array to a capital letter.
then covert it back to a string
Hansi2468
@Hansi2468
Sep 23 2016 20:24
@mones-cse I did that and it works ;) thanks
CamperBot
@camperbot
Sep 23 2016 20:24
hansi2468 sends brownie points to @mones-cse :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @mones-cse |http://www.freecodecamp.com/mones-cse
vínαч puppαl
@vinaypuppal
Sep 23 2016 20:25
@Hansi2468 so after spliting use http://mdn.io/map to convert first letter of each word to UpperCase
Hansi2468
@Hansi2468
Sep 23 2016 20:26
@jdtdesigns I don’t quite understand, how would you write it?
@vinaypuppal I am trying, but i can’t figure out how to write the arr.map function
JD Tadlock
@jdtdesigns
Sep 23 2016 20:28
@Hansi2468
// you use .map() like this
arr.map(function(val) {
  // val represents each value in the array
  // you can change the value anyway you please
});
Hansi2468
@Hansi2468
Sep 23 2016 20:34

Pretty sure i did something wrong, bc now it says return str;} this i my code:
function titleCase(str) {
str = str.toLowerCase();
str = str.split(" ");

arr.map(function(val) {
str = str.arr.map();
}
return str;}
titleCase("I'm a little tea pot");

vínαч puppαl
@vinaypuppal
Sep 23 2016 20:36
@Hansi2468 This is how you use map
var numbers = [1, 4, 9];
var doubles = numbers.map(function(num) {
  return num * 2;
});
// doubles is now [2, 8, 18]. numbers is still [1, 4, 9]

@Hansi2468

str = str.split(' ');
// now str is ["I'm", "a", "little", "tea", "pot"]

so use map like above you will get access to individual word inside map and i think you did previous challenges on how to capitalize first letter in word.

leil124
@leil124
Sep 23 2016 20:41

<style>
.red-text {
color: red;
p{font-size:18px;
}
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

WHATS WRONG GUYS
Hansi2468
@Hansi2468
Sep 23 2016 20:42
@leil124 whats the challenge
Stephen James
@sjames1958gm
Sep 23 2016 20:42
@leil124 Which challenge
leil124
@leil124
Sep 23 2016 20:42
Change the Font Size of an Element
vínαч puppαl
@vinaypuppal
Sep 23 2016 20:42
and finally join array in to string
var a = ['Wind', 'Rain', 'Fire'];
var myVar1 = a.join(' ');      // assigns 'Wind Rain Fire' to myVar1
@Hansi2468
leil124
@leil124
Sep 23 2016 20:43
and do we have to learn html and css in order to learn javascript?
Stephen James
@sjames1958gm
Sep 23 2016 20:43
@leil124 You need to put your p style after the closing } for your .red-text
Hansi2468
@Hansi2468
Sep 23 2016 20:43
@vinaypuppal I can see the logic, but I just can’t get the map function to work… :/
Stephen James
@sjames1958gm
Sep 23 2016 20:43
@leil124 no you can learn javascript independent of html/css
vínαч puppαl
@vinaypuppal
Sep 23 2016 20:44
@Hansi2468 You can even use for loop to loop over array and convert words to title case instead of using map
JD Tadlock
@jdtdesigns
Sep 23 2016 20:44
@leil124 start with html/css and get to where you can build web pages
then move on to js
because js is required for any web dev position frontend or backend
leil124
@leil124
Sep 23 2016 20:45
whats the difference between java and javascript
JD Tadlock
@jdtdesigns
Sep 23 2016 20:45
two very different programming languages @leil124
leil124
@leil124
Sep 23 2016 20:46
Challenge destroyed! @sjames1958gm :+1:
Stephen James
@sjames1958gm
Sep 23 2016 20:46
@leil124 It is only coincidental they both have java in the name
@leil124 :+1:
leil124
@leil124
Sep 23 2016 20:47
which one is better because im 15 years old
Hansi2468
@Hansi2468
Sep 23 2016 20:47
@vinaypuppal Sure, i’ll try that - just a minute
JD Tadlock
@jdtdesigns
Sep 23 2016 20:47
@leil124 for web dev go with js
Stephen James
@sjames1958gm
Sep 23 2016 20:47
@leil124 If you are interested in web development, then js
leil124
@leil124
Sep 23 2016 20:47
so java is harder ?
how long does it take to learn a programming language sorry for these questions im just a beginner who had just started learning 2 days ago
JD Tadlock
@jdtdesigns
Sep 23 2016 20:48
both are not easy @leil124
learning to program takes years
Hansi2468
@Hansi2468
Sep 23 2016 20:49
@leil124 i’ve been at it for some two weeks, and in Javascript now, its hard
leil124
@leil124
Sep 23 2016 20:49
whats the easiest language
JD Tadlock
@jdtdesigns
Sep 23 2016 20:50
@leil124 none? lol
leil124
@leil124
Sep 23 2016 20:50
wow im so desperate now :worried:
JD Tadlock
@jdtdesigns
Sep 23 2016 20:51
the youtube ads may have tricked you into thinking this stuff is easy
web dev is one of the hardest trades to learn
like becoming a doctor
leil124
@leil124
Sep 23 2016 20:51
what about gaming is it also as hard as these ones?
Hansi2468
@Hansi2468
Sep 23 2016 20:51
Can any one tell me if “st" is the same as “string" or “str"?
Monesul Haque
@mones-cse
Sep 23 2016 20:52
@leil124 its not easy but if you truly interested then it will be easy for you
game dev much more harder than web dev
leil124
@leil124
Sep 23 2016 20:52
i dont really have spare time but i am interested but how am i supposed to memorize all these codes etc
Hansi2468
@Hansi2468
Sep 23 2016 20:53
You shouldn’t memorize but find the structure, that helps a lot
JD Tadlock
@jdtdesigns
Sep 23 2016 20:53
@mones-cse Let's not falsify fact my friend. People need to know this will be one of the hardest things to learn and stick with. But if you DO stick it out, it's very fulfilling and useful.
vínαч puppαl
@vinaypuppal
Sep 23 2016 20:53

Can any one tell me if “st" is the same as “string" or “str"?

@Hansi2468 sorry i did not understand what you mean above

Hansi2468
@Hansi2468
Sep 23 2016 20:55
@vinaypuppal - I read a line of code which had for (var st in newText), and i thought if var st was the same as var str. Hope it makes better sens
Monesul Haque
@mones-cse
Sep 23 2016 20:55
@jdtdesigns thats what i told not easy but if stick with it eventually it will become easy
and by easy i am talking about language not programming itself
leil124
@leil124
Sep 23 2016 20:57
i just wanna know how all games programs websites are done and how they work thats why im here
Hansi2468
@Hansi2468
Sep 23 2016 21:02

@vinaypuppal could you or any one else help, i can’t get this to work… :/

function titleCase(str) {
var newText = str.split(" ");
var newTitles = [];
for (var st in newText){
newTitles = newText[st].toLowerCase().replaceAt(0, newText[st]).charAt(0).toUpperCase();
}

return newTitles.join(" ");}

titleCase("I'm a little tea pot");

fuad47
@fuad47
Sep 23 2016 21:05
text-align:center; my text is ok with horizontally but its head hits the roof
with what css property can i drag to middle vertically too
Reggie
@Reggie01
Sep 23 2016 21:19

@Hansi2468 I don't think replaceAt is a string function. Also, newTitles you initialize as an array. But in your for loop you assign newTitles a string. String class does not have a join method. Look at String methods or W3c as reference for methods. I would start with

for (var st in newText){
console.log( st ); // check your console by pressing F12 and click console tab in chrome
}

Double checking that "st" is what you think it is.

xSnowpeltx
@xSnowpeltx
Sep 23 2016 21:20
I'm trying to make a block of color around an image and a line of text, as the background color, but I can only figure out how to turn the whole line that color, instead of having the original color on either side
Greg
@Gregb1609
Sep 23 2016 21:29
Hi room
John F Kirkpatrick
@jfkirkpatrick
Sep 23 2016 21:29
I am close but no cigar!! I am trying to send the quote to my twitter account (@JfredK) with no success. I would appreciate any assistance you can give me. In advance, thank you. John.
CamperBot
@camperbot
Sep 23 2016 21:29
jfkirkpatrick sends brownie points to @jfredk :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jfredk
John F Kirkpatrick
@jfkirkpatrick
Sep 23 2016 21:30
BK_5000
@briankidd9design
Sep 23 2016 21:31
@vinaypuppal BTW my issue was actually a stupid oversight, I did not have "container-fluid in parentheses. Once I did that of course the "img-repsonsive" class worked
Daigham
@Daigham
Sep 23 2016 21:34
Hi everyone
Anyone alive?
Stephen James
@sjames1958gm
Sep 23 2016 21:36
No-one here but us bots
vínαч puppαl
@vinaypuppal
Sep 23 2016 21:37
@sjames1958gm :smile:
@briankidd9design Since you loaded Twitter widget you cant access your #tweet-quote from JS it will be replaced by iframe you can verify that in chrome dev tools. So use your own a tag style it as button and change its href in JS dynamically using http://twitter.com/share?text=your quote and author
or
for every new quote delete the #tweet-quote and rebuild it with new quote
Stephen James
@sjames1958gm
Sep 23 2016 21:38
@vinaypuppal As much as we are on this channel we must be robits
U-ways
@U-ways
Sep 23 2016 21:40
@sjames1958gm @Daigham Hope both of you having a good night! (I would turn into a bot if I didn't have lots of studying to do this year :P)
John F Kirkpatrick
@jfkirkpatrick
Sep 23 2016 21:41
@vinaypuppal Thx I will it a try.
CamperBot
@camperbot
Sep 23 2016 21:41
jfkirkpatrick sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 561 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
David
@davidwilson70
Sep 23 2016 21:41
Some one have about 10 minutes to look over some code for me ? I'm working on the Pomodoro Clock and have it all done but my 2nd clock isn't counting down right and I can't for the life of me find the issue .
Hansi2468
@Hansi2468
Sep 23 2016 21:43
@Reggie01 thanks but i made it work
CamperBot
@camperbot
Sep 23 2016 21:43
hansi2468 sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:cookie: 366 | @reggie01 |http://www.freecodecamp.com/reggie01
Natasha
@NatashaSetnik
Sep 23 2016 21:45
Help me please, I have a problem with Local Weather App. https://codepen.io/NatashaSetnik/pen/XjrdPJ
CamperBot
@camperbot
Sep 23 2016 21:45
no wiki entry for: me please i have a problem with local weather app httpscodepenionatashasetnikpenxjrdpj
Natasha
@NatashaSetnik
Sep 23 2016 21:46
When I try to make a request to api I recieve an error "jquery.min.js:4 Mixed Content: The page at 'https://codepen.io/NatashaSetnik/pen/XjrdPJ' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?lat=49.9071031&lon=28.563195399999998&APPID=6d9ef3b57680f710aca13086003811a6'. This request has been blocked; the content must be served over HTTPS."
vínαч puppαl
@vinaypuppal
Sep 23 2016 21:53
@NatashaSetnik as you loaded your pen over https you need to make all API requests over https only. So you could try
'https://api.openweathermap.org/data/2.5/weather?lat=49.9071031&lon=28.563195399999998&APPID=6d9ef3b57680f710aca13086003811a6'
But still it wont work as openweathermap does not support https
so as temporary workaround you may use proxy server https://crossorigin.me like
'https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat=49.9071031&lon=28.563195399999998&APPID=6d9ef3b57680f710aca13086003811a6'
But its not good to use public proxy servers(becoz of security issues and downtimes) so next time use API that supports https only
Here is some discussion going on in FCC community FreeCodeCamp/FreeCodeCamp#9145 read this to find other alternatives
Stephen James
@sjames1958gm
Sep 23 2016 21:54
@U-ways NIght - off to watch my daughter play volleyball
David
@davidwilson70
Sep 23 2016 21:56
@NatashaSetnik look over my code. there's an issue with chrome that makes that happen . http://codepen.io/DWilson70/pen/XjWrPO
Natasha
@NatashaSetnik
Sep 23 2016 21:57
@vinaypuppal thank you very much, you really helped me
CamperBot
@camperbot
Sep 23 2016 21:57
natashasetnik sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 562 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Natasha
@NatashaSetnik
Sep 23 2016 21:59
@davidwilson70 thank you
CamperBot
@camperbot
Sep 23 2016 21:59
natashasetnik sends brownie points to @davidwilson70 :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @davidwilson70 |http://www.freecodecamp.com/davidwilson70
vínαч puppαl
@vinaypuppal
Sep 23 2016 21:59
@davidwilson70 Hey hi, http://ip-api.com/json IP API is blocked by many AdBlocker Extentsions as most of us use them so it not good idea to use IP API. Your pen is not working in my browser since i have uBlock Origin Extension so take a look at FreeCodeCamp/FreeCodeCamp#9145 to find other alternatives
David
@davidwilson70
Sep 23 2016 22:01
right on I didn't know that thanks @vinaypuppal
CamperBot
@camperbot
Sep 23 2016 22:01
davidwilson70 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 563 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Johnny
@JohnnyBizzel
Sep 23 2016 22:15
Anyone having problems with jQuery on codepen? It says it is not loaded.
https://codepen.io/JohnnyBizzel/pen/VKKEPy
Same code deployed to the internet works fine. http://coding.citytravelling.me.uk/project/jsCalculator.html
Note, the project is not done yet
Hansi2468
@Hansi2468
Sep 23 2016 22:16

Is there any one that can help me, i am trying to return “” when num = -2, can anyone help?

function repeatStringNumTimes(str, num) {
var math = str.repeat(num);
return math;
}

repeatStringNumTimes("abc", -2);

vínαч puppαl
@vinaypuppal
Sep 23 2016 22:23
@briankidd9design oh okay :smile:
Casey Heath
@ExhibitArts
Sep 23 2016 22:51
Does anyone know why I can't find the main chat room?
vínαч puppαl
@vinaypuppal
Sep 23 2016 22:55
@ExhibitArts you can find all FCC gitter rooms here https://gitter.im/orgs/FreeCodeCamp/rooms
and this is main room https://gitter.im/FreeCodeCamp/FreeCodeCamp
Casey Heath
@ExhibitArts
Sep 23 2016 22:56
@vinaypuppal I think I may have gotten banned. I keep trying to go to the main chat and it says "404 Error".
"404. This is not the chat you're looking for. Sorry. :("
The admin is a cunt
Angela
@Baby007mix
Sep 23 2016 23:02
I have completed the tribute page, however. i had entered the wrong url in the subit your project page. How can I correct this?
vínαч puppαl
@vinaypuppal
Sep 23 2016 23:03
@Baby007mix open that challenge again and resubmit correct URL , it will be updated
Michael Davis
@mhdavis
Sep 23 2016 23:04
Can anyone give me some Navbar help? I'm trying to configure the css for it, but it won't let me change the default colors on the lettering
Angela
@Baby007mix
Sep 23 2016 23:07
@vinaypuppal thanks that worked.
CamperBot
@camperbot
Sep 23 2016 23:07
baby007mix sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 564 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:12
@mhdavis I'll take a look.
Michael Davis
@mhdavis
Sep 23 2016 23:12
@tourdejord thanks really appreciate it!
CamperBot
@camperbot
Sep 23 2016 23:12
mhdavis sends brownie points to @tourdejord :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @tourdejord |http://www.freecodecamp.com/tourdejord
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:13
No problem.
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:18
text-shadow: 0.25px is missing semi-colon after it.
but doesn't fix the problem. still looking.
Michael Davis
@mhdavis
Sep 23 2016 23:19
which section in the css did you see that in?
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:21
My bad. Thought I added that. jumbotron
body {
 font-family: 'Raleway', sans-serif, sans-serif;
 font-size: 18px;

}
fix that
dangit. I posted the solution.
But yours is incorrect.
Michael Davis
@mhdavis
Sep 23 2016 23:24
is it because mine has the additional semi-colon
and two sans-serif
i removed one of them
and fixed the semicolon
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:25
yeah just the extra semi-colon. there's another class with an extra semi-colon.

  text-shadow: 0.25px; 0.25px 0.25px #000000;
Michael Davis
@mhdavis
Sep 23 2016 23:26
changed that too; thanks
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:26
ok, I'm reloading the pen.
heres the link again in case it got lost in the convo
vínαч puppαl
@vinaypuppal
Sep 23 2016 23:27
@mhdavis If i understood your question you want to change colors of nav links right??
try this css if so
.navbar-default .navbar-nav>li>a {
    color: #fff;
}
Michael Davis
@mhdavis
Sep 23 2016 23:27
yea that's correct
Jordan Bartholomew
@tourdejord
Sep 23 2016 23:27
Gotta go thanks for jumping in @vinaypuppal
CamperBot
@camperbot
Sep 23 2016 23:27
tourdejord sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 565 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Michael Davis
@mhdavis
Sep 23 2016 23:29
@vinaypuppal right on. that did it
vínαч puppαl
@vinaypuppal
Sep 23 2016 23:30
@mhdavis :+1:
Michael Davis
@mhdavis
Sep 23 2016 23:30
so does the > indicate that within the .navbar-nav class alter these things
also doing that applies it only to the li items in the bar but not the brand
vínαч puppαl
@vinaypuppal
Sep 23 2016 23:32
@mhdavis > its a child selector and bootstrap.css used .navbar-default .navbar-nav>li>a to target links so to override we also need to access links in same way
Read more about child selector here
Michael Davis
@mhdavis
Sep 23 2016 23:40
@vinaypuppal right on. thanks
CamperBot
@camperbot
Sep 23 2016 23:40
mhdavis sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 566 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal