These are chat archives for FreeCodeCamp/HelpFrontEnd

8th
Nov 2016
José Olórtegui
@jolortegui98
Nov 08 2016 00:04
$("body").css("background", "blue");
You must change "color" for "Background"!
@Waqas909
Waqas Abbasi
@Waqas909
Nov 08 2016 00:06
i did that
@jolortegui98 However that didnt help
José Olórtegui
@jolortegui98
Nov 08 2016 00:06
Really?
I'm checking your code
Waqas Abbasi
@Waqas909
Nov 08 2016 00:06
Yup
@jolortegui98 Ok coolio
@jolortegui98 Found it! I forgot to enable Jquery in my pen
xD
José Olórtegui
@jolortegui98
Nov 08 2016 00:08
xD
You're starting on web design no?
Salomon
@zarruk
Nov 08 2016 00:10
@zarruk
Hello. Can somebody help me with the Exact Change challenge?
I don't find how it is expected for me to use objects in the challenge
Waqas Abbasi
@Waqas909
Nov 08 2016 00:10
@jolortegui98 Yea :P I completely forgot I had to externally add Jquery
@jolortegui98 THanks anyway
CamperBot
@camperbot
Nov 08 2016 00:10
waqas909 sends brownie points to @jolortegui98 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jolortegui98
Salomon
@zarruk
Nov 08 2016 00:10
Hello. Can somebody help me with the Exact Change challenge?
I don't find how it is expected for me to use objects in the challenge
José Olórtegui
@jolortegui98
Nov 08 2016 00:11
$("#tweet").click(function(){});
You can write like this..it's the same.. ; )
José Olórtegui
@jolortegui98
Nov 08 2016 00:17
@Waqas909
Waqas Abbasi
@Waqas909
Nov 08 2016 00:18
@jolortegui98 Oh okay, Thanks, that sounds more convinient!
CamperBot
@camperbot
Nov 08 2016 00:18
waqas909 sends brownie points to @jolortegui98 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jolortegui98
Art
@maceo32
Nov 08 2016 00:40
I'm working on my pro-folio and i would like to add some J Query, however the scripts I am attempting to run do not provide the bouncing motion like they do in the tutorial. I have added the J Query and JQueryUI links but still no affect. Does Code Camp use some sort of JQuery plugin? Please Help :(
Hiago Patrick
@HiagoPatrick
Nov 08 2016 00:55
hey guys, good night, hope uno is fine ya
i need help, they asked me to build a codepen.io app, that has image, text, a list and a link that take us to anoda page so we can read more,
the thing is, this codepen says that somethings is already added by them, such ass the tag style, and i have no idea of what i have to put there,
i'm kinda used to dreamweaver, where we build things from zero, and i'm not undestanding what they want me to do there,
can anybody help me out?
sorry for the wrong spelling, i'm having some kinda trouble in my notebook ¬¬
such as the style tag,
José Olórtegui
@jolortegui98
Nov 08 2016 01:11
@HiagoPatrick can you explain it better please.?
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:15
ok, jamaican patwah messed up my english, sorry. Basically, i'm not understanding how codepen works, there are 3 spaces names "html" "css" "js" which we use to write the codes, and they told me that for instace, in the css space i don't need to write the tag <style></style> because it's already there. I just dont know waht i need to put what i don need,
and what i don need *
José Olórtegui
@jolortegui98
Nov 08 2016 01:16
yeah..it's right
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:17
ok, so how do i work there? how do i know what is already there and what is not?
José Olórtegui
@jolortegui98
Nov 08 2016 01:17
codepen give you a linked css sheet..
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:18
i opened dreamweaver for the first time after 2 years and i knew what to do. I just finished a lot of exercises on fcc and i'm completly lost there,
José Olórtegui
@jolortegui98
Nov 08 2016 01:19
only when you want to put your styles on the html you need to use the style tag..
when you start a project from scratch is different..
you must add the basic structure and stuff like that..
but in codepen you just need start to code..
Do you understand? @HiagoPatrick
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:22
that seems to be more difficult for me.
i'm steel lost
but thanks, i'll see what i can do there.
still *
Han Song
@song-han
Nov 08 2016 01:23
http://codepen.io/micheal_song/pen/ENjNbZ?editors=1010
I have a question about bootstrap accordion as above codes showing. The functionality is that when I click Collapsible Group Item #1, I will append some element to .panel#collapseOne" element and then expand this panel with animation. My problem is that I can append elements and expand the panel, but the expanding animation disappears. Can someone help me solve this problem? Thank you very much!!
José Olórtegui
@jolortegui98
Nov 08 2016 01:23
Ok..you can start learning on freecodecamp or in codeacademy
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:25
i'm more used to create the whole thing, to see them together, i don know how to work them the way it is codepen.
i guess i need to get used to it yet
José Olórtegui
@jolortegui98
Nov 08 2016 01:25
@michealsong i think is because you're using setTimeout
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:26
but thanks anyway
José Olórtegui
@jolortegui98
Nov 08 2016 01:26
@HiagoPatrick you need to probe codepen.. you gonna love it
Han Song
@song-han
Nov 08 2016 01:26
@jolortegui98 That because these elements are appended after an ajax call.
@michealsong I use setTimeout to mock Ajax call
José Olórtegui
@jolortegui98
Nov 08 2016 01:28
@michealsong but i think that is freezing your animation
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:30
what is probe?
José Olórtegui
@jolortegui98
Nov 08 2016 01:31
prove*
Hiago Patrick
@HiagoPatrick
Nov 08 2016 01:31
oh, yea, maybe that's it
José Olórtegui
@jolortegui98
Nov 08 2016 01:31
jajajaja.. sorry
Han Song
@song-han
Nov 08 2016 01:31
@jolortegui98 My workflow is that:
step 1: click heading
step 2: send ajax
step 3: append elements according to ajax response
Therefore, how can I doesn’t freeze animation?
José Olórtegui
@jolortegui98
Nov 08 2016 01:33
Ok..i'm checking your code..
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 01:36
anyone open to troubleshooting my codepen?
José Olórtegui
@jolortegui98
Nov 08 2016 01:37
really i don't now.. @michealsong
I'm not a good js coder..jajaja
Han Song
@song-han
Nov 08 2016 01:38
@jolortegui98 Maybe it’s impossible. Thank you!
CamperBot
@camperbot
Nov 08 2016 01:38
michealsong sends brownie points to @jolortegui98 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jolortegui98
José Olórtegui
@jolortegui98
Nov 08 2016 01:38
No problem..! :D
@JeffGreenlee42 what's your problem.?
Han Song
@song-han
Nov 08 2016 01:39
@jolortegui98 If you find the answer, please tell me. ^-^
José Olórtegui
@jolortegui98
Nov 08 2016 01:40
Ok..! @michealsong
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 01:40
first .. I can't get a stored github URL to display.. I did an hour ago.. but couldn't control it. But now it doesn't even display!
José Olórtegui
@jolortegui98
Nov 08 2016 01:41
what is your coden url.?
José Olórtegui
@jolortegui98
Nov 08 2016 01:43
@JeffGreenlee42 what do you want to do exactly?
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 01:44
I'm working on my Portfolio challenge. Just getting started.. actually. My first page should show a background image. Just an arbitrary one of mine I uploaded to github.
Hi have numerous issues! Another glaring one is that I have a Paragraph that is stuck behind the banner! I'm trying to use Flexbox for my display.
buiphuking
@buiphuking
Nov 08 2016 01:49
if i rewrite this web http://www.cambridgespeak.com/ , should i use pure css or bootstrap???????????????
José Olórtegui
@jolortegui98
Nov 08 2016 01:49
@JeffGreenlee42 change this..
.introduction-paragraph {flex: 1;
width: 100%;
height: 100px;
background-image: url("https://raw.githubusercontent.com/JeffGreenlee42/My-scratch-portfolio/master/img/Fall%20Leaf.jpg");
background-size: cover;
background-repeat: no-repeat;
}
You must set a height for the element to be displayed..
And the that is the real image link..
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 01:51
Hmm.. @jolortegui98 Can you tell me what I was doing wrong?
buiphuking
@buiphuking
Nov 08 2016 01:51
if i rewrite this web http://www.cambridgespeak.com/ , should i use pure css or bootstrap???????????????
@lhmxi
Nov 08 2016 01:52
Build a Tribute Page
José Olórtegui
@jolortegui98
Nov 08 2016 01:53
There i set a height for the .introduction-paragraph..and i put the right image url..
@JeffGreenlee42
@buiphuking it's up to you man..
buiphuking
@buiphuking
Nov 08 2016 01:56
@jolortegui98 thanks
CamperBot
@camperbot
Nov 08 2016 01:56
buiphuking sends brownie points to @jolortegui98 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jolortegui98
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 01:58
Hmmm.. still won't work. Is there anywhere in the inspector that will tell me why it won't display the image? The weird part is that when you pasted the code in this Chat .. the image displayed!!! which proves the source is legit!
buiphuking
@buiphuking
Nov 08 2016 01:59
@jolortegui98 one more thing
how to split up column with html5 ?
Salomon
@zarruk
Nov 08 2016 02:01
can somebody help me with the Exact Change challenge?
it is expected for me to use objects but i don't really find how to.
and I'm sure there's a shorter way of doing the challenge than how I'm doing it
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 02:04
Holy crap this is frusterating!
this is the right image url..
replace it..
And it will work..
@buiphuking you can do two divs inside to another div..then you can use display: flex
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 02:07
Hmmm.. @jolortegui98 help me understand... I accessed my github image and did a "Copy image address".. why does that not work?
José Olórtegui
@jolortegui98
Nov 08 2016 02:07
Apply the display property to the parent div..
Bin Ling
@HoBinLing
Nov 08 2016 02:08
@coymeetsworld @Mr-Kumar-Abhishek thank you!
CamperBot
@camperbot
Nov 08 2016 02:08
hobinling sends brownie points to @coymeetsworld and @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:star2: 1505 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
:cookie: 396 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
José Olórtegui
@jolortegui98
Nov 08 2016 02:11
@JeffGreenlee42 because you use the image inside the github environment
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 02:11
@jolortegui98 what did you do to get the correct image address?
José Olórtegui
@jolortegui98
Nov 08 2016 02:12
right click on the image..and open it in another tab..
and copy the url..
try with another image..and you will understand
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 02:14
Ok.. I see.. but that is weird!!!! I wonder why github wouldn't have something like "Copy absolute image address" or something like that. Seems like a kludgy way to get it!
José Olórtegui
@jolortegui98
Nov 08 2016 02:15
Jajaja yeah..
And that's all
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 02:15
Well.. thank you @jolortegui98 !
CamperBot
@camperbot
Nov 08 2016 02:15
jeffgreenlee42 sends brownie points to @jolortegui98 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jolortegui98
José Olórtegui
@jolortegui98
Nov 08 2016 02:15
Good night..i'm going to sleep..
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 02:15
pleasant dreams!
José Olórtegui
@jolortegui98
Nov 08 2016 02:16
No problem.. ;D
Thanks..
lacey irvin
@laceyIrvin
Nov 08 2016 03:05
@BrianCodes33 yes thank you!
CamperBot
@camperbot
Nov 08 2016 03:05
laceyirvin sends brownie points to @briancodes33 :sparkles: :thumbsup: :sparkles:
:cookie: 9 | @briancodes33 |http://www.freecodecamp.com/briancodes33
DivinePrism
@DivinePrism
Nov 08 2016 03:29
how do i delete gist
i made one by acident
Bin Ling
@HoBinLing
Nov 08 2016 05:04

How do I align a <div> to the center of the page?
I wanted to add two arrow buttons
(button1)Header(button2), Button 1 jumping to top of page and Button 2 to next section. Managed to do so but having difficulty to have entire group to align to center of page. Here is my code:
<div class="row">
<!-- button up-->
<div class="col-xs-2">
<a href=#Header><button type="button" class="btn btn-default" >
<span class="glyphicon glyphicon-chevron-up" aria-hidden="true"></span>
</button></a>
</div>
<!--Header-->

<div class="col-xs-4"><h3>Timeline</h3></div>

<div class="col-xs-2">
<a href=#Legacy><button type="button" class="btn btn-default" >
<span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>
</button></a>
</div>
</div>

Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 05:33
hello world
CamperBot
@camperbot
Nov 08 2016 05:33

welcome to FreeCodeCamp @JeffGreenlee42!

A_A
@Otto-AA
Nov 08 2016 05:59
@HoBinLing what about bootstrap's center or center-block classes?
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:04
Anybody familiar with flexbox?
A_A
@Otto-AA
Nov 08 2016 06:04
@JeffGreenlee42 just a bit, why?
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:08
I have a puzzle.. I am working on my portfolio challenge. I want each section to take up the full screen and have a background image... but something is limiting the size of my first background image.. even though I am setting width and height of the first one at 100%
A_A
@Otto-AA
Nov 08 2016 06:10
@JeffGreenlee42 Give main width: 100% to make it full width
ExoticDriftzz
@ExoticDriftzz
Nov 08 2016 06:11
Hello Everyone
heroiczero
@heroiczero
Nov 08 2016 06:12
Hello @ExoticDriftzz
ExoticDriftzz
@ExoticDriftzz
Nov 08 2016 06:12
I have a quick question about the Challenge "Build a Tribute Page" Does it have to be a Tribute? or could it be a inspiring person?
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:15
@Otto-AA hmm..that didn't make any difference.
benphua
@benphua
Nov 08 2016 06:18
Hi guys, just started the map, it’s nice to meet you all
Sorin Ruse
@sorinr
Nov 08 2016 06:21
@JeffGreenlee42 make intro height: 100vh; width: 100vw; and it will work
@JeffGreenlee42 and add to body {overflow-x: hidden;}
Bin Ling
@HoBinLing
Nov 08 2016 06:30
@Otto-AA its not working though :( inserted <div class="row center center-block">
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:33
@sorinr No luck... It just makes the image smaller.. and it only takes up about 1/5 of the width.
Bin Ling
@HoBinLing
Nov 08 2016 06:33
@Otto-AA solved it, thanks anyway, i placed the buttons within h3 instead
CamperBot
@camperbot
Nov 08 2016 06:33
hobinling sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 369 | @otto-aa |http://www.freecodecamp.com/otto-aa
Sorin Ruse
@sorinr
Nov 08 2016 06:33
@JeffGreenlee42 example maybe i forget to tell u something
Bin Ling
@HoBinLing
Nov 08 2016 06:36
@ExoticDriftzz IMO I dont think it makes much of a difference, the evaluation and feedback that i would want to get would be more on how my code can be improved than the contents of the page.....
Sorin Ruse
@sorinr
Nov 08 2016 06:43
@HoBinLing hi. i miss Singapore. been there many times but not in the last few years
Bin Ling
@HoBinLing
Nov 08 2016 06:45
@sorinr hello ~its the rainy season now ! loads of new touristy attractions nowadays.... :'D
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:48
@sorinr I must have something happening with my codepen.. I copied your code into my codepen and I get something completely different!
Sorin Ruse
@sorinr
Nov 08 2016 06:48
@HoBinLing i know its rainy now.
@JeffGreenlee42 but mine its working the way you want?
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:50
yes.. but I need to understand WHY? If I copy your code exactly as it is and paste it in to mine.. What is different?
in mine.. I just get a small image.. It does not stretch vertically or horizonally!
Sorin Ruse
@sorinr
Nov 08 2016 06:51
@JeffGreenlee42 let me reopen your pen and take a look
@JeffGreenlee42 ok make width: 100vw; not width: 100vh;
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 06:55
Ok.. thanks.. What does "vw" stand for? and why doesn't 100% not work?
I mean why doesn't 100% work?
Sorin Ruse
@sorinr
Nov 08 2016 06:58
@JeffGreenlee42 vh = viewport height vw = viewport width
@JeffGreenlee42 here some info that may help regarding css units: http://www.w3schools.com/cssref/css_units.asp
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:04
@sorinr @JeffGreenlee42 http://www.w3fools.com/ before you read from that site read this.
Rob
@s31181
Nov 08 2016 07:08
hey guys what's up - I'm working on the show the local weather app - and i can't get the page to load the content but if i run it on my phone it the content loads - also any advice on cleaning up my js would be great too https://codepen.io/s31181/pen/yVNOEe?editors=1111
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 07:08
@sorinr @Mr-Kumar-Abhishek Hmm.. neither site does much to explain the difference between "vw" and "%"!
Sorin Ruse
@sorinr
Nov 08 2016 07:09
@Mr-Kumar-Abhishek yes. i personally use a lot css-tricks and also mdn
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:09
https://docs.webplatform.org/wiki/Main_Page you could dig through here it is maintained by w3c itself ~ if its not there . well run to stackoverflow
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 07:10
My question is this... "vw" is a percentage of the view screen.. but does this apply to a div or section that is nested inside of a view screen?
Sorin Ruse
@sorinr
Nov 08 2016 07:12
@JeffGreenlee42 here a version using % example
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:15
@JeffGreenlee42 sorry was reading your previous chat logs
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 07:15
@sorinr What does "overflow-x: hidden" do?
dsillydude
@dsillydude
Nov 08 2016 07:16
how do i add another page from portfolio site im kinda comfused and i dont wanna go back and look i shoul be missing sumn here just remind me
angel39366
@angel39366
Nov 08 2016 07:16
I am starting the front end development project
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:16
@JeffGreenlee42 I am an very old web developer , what I know is when you use percentages it a respective of its upper html element div or article
angel39366
@angel39366
Nov 08 2016 07:16
Build a tribute page
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:16
am a *
angel39366
@angel39366
Nov 08 2016 07:17
can i write about anyone?
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:17
in year around 2000 we used percentages for css units ...
now em or px is mostly used
dsillydude
@dsillydude
Nov 08 2016 07:17
@angel39366 i dont get you
Sorin Ruse
@sorinr
Nov 08 2016 07:18
@JeffGreenlee42 if u have elements that are wider then your viewport they will make the horizontal scrollbar appear. i don't think you want to see it
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:18
it is respective *
angel39366
@angel39366
Nov 08 2016 07:18
@dsillydude it is telling me to build a tribute page like the example I'm just not sure if they mean the same exact like his or can I write about another person?
dsillydude
@dsillydude
Nov 08 2016 07:19
@angel39366 they kinda gave you an example right>
Sorin Ruse
@sorinr
Nov 08 2016 07:19
@Mr-Kumar-Abhishek yes but I would use em more for fonts not for widths and heights
angel39366
@angel39366
Nov 08 2016 07:19
@dsillydude yes
dsillydude
@dsillydude
Nov 08 2016 07:20
@angel39366 just write about anyone
angel39366
@angel39366
Nov 08 2016 07:20
ok thank you very much @dsillydude
CamperBot
@camperbot
Nov 08 2016 07:20
angel39366 sends brownie points to @dsillydude :sparkles: :thumbsup: :sparkles:
:cookie: 124 | @dsillydude |http://www.freecodecamp.com/dsillydude
angel39366
@angel39366
Nov 08 2016 07:20
sorry that was an accident
don't even know how i did that hahaa
dsillydude
@dsillydude
Nov 08 2016 07:20
@angel39366 what about thank you?
CamperBot
@camperbot
Nov 08 2016 07:20
dsillydude sends brownie points to @angel39366 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for angel39366
Jeff Greenlee
@JeffGreenlee42
Nov 08 2016 07:21
@Mr-Kumar-Abhishek The concern I have is that sometimes it makes more sense to think in terms of how big the element you wish to fill is, not whatever the font is at.
Abhishek Kumar
@Mr-Kumar-Abhishek
Nov 08 2016 07:22
@sornir yes that would be best ~
@JeffGreenlee42 when you are starting web development it best to start with units (or combinations of units ) comfortable with then move on here is something you may want to look at http://stackoverflow.com/questions/609517/why-em-instead-of-px
you are comfortable *
Parley Kennelly
@parleydk
Nov 08 2016 07:44
@Mooli88 Thanks. For the dot notation clarification. Are there times when bracket notation doesn't work? Would it be simpler to just use bracket notation all the time?
CamperBot
@camperbot
Nov 08 2016 07:44
:cookie: 260 | @mooli88 |http://www.freecodecamp.com/mooli88
parleydk sends brownie points to @mooli88 :sparkles: :thumbsup: :sparkles:
Frank120
@Frank120
Nov 08 2016 08:11
hello body
joshandevera
@joshandevera
Nov 08 2016 08:42
hi everyone is there a way to cut the background pic? i want to reduce it but still want to show the evening skyline http://codepen.io/joshdv92/pen/ENapZR
Frank120
@Frank120
Nov 08 2016 08:42
good
Sorin Ruse
@sorinr
Nov 08 2016 08:49
@joshandevera something like this example ?
Aarya Bhorra
@aarya1302
Nov 08 2016 08:50
Hey guys I need an API for the Quotes thing
JSON API preferably
Thank you
Sorin Ruse
@sorinr
Nov 08 2016 08:52
@aarya1302 you can try http://forismatic.com/en/api/
Aarya Bhorra
@aarya1302
Nov 08 2016 08:54
Thanks @sorinr
CamperBot
@camperbot
Nov 08 2016 08:54
aarya1302 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 831 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Nov 08 2016 08:55
@aarya1302 welcome
Aarya Bhorra
@aarya1302
Nov 08 2016 08:55
But it says error
Can you help me please?
Sorin Ruse
@sorinr
Nov 08 2016 08:56
@aarya1302 try http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=jsonp&lang=en&jsonp=?
buiphuking
@buiphuking
Nov 08 2016 08:56
i have a question: when we use ruby on rails ??????????????????/
joshandevera
@joshandevera
Nov 08 2016 08:57
@sonrinr yeah.
Aarya Bhorra
@aarya1302
Nov 08 2016 08:58
Thanks but what are the : ?()
Sorin Ruse
@sorinr
Nov 08 2016 09:01
@aarya1302 jsonp=? means you are going to call a callback function to interpret the json result like: $.getJSON(url, function(result) {console.log(result)});
Aarya Bhorra
@aarya1302
Nov 08 2016 09:02
Ohh ok Thanks @sorinr
CamperBot
@camperbot
Nov 08 2016 09:02
aarya1302 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: aarya1302 already gave sorinr points
Aarya Bhorra
@aarya1302
Nov 08 2016 09:20
One more question
If I were to make an api myself how would I proceed to do that?
joshandevera
@joshandevera
Nov 08 2016 09:23
how you make the navbar collapse when you resize the browser http://codepen.io/joshdv92/pen/ENapZR
vínαч puppαl
@vinaypuppal
Nov 08 2016 09:27
@joshandevera First add jquery.js and then bootstrap.js
in codepen settings --> Javascript tab --> quickadd
Then You need to follow the navbar html structure present in the example as shown here http://getbootstrap.com/components/#navbar
F22rapt
@F22rapt
Nov 08 2016 09:46
ohio
Purcea Robert
@RobertPurcea
Nov 08 2016 10:07
@joshandevera
if are still stuck go check
w3schools
the navbar lesson from the bootstrap tutorial
in the last example they show you how to make a navigation bar that collapses when the screen is small
Purcea Robert
@RobertPurcea
Nov 08 2016 10:13
can you please point out what I am doing wrong?
the problem is when I try to navigate the page by clicking the Profile button in the navbar
it takes some space below it
instead right where it starts
it takes me*
Purcea Robert
@RobertPurcea
Nov 08 2016 10:21
forget it I solved the problem
Aarya Bhorra
@aarya1302
Nov 08 2016 11:13
var request = new XMLHttpRequest();
  request.open("GET", "http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en&json=?");
  request.onload = function(){
    var data = JSON.parse(request.responseText);
    console.log(data);
  }
  request.send();
The code is not working with the link but it works with other links
joshandevera
@joshandevera
Nov 08 2016 11:56
does it suppose to look like this ? http://codepen.io/joshdv92/pen/ENapZR?editors=1100
and any suggestion about the i like how looks but it's kinda cartoony. want it to look more professional
*font
Aarya Bhorra
@aarya1302
Nov 08 2016 12:24
@joshandevera it looks good
joshandevera
@joshandevera
Nov 08 2016 12:26
@aarya1302 but i want to align the page logo with about me, Portfolio, and contact
Aarya Bhorra
@aarya1302
Nov 08 2016 12:35
@joshandevera instead of putting the logo outside the div of the navbar put it inside like this
<div class=" collapse navbar-collapse navHeader">
      <a href="#" class="navbar-haeder">Joshan Devera</a>
    <ul class="nav navbar-nav navbar-right">
      <li class="active"><a href="#">About Me</a></li>
      <li><a href="#">Portfolio</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
    </div>
joshandevera
@joshandevera
Nov 08 2016 12:36
@aarya1302 i'll try that thanks dude
CamperBot
@camperbot
Nov 08 2016 12:36
:cookie: 260 | @aarya1302 |http://www.freecodecamp.com/aarya1302
joshandevera sends brownie points to @aarya1302 :sparkles: :thumbsup: :sparkles:
Aarya Bhorra
@aarya1302
Nov 08 2016 12:39
@joshandevera you're welcome
joshandevera
@joshandevera
Nov 08 2016 12:42
@aarya1302 look better now also change the padding so it would align better. :)
Aarya Bhorra
@aarya1302
Nov 08 2016 12:42
Good job
joshandevera
@joshandevera
Nov 08 2016 12:47
any tips on how to put a photo on the jumbotron
joshandevera
@joshandevera
Nov 08 2016 12:48
and can you use jpg or do need to convert them>
kirbyedy
@kirbyedy
Nov 08 2016 12:48
jpg is fine
joshandevera
@joshandevera
Nov 08 2016 12:50
i'm using this pic but when i put it is take up the whole screen how can i make it smaller
like the one on the sample
Aarya Bhorra
@aarya1302
Nov 08 2016 12:51

@aarya1302

var request = new XMLHttpRequest();
  request.open("GET", "http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en&json=?");
  request.onload = function(){
    var data = JSON.parse(request.responseText);
    console.log(data);
  }
  request.send();

The code is not working with the link but it works with other links
Can anyone help please the link is this:http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en&json=?

afani martin
@whiz25
Nov 08 2016 13:02
please check out my project on random quote machine. am facing difficulties with the quotes..help if possible....http://codepen.io/whiz25/pen/bBGGxa
knappsacks
@knappsacks
Nov 08 2016 13:27
anyone have experience with the Twitch tv zipline? I'm hitting a wall trying to get the .getJSON() function to work - seems like it's just not pulling the object, and I've made sure both are https and there is callback=foo on the api url
izakibikas
@izakibikas
Nov 08 2016 13:34
@whiz25 , it would be better if you find some API that gives you random quotes, instead of writing up on your own
kirbyedy
@kirbyedy
Nov 08 2016 13:34
@knappsacks link ?
knappsacks
@knappsacks
Nov 08 2016 14:02
@kirbyedy here's just a version of the .getJSON to play around with - https://codepen.io/knappsacks/pen/jVPvzK?editors=1010
I can sub in other apis (like the wikipedia one) and it works fine. Also, the twitch api link returns data when plugged directly into the browser. The strange part is, using "callback=?" errors, so you have to use a variable. I'm thinking that is potentially causing the issue, though I'm not sure how to fix it.
kirbyedy
@kirbyedy
Nov 08 2016 14:06
@knappsacks callback=? returns success
knappsacks
@knappsacks
Nov 08 2016 14:07
@kirbyedy but it doesn't pull in the data
so it goes out to the serve, but pulls in blanks
and if you plug that directly in a browser, you'll see the return is blank
kirbyedy
@kirbyedy
Nov 08 2016 14:07
nope, it works fine
check the image
Screen Shot 2016-11-08 at 16.07.31.png
it returns the object with the data in it
knappsacks
@knappsacks
Nov 08 2016 14:08
I don't see the data being returned
look at the #results div
it's blank
that's where the json is returning, the fail/success just tells you if the .getJSON completed
kirbyedy
@kirbyedy
Nov 08 2016 14:09
thats another story, the point is the api is returning data, and its working
knappsacks
@knappsacks
Nov 08 2016 14:09
okay, so I guess my question is how to get it returning data for the stream like the zipline requires, and not just blank data
grantknaver
@grantknaver
Nov 08 2016 14:12
an effective way of centering a div is ...
width:500px;
height:200px;
left: 50%;
top: 50%;
transform: translate(-250px, -100px);
correct?
kirbyedy
@kirbyedy
Nov 08 2016 14:14
@knappsacks now try to remember how do you access data from an array
the data you are getting back from api is an object
so for example: json.stream.channel.game
put that in and see what comes up
in the result div
knappsacks
@knappsacks
Nov 08 2016 14:16
@kirbyedy okay, mind blown
kirbyedy
@kirbyedy
Nov 08 2016 14:16
did you get any data back ? does it show in html ?
knappsacks
@knappsacks
Nov 08 2016 14:16
yes
kirbyedy
@kirbyedy
Nov 08 2016 14:16
there you go :)
knappsacks
@knappsacks
Nov 08 2016 14:16
I don't get what is happening though - ever other time I've used an API so far, you've been able to just insert "json", and the entire object will return
kirbyedy
@kirbyedy
Nov 08 2016 14:16
now, you are on your own
knappsacks
@knappsacks
Nov 08 2016 14:16
with this, it's blank, and it's blank in the webpage
kirbyedy
@kirbyedy
Nov 08 2016 14:17
yes, cause its an object
knappsacks
@knappsacks
Nov 08 2016 14:17
yet if you call all the way down to a specific object, data returns
ohh
you're saying that if it's an array, it will show, but if it's an object, it blanks
kirbyedy
@kirbyedy
Nov 08 2016 14:17
if you dont specify the exact array element it will return the object
it does not blank it just does not show the whole object
cause as you can see on that screenshot I gave you, the object is there, in the console
alive and kickin :)
full of data
you just have to target the specific one you need, and display it the way you want it in html
knappsacks
@knappsacks
Nov 08 2016 14:20
thanks @kirbyedy - you're a hero!
CamperBot
@camperbot
Nov 08 2016 14:20
knappsacks sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1514 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
knappsacks
@knappsacks
Nov 08 2016 14:21
finally get why JSON.stringify(json) is useful, too.

@grantknaver the easiest way I've found to center a div is to use

margin: 0 auto;

grantknaver
@grantknaver
Nov 08 2016 14:24
Im trying to attempt centering vertically
centering horizontal is easy enough this method should work though
rwobben
@rwobben
Nov 08 2016 14:31
but why does the box takes the whole width where I say it has to be col-xs-4 ?
knappsacks
@knappsacks
Nov 08 2016 14:33
@grantknaver seems to work well
@rwobben check your settings and make sure you have the bootstrap library connected
rwobben
@rwobben
Nov 08 2016 14:35
@knappsacks thanks that was the problem. One way or the other that setting has disappeared
CamperBot
@camperbot
Nov 08 2016 14:35
rwobben sends brownie points to @knappsacks :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @knappsacks |http://www.freecodecamp.com/knappsacks
John Enderby
@johnend
Nov 08 2016 14:36
Hey folks, just wondering about the portfolio piece of work in the front end section. Does it have to be uploaded to CodePen? I have already created/started a portfolio online already and would prefer not to replicate it on a different platform. Or should I just do it anyway?
Johnathon Sykes
@seesykescode
Nov 08 2016 14:37
you MAY be able to post your URL
but i think its automated and they check codepen urls.
knappsacks
@knappsacks
Nov 08 2016 14:37
@johnend FAQ just says the code should be viewable. Does not have to be codepen. https://www.freecodecamp.com/about
Johnathon Sykes
@seesykescode
Nov 08 2016 14:37
don't quote me on that. Might as well try it with your url
John Enderby
@johnend
Nov 08 2016 14:39
@knappsacks awesome news, probably should have checked there first! Information in the tasks doesn't suggest an alternative though so thought it might have been a no go.
John Enderby
@johnend
Nov 08 2016 14:48
thanks @knappsacks
CamperBot
@camperbot
Nov 08 2016 14:48
johnend sends brownie points to @knappsacks :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @knappsacks |http://www.freecodecamp.com/knappsacks
cdmanalansan
@cdmanalansan
Nov 08 2016 14:52

http://codepen.io/maruimarui0101/pen/aBORRW

hi all, I made some btns each in col-xs-4 in a single row and i want to center these btns, how to do that? ><

Tijani Oluwatobiloba
@teebee09
Nov 08 2016 15:05
Hello World!
CamperBot
@camperbot
Nov 08 2016 15:05

welcome to FreeCodeCamp @teebee09!

DreCurrency
@drecurrency
Nov 08 2016 15:10
Hello world!
CamperBot
@camperbot
Nov 08 2016 15:10

welcome to FreeCodeCamp @drecurrency!

DreCurrency
@drecurrency
Nov 08 2016 15:11
can someone please help me.. I am trying to make this webpage responsive with mobile but the image disappears when I view it on full page view on mobile. Can someone PLEASE PLEASE help me resolve ? Thanks in advance
DreCurrency
@drecurrency
Nov 08 2016 15:18
@cdmanalansan are you using bootstrap ?
cdmanalansan
@cdmanalansan
Nov 08 2016 15:18
yes i am :)
DreCurrency
@drecurrency
Nov 08 2016 15:19
@cdmanalansan use class="pull-centre"
center * lol one of them
cdmanalansan
@cdmanalansan
Nov 08 2016 15:20
hmm doesnt seem to work
DreCurrency
@drecurrency
Nov 08 2016 15:25
@cdmanalansan I will look into this now
give me a minute
@cdmanalansan done
@cdmanalansan add "text-centre" to your <div class="row"></div>
where all your buttons are
under
like this <div class="row text-centre"></div>
cdmanalansan
@cdmanalansan
Nov 08 2016 15:30
hmm it doesnt work for me still dnt know why ><
DreCurrency
@drecurrency
Nov 08 2016 15:31
okay show me an update
cdmanalansan
@cdmanalansan
Nov 08 2016 15:31
i put text-centre in the div statement above buttons
DreCurrency
@drecurrency
Nov 08 2016 15:31
center*
and don't forget to run it
cdmanalansan
@cdmanalansan
Nov 08 2016 15:31
ahh omg i hate using american-enlgish when doing html/css haha
thanks a lot!
@drecurrency i thought that there was a special aligning option for objects other than text for bootstrap >< thanks!
CamperBot
@camperbot
Nov 08 2016 15:32
cdmanalansan sends brownie points to @drecurrency :sparkles: :thumbsup: :sparkles:
:cookie: 127 | @drecurrency |http://www.freecodecamp.com/drecurrency
DreCurrency
@drecurrency
Nov 08 2016 15:33
there is actually !
you are right let me check
Clyde Lobo
@oppiniated
Nov 08 2016 15:39
@arinarjani What are you trying to acheive?
Arin
@arinarjani
Nov 08 2016 15:40
@arinarjani I forked it to share with you. the problem was you did not have the JS portion of Bootstrap and this meant you did not have the little "burger" icon appear once the screen shrunk down. This caused the navbar to appear over the photo effectively "shrinking" the photo.
I am fixing @drecurrency 's "can someone please help me.. I am trying to make this webpage responsive with mobile but the image disappears when I view it on full page view on mobile. Can someone PLEASE PLEASE help me resolve ? Thanks in advance "
CamperBot
@camperbot
Nov 08 2016 15:40
arinarjani sends brownie points to @drecurrency :sparkles: :thumbsup: :sparkles:
:cookie: 128 | @drecurrency |http://www.freecodecamp.com/drecurrency
Clyde Lobo
@oppiniated
Nov 08 2016 15:42
@arinarjani Every image has a width and height, it normally adjusts itself according to the viewport height and width.
Your image width is greater than its height and hence it looks good on a desktop. mobiles generally have a larger height than the width, so your image scales proportionally
Arin
@arinarjani
Nov 08 2016 15:44
@oppiniated it was never my code
@oppiniated it is @drecurrency's
Anders
@Skretch
Nov 08 2016 15:45
Hello I am having trouble accessing the stream.channel in the twitch.tv project. For some reason chrome is giving me an "Cannot read property 'channel' of undefined(…)" error.
Heres the pen
Arin
@arinarjani
Nov 08 2016 15:45
I now need to figure out how to get the dropdown to work, or maybe leave that to @drecurrency
I will leave it to him
time to homework. by all
Anders
@Skretch
Nov 08 2016 15:51
Figured it out.
DreCurrency
@drecurrency
Nov 08 2016 15:52
@arinarjani how comes the burger icon does not display nav when clicked on ?
Arin
@arinarjani
Nov 08 2016 15:52
@drecurrency that problem is for you
Jozsef Hocza
@hocza
Nov 08 2016 15:52
Arin
@arinarjani
Nov 08 2016 15:54
@drecurrency It has to do with the JS stuff. JQuery, bootstrap.js, etc. also, look at the "data-toggle" html portion
DreCurrency
@drecurrency
Nov 08 2016 15:56
@arinarjani I have not begun JS yet
I am still on html CSS bootstrap
this is my portfolio website task
:(
Arin
@arinarjani
Nov 08 2016 15:58

@drecurrency Actually, since from how I got the solution. I will give it to you as it seems to be a bug or something. I had to manually input the scripts at the bottom.

Note: You need to know nothing about JS to figure it out, just know what Bootstrap needs to fully function and what <script></script> does for importing JS. Also, not sure why the icon does not work when you preview it in this chatroom, but on Codepen, it works on my machine using Edge.

Answer: http://codepen.io/arin_arjani/pen/dOowYb?editors=1000

DreCurrency
@drecurrency
Nov 08 2016 16:00
@arinarjani using samsung edge ?
@arinarjani yes it works now.. just needed to run it on my phone
Arin
@arinarjani
Nov 08 2016 16:02
Microsoft Edge. Their new browser. I just tested it in my phone and it seems to work as well ( the burger icon ).
DreCurrency
@drecurrency
Nov 08 2016 16:02
@arinarjani thanks man
CamperBot
@camperbot
Nov 08 2016 16:02
drecurrency sends brownie points to @arinarjani :sparkles: :thumbsup: :sparkles:
:cookie: 287 | @arinarjani |http://www.freecodecamp.com/arinarjani
DreCurrency
@drecurrency
Nov 08 2016 16:03
@arinarjani but i noticed my navbar is no longer static
Arin
@arinarjani
Nov 08 2016 16:07
It should. I copied all your classes.
You mean "fixed"?
I made a p tag and made its height 1000px and tested the navbar and it stays at the top when scrolling down
DreCurrency
@drecurrency
Nov 08 2016 16:15
@arinarjani and it worked yeah ?
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:19

how can i place the navigation bar below image


<body>
<div class = "container">
<img src="Images/Logo.PNG" class = "logo"/>
<header>
    <ul">
        <li><a href="#">Home</a></li>
        <li><a href="#">Portfolio</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
</header>

</body>

body{
margin:0 auto;
background-color:#E8E8E8;
width:1356px;
height:1922px;

}
.logo{
float:left;
margin:26px 0 0 27px;

}
.container{
width:993px;
height:1922px;
}

ul{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
background-color:#666666;
border-radius:10px;
}
li{
float:left;
padding:14px 16px;
border-radius:10px;
}
li a{
display:inline;
text-decoration:none;
}

```

DreCurrency
@drecurrency
Nov 08 2016 16:21
@MohammadHasham you have a typo in your <ul> element
tag*
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:22
i have corrected that
but how can i place that below the image rather than infront of the image
Sorin Ruse
@sorinr
Nov 08 2016 16:22
@MohammadHasham try to add to .logo{display: block;
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:23
@\
@sorinr how can i get the menu below image
that is not working
DreCurrency
@drecurrency
Nov 08 2016 16:23
@MohammadHasham put image tag on top on ul elements
inside <header> tags
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:24
still not working
should i make any class
DreCurrency
@drecurrency
Nov 08 2016 16:24
@MohammadHasham last resort.. rap both header and images elements in div tage
tags
@MohammadHasham no try this first ^^
<img> tag will have its own div tag and <header> will also have its own div tage
tag*
let me know if it does not worj
work*
Sorin Ruse
@sorinr
Nov 08 2016 16:33
@MohammadHasham something like example ?
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:34
@sorinr Thanks
CamperBot
@camperbot
Nov 08 2016 16:34
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 832 | @sorinr |http://www.freecodecamp.com/sorinr
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:34
@drecurrency Thanks
CamperBot
@camperbot
Nov 08 2016 16:34
mohammadhasham sends brownie points to @drecurrency :sparkles: :thumbsup: :sparkles:
:cookie: 129 | @drecurrency |http://www.freecodecamp.com/drecurrency
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:35
what changes did you made?
@sorinr
should float not be given to images while converting psd to html @sorinr
@drecurrency
Sorin Ruse
@sorinr
Nov 08 2016 16:37
@MohammadHasham just commented the float line in logo class
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:37
@sorinr should i avoid to use float for images
and only in div tags
Sorin Ruse
@sorinr
Nov 08 2016 16:41
@MohammadHasham i personally don't like floats. used them very rarely and i can't give you an advice on that
Muhammad Hasham
@MohammadHasham
Nov 08 2016 16:41
@sorinr but while converting psd templates to html aren't they used more frequently when construction the wireframe
is this the correct approach for converting psd to html to make a skeleton
first
@sorinr
Aarya Bhorra
@aarya1302
Nov 08 2016 16:46

@aarya1302

$(function(){
  $.ajax({
    type:"GET",
    url:"https://learnwebcode.github.io/json-example/animals-1.json",
    success:function(data){
      console.log("success", data);
    }
  });
});

This code is not running for some reason
PLEASE HELP

Matthew Pengelly
@mcpengelly
Nov 08 2016 16:46
whats the error message
youre probably missing jquery
Aarya Bhorra
@aarya1302
Nov 08 2016 16:47
here is the code pen
I already added the jquery library
And there are no errors when i run it
Matthew Pengelly
@mcpengelly
Nov 08 2016 16:48
lol what the hell codepen sucks cant tell wahts going on at all
whats it supposed to do? why are there textboxes but the js is a http request?
i think youre code is just doing nothing. when you hit run
Aarya Bhorra
@aarya1302
Nov 08 2016 16:49
I'm messing with ajax
It's suppose to log to the console the object from the api
Sorin Ruse
@sorinr
Nov 08 2016 16:55
@aarya1302 for me its working. it returns 3 objects
Aarya Bhorra
@aarya1302
Nov 08 2016 16:56
Really
?
Can you send me a screenshot please?
Mahak Narayan Singh
@makkBit
Nov 08 2016 16:57

HELP PLZ.
here's the sample code:

playSequence: function(sequenceArr){
            setTimeout(function(){
                for(var i=0; i<sequenceArr.length; i++){
                    (function(i){
                        setTimeout(function(){
                            console.log(allVars.playerTurn);
                        },i*1000);
                    })(i);
                }
            }, 500);
            allVars.playerTurn = true;
        }
myObj.playSequence(arr);

When i invoke this method, allVars.playerTurn = true; runs the number of times the loop runs. But this line isn't in the loop, then why it runs the number of times the loop runs. N how can i fix it, so that allVars.playerTurn runs only 1 time.
Thanks in advance.

CamperBot
@camperbot
Nov 08 2016 16:57
no wiki entry for: plzheres the sample codeplaysequence functionsequencearrsettimeoutfunctionforvar i0 isequencearrlength ifunctionisettimeoutfunctionconsolelogallvarsplayerturni1000i 500allvarsplayerturn truemyobjplaysequencearrwhen i invoke this method allvarsplayerturn true runs the number of times the loop runs but this line isnt in the loop then why it runs the number of times the loop runs n how can i fix it so that allvarsplayerturn runs only 1 timethanks in advance
kat-mag
@kat-mag
Nov 08 2016 17:01
@aarya1302 are you looking at your devtools console? Because it does work
Aarya Bhorra
@aarya1302
Nov 08 2016 17:06
@kat-mag no it doesn't log anyting
*anything
Tyler Moeller
@TylerMoeller
Nov 08 2016 17:06
@aarya1302 Change your link to jQuery to use HTTPS. Some browsers will block external scripts if they are loaded over HTTP when your web app is loaded over HTTPS.
kat-mag
@kat-mag
Nov 08 2016 17:07
really. in chrome - right button, inspect. console tab - > look
no fancy codepen consoles. Just your browser's devtools.
@makkBit It is in the loop tho. Even if it's in the iffy...
Sorin Ruse
@sorinr
Nov 08 2016 17:09
@aarya1302 take a look here
kat-mag
@kat-mag
Nov 08 2016 17:09
@makkBit iffy only protects your variables that are INSIDE. doesn't isolate you from the parent's scope influence in the way you're thinking.
@aarya1302 & here if you're using chrome: link
Aarya Bhorra
@aarya1302
Nov 08 2016 17:10
Ok thanks guys
I'll the links
BRB
And I used both the code pen and the browser console nothing happens
Uros Tadic
@urketadic
Nov 08 2016 17:14
DOes anyone have experience here with Android Studio
Muhammad Hasham
@MohammadHasham
Nov 08 2016 17:15
@urketadic yes
Aarya Bhorra
@aarya1302
Nov 08 2016 17:15
I am trying to run the code in both consoles
Uros Tadic
@urketadic
Nov 08 2016 17:15
Hey Mohammad
Muhammad Hasham
@MohammadHasham
Nov 08 2016 17:15
@urketadic Hey!
Uros Tadic
@urketadic
Nov 08 2016 17:15
So im trying to make an app using Html,CSS and Javascript
Aarya Bhorra
@aarya1302
Nov 08 2016 17:15
Nope no experience with android console
Still a rookie
Uros Tadic
@urketadic
Nov 08 2016 17:16
Iv added webview but its says
cannot resolve symbol webView
WebView webView = (WebView)findViewById(R.id.webView);
Muhammad Hasham
@MohammadHasham
Nov 08 2016 17:16
@urketadic i am learning nowadys still a beginner havent used html and stuff yet
Tyler Moeller
@TylerMoeller
Nov 08 2016 17:17
@aarya1302 Maybe you didn't see my comment above - change the URL you're using for jQuery so it uses HTTPS, then you'll see "sup" get logged to the console
Uros Tadic
@urketadic
Nov 08 2016 17:18
Alright htne
then
Muhammad Hasham
@MohammadHasham
Nov 08 2016 17:18
Does anyone here has experience regarding converting PSD to HTML5
@urketadic what is the error btw
Mahak Narayan Singh
@makkBit
Nov 08 2016 17:21
@kat-mag no not line within the iffe, m refering to this line:
```
@kat-mag no not line within the iffe, m refering to this line:
kat-mag
@kat-mag
Nov 08 2016 17:22
@aarya1302 look w/ added jquery - runs
Mahak Narayan Singh
@makkBit
Nov 08 2016 17:22
@kat-mag no not line within the iffe, m refering to this line:
playSequence: function(sequenceArr){
            this.$message.text("");
            setTimeout(function(){
                for(var i=0; i<sequenceArr.length; i++){
                    (function(i){
                        setTimeout(function(){
                            document.getElementById(sequenceArr[i]+'Sound').play();
                            $('#'+sequenceArr[i]).fadeOut(150).fadeIn(150);
                        },i*1000);
                    })(i);
                }
            }, 500);
            allVars.playerTurn = true;   //this line <<<<<<<<<<<<<<<
        },
Aarya Bhorra
@aarya1302
Nov 08 2016 17:24
@TylerMoeller ok I'll try
@kat-mag what do the errors mean?
@TylerMoeller It works now
Thanks
Aarya Bhorra
@aarya1302
Nov 08 2016 17:26
Thanks @TylerMoeller
CamperBot
@camperbot
Nov 08 2016 17:26
aarya1302 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 920 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Aarya Bhorra
@aarya1302
Nov 08 2016 17:26
Thanks @kat-mag
CamperBot
@camperbot
Nov 08 2016 17:26
aarya1302 sends brownie points to @kat-mag :sparkles: :thumbsup: :sparkles:
:cookie: 400 | @kat-mag |http://www.freecodecamp.com/kat-mag
Aarya Bhorra
@aarya1302
Nov 08 2016 17:27
Thanks @sorinr
CamperBot
@camperbot
Nov 08 2016 17:27
aarya1302 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 833 | @sorinr |http://www.freecodecamp.com/sorinr
kat-mag
@kat-mag
Nov 08 2016 17:29
@makkBit uh. then it's hard to tell with a slice of code.. no idea what magic you do with that function.
codercooooder
@codercooooder
Nov 08 2016 17:30
@jdtdesigns hey I have a wordpress question for you man if you are around...
anyone here skilled in wordpress templates/customization?
Uros Tadic
@urketadic
Nov 08 2016 17:36
@MohammadHasham Hey
sorry my pc crashed
error is
cant resolve the symbol webview
SEEEEMS To be resolved now so
ima go
no worries
nevermind
nope
not resolved
Il just ask on stackoverflow
sonalkarg
@sonalkarg
Nov 08 2016 17:43
Hello
Am creating a portfolio using bootstrap, could anyone let me know where i can start from
Any reference WIFI would be helpful, thanks in advance
WIKI*
CamperBot
@camperbot
Nov 08 2016 17:44
usage:
wiki $topic info on that topic
Muhammad Hasham
@MohammadHasham
Nov 08 2016 18:04
blob
blob
how can i place my second div like this
i want the top sidebar like this
Mahak Narayan Singh
@makkBit
Nov 08 2016 18:45
@sonalkarg just start building using Bootstrap official documentation, and read-search-ask anywhere u get stuck.
ADIL KARMOUZI
@mradil16
Nov 08 2016 18:45
Hi everyone . What kind of projects should I build for a front-end portfolio ?
kat-mag
@kat-mag
Nov 08 2016 18:49
@mradil16 you got some of the ideas on the fcc map. There's a lot of projects there
sonalkarg
@sonalkarg
Nov 08 2016 18:51
@makkBit thanks buddy
CamperBot
@camperbot
Nov 08 2016 18:51
sonalkarg sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:cookie: 340 | @makkbit |http://www.freecodecamp.com/makkbit
Greg Harrison
@greg-harrison
Nov 08 2016 18:53
Hey folks. I have an interview for a front end role tomorrow and was wondering if anybody could run a mock interview with me?
leil124
@leil124
Nov 08 2016 18:53

a=6 b=10 c="I am a String"

// Initialize these three variables
var a;
var b;
var c;

// Do not change code below this line

a = a + 1;
b = b + 5;
c = c + " String!";

whats wrong with this guys?
a should be defined and have a value of 6
b should be defined and have a value of 15
c should not contain undefined and should have a value of "I am a String!"
Do not change code below the line
Greg Harrison
@greg-harrison
Nov 08 2016 18:54
var a = 5
Clyde Lobo
@oppiniated
Nov 08 2016 18:54
@leil124 a = a + 1, end goal is to get value of a to 6
So you need to assign a value to it
@greg-harrison gave you the answer
leil124
@leil124
Nov 08 2016 18:55
thanks @greg-harrison @oppiniated
CamperBot
@camperbot
Nov 08 2016 18:55
leil124 sends brownie points to @greg-harrison and @oppiniated :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @greg-harrison |http://www.freecodecamp.com/greg-harrison
:cookie: 338 | @oppiniated |http://www.freecodecamp.com/oppiniated
Greg Harrison
@greg-harrison
Nov 08 2016 18:55
Np :D
kat-mag
@kat-mag
Nov 08 2016 18:56
@greg-harrison what's the company doing?
Greg Harrison
@greg-harrison
Nov 08 2016 18:57
It's a major banking company that has been doing a lot of technical stuff recently. Not sure about what the particular team will be working on. I know from friends that the company has been working on integrating their products with this massive system that all of the other major banks are using
leil124
@leil124
Nov 08 2016 18:58
wow this site deserves millions of dollars <3
Greg Harrison
@greg-harrison
Nov 08 2016 18:58
lol
Agreed
Quincy Larson is a personal hero
kat-mag
@kat-mag
Nov 08 2016 19:00
@greg-harrison banking... Huh. That's a tricky one. Good luck! :+1:
Greg Harrison
@greg-harrison
Nov 08 2016 19:00
@kat-mag Thanks :D I have a job now, but the opportunity is amazing. I hope I get it!
CamperBot
@camperbot
Nov 08 2016 19:00
greg-harrison sends brownie points to @kat-mag :sparkles: :thumbsup: :sparkles:
:cookie: 402 | @kat-mag |http://www.freecodecamp.com/kat-mag
kat-mag
@kat-mag
Nov 08 2016 19:02
@greg-harrison I've worked at one, as an admin tho. They not as strict & uptight as they seem (mostly) :D
abtak mustapha
@mustapha88
Nov 08 2016 19:03
hello
any one code in reactjs?need for some help
Ghost
@ghost~580ed9c0d73408ce4f309ef0
Nov 08 2016 19:04
Hello World
CamperBot
@camperbot
Nov 08 2016 19:04

welcome to FreeCodeCamp @vipuldcoder!

kat-mag
@kat-mag
Nov 08 2016 19:09
@vipuldcoder welcome & happy coding ;)
react? God. Watched one tutorial about that and had enough. Can't look at it, @mustapha88 ;d
Matthew Pengelly
@mcpengelly
Nov 08 2016 19:10
what did you dislike about it
abtak mustapha
@mustapha88
Nov 08 2016 19:13
@kat-mag why is it to complicated for you?
kat-mag
@kat-mag
Nov 08 2016 19:15
code looks like crap, besides it kinda enforces the use of classes that are nothing but a syntax sugar
Havko
@Havko
Nov 08 2016 19:18
I am having an issue on the Show the local weather problem
It seems that I must use geolocation on HTTPS but this prevents me from making a call to the openweather API
abtak mustapha
@mustapha88
Nov 08 2016 19:19
ya it's little missy but it's the most popular UI in the world of course when you learn somthing new for first time it look like wierd but step by step you relize that it's not that match you imagine for the first time i guess beside that in our case in FCC we have to learn it anyway because you gone to face some projects writing in reactjs i think we have no choise hhh we must learn it
rwobben
@rwobben
Nov 08 2016 19:21
Can someone help me with a bootstrap problem. When I make my site smaller the text is displayed outside the div. See this screenshot : https://postimg.org/image/mrktugyi5/
Greg Harrison
@greg-harrison
Nov 08 2016 19:22
@Havko If you look at the example, they ended up using Angular, just so they could have access to the $http module. It stems from Codepen being super finnicky about the way it handles https calls
rwobben
@rwobben
Nov 08 2016 19:22
the code can be found here : http://codepen.io/roelofw/pen/ObVOZy
Havko
@Havko
Nov 08 2016 19:23
@greg-harrison yea I noticed some weirdness there, I will have to play around with this I guess
Greg Harrison
@greg-harrison
Nov 08 2016 19:24
Good luck! I'm actually still stuck on that one (from being too lazy to go ahead and work on it)
kat-mag
@kat-mag
Nov 08 2016 19:24
@rwobben because you're sizing it for a small device & giving it only 3cols. Change it to something bigger so it doesn't overflow & for a bigger screen sizes go for col-sm md... or whatever else bootstrap has
Tyler Moeller
@TylerMoeller
Nov 08 2016 19:24
@Havko @greg-harrison This is a mixed-content issue, nothing to do with codepen. You cannot access HTTP resources from a web page loaded over HTTPS. Some people use a proxy to make the weather API work by adding https://crossorigin.me/http://api.openweathermap.org/............., but that proxy can be laggy and go down at times. You might want to look at Weather Underground, which supports HTTPS.
Greg Harrison
@greg-harrison
Nov 08 2016 19:25
@TylerMoeller Thank you! That's super helpful :D
CamperBot
@camperbot
Nov 08 2016 19:25
greg-harrison sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 921 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
rwobben
@rwobben
Nov 08 2016 19:25
oke, so use col-sm- x and col-xs-x in my code schould solve it . @kat-mag ?
Maksim Kulichenko
@makstheimba
Nov 08 2016 19:26
How can I add alternative links for script or stylesheets? So if browser can't get it from first source it will try to get it from second
kat-mag
@kat-mag
Nov 08 2016 19:26
@rwobben considering the size of the devices should solve it. I cannot tell you what column sizes you want ;D
Havko
@Havko
Nov 08 2016 19:31
@TylerMoeller @greg-harrison I see, you have to pay for HTTPS access on the openweather API. I think the recommendation for openweather should be removed from the challenge
Tyler Moeller
@TylerMoeller
Nov 08 2016 19:32
I agree - it causes too much confusion. There's a big discussion on it here: FreeCodeCamp/FreeCodeCamp#7853
Greg Harrison
@greg-harrison
Nov 08 2016 19:34
Interesting
Ken Haduch
@khaduch
Nov 08 2016 19:35
@Havko - one thing to realize is that when this challenge was created, there wasn't the same behavior of requiring https:// for the geolocation on the Chrome browser. Maybe that's already been stated. But it is confusing, and maybe there is just a need for someone to finally create a better foundation for this particular challenge, or just live with the fact that you can use IP-based location, and have some degree of inaccuracy? Also for @greg-harrison
Greg Harrison
@greg-harrison
Nov 08 2016 19:36
Oh wow! Thanks for that! I was hitting my head against the wall in the beginning of that challenge. That's all good to know
Havko
@Havko
Nov 08 2016 19:38
@khaduch I think I may finish the challenge just by using user input for the location. I know how to get the location regardless. Not as slick though, I know. Thanks for the info, definitely saved me a lot of time
CamperBot
@camperbot
Nov 08 2016 19:38
havko sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1894 | @khaduch |http://www.freecodecamp.com/khaduch
Tyler Moeller
@TylerMoeller
Nov 08 2016 19:38
For me, it was easiest to use Weather Underground, they give you location + weather all in one URL:
https://api.wunderground.com/api/<<<<your api key>>>/conditions/q/autoip.json
Havko
@Havko
Nov 08 2016 19:41
@TylerMoeller I will try that out
Ken Haduch
@khaduch
Nov 08 2016 19:42
@Havko - if you look at the link that @TylerMoeller posted above (I just ready through it) there are a couple alternatives that are mentioned that seem to work fine using https:// and therefore solve the current problem with geolocation requiring it!
Thanks @TylerMoeller for the pointer to that issue.
CamperBot
@camperbot
Nov 08 2016 19:42
khaduch sends brownie points to @havko and @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @havko |http://www.freecodecamp.com/havko
:cookie: 922 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Greg Harrison
@greg-harrison
Nov 08 2016 19:45
Thanks @TylerMoeller !
CamperBot
@camperbot
Nov 08 2016 19:45
greg-harrison sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: greg-harrison already gave tylermoeller points
motoradk
@motoradk
Nov 08 2016 19:48
Hi everyone, has anybody have some good API for famous quote?
Matthew Pengelly
@mcpengelly
Nov 08 2016 19:48
Havko
@Havko
Nov 08 2016 19:54
@khaduch Thanks, I have gone down the Weather underground path
CamperBot
@camperbot
Nov 08 2016 19:54
havko sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: havko already gave khaduch points
Marko Rajkovic
@marko88ks
Nov 08 2016 20:01
Screenshot_3.png
how to write a text that stands on the right side of the image, as in this picture?
please help
DreCurrency
@drecurrency
Nov 08 2016 20:09
@arinarjani Hello Arin, I want to be able to write a description on top of the image.
@marko88ks are you using bootstrap ?
Marko Rajkovic
@marko88ks
Nov 08 2016 20:10
yes
@arinarjani yes
DreCurrency
@drecurrency
Nov 08 2016 20:19
@marko88ks show your code
Marko Rajkovic
@marko88ks
Nov 08 2016 20:20
@arinarjani just sec
andycloke
@andycloke
Nov 08 2016 20:21
having trouble with JS for random quote machine, would appreciate any help. I'm using the forismatic API. codepen here: https://codepen.io/andycloke/pen/eBNwBW
DreCurrency
@drecurrency
Nov 08 2016 20:22
@marko88ks i am @drecurrency
Arin
@arinarjani
Nov 08 2016 20:22
@marko88ks something to do with your css. on the image write "float: right". Play around with floats
Marko Rajkovic
@marko88ks
Nov 08 2016 20:22
Screenshot_6.png
o sorry @drecurrency
DreCurrency
@drecurrency
Nov 08 2016 20:23
@arinarjani Arin, you may need to help me with how I write over the image you helped me with earlier
Marko Rajkovic
@marko88ks
Nov 08 2016 20:23
:)
i try with floats , but doesnt look good
DreCurrency
@drecurrency
Nov 08 2016 20:25
@marko88ks best for you to use float as I think you have not got the gist of bootstrap yet

@marko88ks use float like this..

.whateverclass{

float: right;

}

Arin
@arinarjani
Nov 08 2016 20:26
@drecurrency similar to this? Thumbnails: http://getbootstrap.com/components/#thumbnails
DreCurrency
@drecurrency
Nov 08 2016 20:27

@marko88ks in your case it would be..

alignLeft{

float: right;

}

:)
Marko Rajkovic
@marko88ks
Nov 08 2016 20:28
@drecurrency ok , thanks man .. i ll try that
CamperBot
@camperbot
Nov 08 2016 20:28
marko88ks sends brownie points to @drecurrency :sparkles: :thumbsup: :sparkles:
:cookie: 130 | @drecurrency |http://www.freecodecamp.com/drecurrency
Arin
@arinarjani
Nov 08 2016 20:29
@marko88ks or maybe use columns. So you image is col-md-6 and your text is col-md-6. wrap your image in a div and your text in a div and that whole thing in a row
DreCurrency
@drecurrency
Nov 08 2016 20:29
@arinarjani I want to be able to write over it
not underneath
Arin
@arinarjani
Nov 08 2016 20:29
Best not to mess with custom css if bootstrap does it normally without anything too hard
@drecurrency maybe just edit the image in Paint and put that photo on your site
Marko Rajkovic
@marko88ks
Nov 08 2016 20:30
@arinarjani ok , thanks
CamperBot
@camperbot
Nov 08 2016 20:30
marko88ks sends brownie points to @arinarjani :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @arinarjani |http://www.freecodecamp.com/arinarjani
Arin
@arinarjani
Nov 08 2016 20:30
if you want a cool hover effect, that may take some digging around for an answer, as I need to get to class
I will check back after to see if you found a solution and maybe I can help you as well
DreCurrency
@drecurrency
Nov 08 2016 20:31
@arinarjani makes sense but I am sure bootstrap has a way
Arin
@arinarjani
Nov 08 2016 20:31
@drecurrency ^^^
DreCurrency
@drecurrency
Nov 08 2016 20:31
@arinarjani great.. I will pm you know so I don't lose you
now*
Arin
@arinarjani
Nov 08 2016 20:32
It might be a JS specific effect. Check out JQuery if bootstrap will not do. JQuery is nice to learn and has some good examples on their site, so play with it in a text editor first before going full force
Thinh Cao
@tcao2
Nov 08 2016 20:32
I am working on the Twitch Streamer project and I am having some issues with the radio button
DreCurrency
@drecurrency
Nov 08 2016 20:32
@arinarjani okay sure :)
Daniel
@DanielMW34
Nov 08 2016 20:33
I need some help calling a function with a bootstrapSwitch, similar to the code example below. Does anyone have any familiarity with this...
<input type=”checkbox” name=”toggleChk”>

$(“[name=’toggleChk’]”).bootstrapSwitch();

$(‘input[name=”toggleChk”]’).on(‘switchChange.bootstrapSwitch’, function (event, state) {
//console.log(this); // DOM element
//console.log(event); // jQuery event
//console.log(state); // true | false
});
Thinh Cao
@tcao2
Nov 08 2016 20:33
I use the markup from Bootstrap to make it look nice, but it broke the functionality of the code. I found a work around using jQuery, but I can't implement the equivalent of it in Javascript (I want to keep my code consistent since I have been using javascript for all my projects)
$(document).on('change', 'input:radio[id="online"]', function (event) {
alert("click fired");
});
Theodore P.
@Ierofantis
Nov 08 2016 20:33
I have a simple css problem but I cant find the solution. The problem is that I have margin-top:-90px; for my main center list and the first item has more height than the other items. Any ideas on how to fix this? Here is my pen https://codepen.io/Ierofantis/pen/LbVJrp
Thinh Cao
@tcao2
Nov 08 2016 20:34
That line right there is the jQuery version, which works, but I cannot do the equivalent in Javascript
here is my pen:
Mooli
@Mooli88
Nov 08 2016 20:36

@parleydk

var obj = {};

obj.bar = "baz";  //ok
obj[bar] = "baz" ; // error
obj["bar"] = "baz"; //ok

obj.1 = "foo" //error
obj[1] = "foo" //ok
obj."1" = "foo" //error

for the majority of the time you will use the dot notation as you should. but keep in mind that if its a variable you want to use as a key or iterate with for loop (although there are better ways) then use [].

Joshua Henderson
@tracer223
Nov 08 2016 20:45
$('document').ready(function(){

  var streamers = ["freecodecamp", "brunofin", "streamerhouse"];
  // AJAX call for each streamer to append channel data
  $.each(streamers, function(i, data){
  $.ajax({
    type:"GET",
    url: "https://api.twitch.tv/kraken/streams/"+streamers[i],
    headers:{
      'Client-ID': 'f0sitqxiw30c1qmmwag6bgyt4yjd6gj'
    },
    success:function(data){
        console.log(streamers[i]);
      if (data.stream===null) {
$('.statusTag').html("<a target='blank' href='https://www.twitch.tv/'" + streamers[i] + "'>Channel is Offline</a>");
    } else if (data.status==422 || data.status==404){
      $('.statusTag').html("<a target='blank' href='https://www.twitch.tv/'" + streamers[i] + "'>Channel is Deactivated</a>");
    } else {
$('.statusTag').html("<a target='blank' href='https://www.twitch.tv/'" + streamers[i] + "'>Channel is Live!</a>");
                  }

              }
          }); 
      });
  });
Having trouble getting a channel to show that it is deactivated in my twitch app with data.status==422 || data.status==404. Literally the last piece of my app before I'm done.
Any help is appreciated.
Daniel
@DanielMW34
Nov 08 2016 20:53
@tcao2 were you responding to my question ?
Thinh Cao
@tcao2
Nov 08 2016 20:55
@DanielMW34 No I was asking another question
Waqas Abbasi
@Waqas909
Nov 08 2016 20:55
Hey guys
Daniel
@DanielMW34
Nov 08 2016 20:55
@tcao2 which project are you working on?
Thinh Cao
@tcao2
Nov 08 2016 20:55
Twitch steamers
Waqas Abbasi
@Waqas909
Nov 08 2016 20:55

What is the best way of writing this

if (x <= 1.5){


     }else if(x <= 3){


     }else if(x <= 4.5){


     }else if(x <= 6){


     }else if(x <= 7.5){


     }else{

     }

Any more convenient way?

Matthew Pengelly
@mcpengelly
Nov 08 2016 20:56
umm
ya thats just not a good way
what are you trying to accomplish
because if i input 6
Daniel
@DanielMW34
Nov 08 2016 20:56
@Waqas909 use only IF statements which have two conditions OR, a switch: case statement
Matthew Pengelly
@mcpengelly
Nov 08 2016 20:56
then the first condition is also true….
Daniel
@DanielMW34
Nov 08 2016 20:57
@Waqas909 add && conditions
Thinh Cao
@tcao2
Nov 08 2016 20:57
what about you @DanielMW34 ?
Matthew Pengelly
@mcpengelly
Nov 08 2016 20:57
if (x <= 1.5){
//any number greater then 1.5 will trigger this. including 3, 5, 10, 100000

     }else if(x <= 3){


     }else if(x <= 4.5){


     }else if(x <= 6){


     }else if(x <= 7.5){


     }else{

     }
Waqas Abbasi
@Waqas909
Nov 08 2016 20:57
@DanielMW34 But I want different outcomes for different x values
Daniel
@DanielMW34
Nov 08 2016 20:57
@tcao2 Simon Game
Matthew Pengelly
@mcpengelly
Nov 08 2016 20:57
youll need to add &&
like so.
Daniel
@DanielMW34
Nov 08 2016 20:58
@tcao2 you are stating in the first IF statement a LESS THAN clause
Thinh Cao
@tcao2
Nov 08 2016 20:59
?
i don't have any if-else in my twitch project yet..
are you talking to someone else?
Waqas Abbasi
@Waqas909
Nov 08 2016 20:59
@mcpengelly
~~~
if (x <= 1.5){
// Will trigger if x is less than or = 1.5
 }else if(x <= 3){
   if x > 1.5 but less than or equal to 3, will trigger no?

 }else if(x <= 4.5){


 }else if(x <= 6){
   // Only one of these will trigger tho based on the x value

 }else if(x <= 7.5){


 }else{

 }
Daniel
@DanielMW34
Nov 08 2016 20:59
@tcao2 try
if (x >= 1.5 && x <= 3 ) {
do something
}
Thinh Cao
@tcao2
Nov 08 2016 20:59
you are replying to the wrong person @DanielMW34
it is @Waqas909
Waqas Abbasi
@Waqas909
Nov 08 2016 21:00
:P
Daniel
@DanielMW34
Nov 08 2016 21:00
@tcao2 yes, I meant @Waqas909
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:00
oops
i think i was wrong afterall
since its less thans
Waqas Abbasi
@Waqas909
Nov 08 2016 21:01
@DanielMW34 Could you explain why my method is not the same as the one u suggested?
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:01
not greater then
its because itll always hit the first if that returns true
daniel wanted you to specify that it was larger then a certain amount and smaller then a certain amount
that way it could differentiate between a 5 and 6
but anyway
my brain is off apparently
cant think correctly
your code might actually be fine
as for how to structure it, thats fine
Daniel
@DanielMW34
Nov 08 2016 21:03
@Waqas909 well, first you have a LESS THAN clause in your IF statement, that is incorrect according to what you want. Second, if you are looking for nested IF statements, do not use "ELSE IF" on your first nested IF statement. Third, you could write it all into dual condition IF statements. Fourth, just use IF, do not use ELSE IF, it's really pointless once you think about the logic of IF vs ELSE IF
Waqas Abbasi
@Waqas909
Nov 08 2016 21:03
@mcpengelly In that case, Is there no more convenient way of writing all those if else statements?
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:03
alternatively you could use a switch statement but theres no real difference and all switch statements do is add confusin
Waqas Abbasi
@Waqas909
Nov 08 2016 21:06
@DanielMW34 Okay I understand thanks
@mcpengelly Thanks for trying to help!
CamperBot
@camperbot
Nov 08 2016 21:06
waqas909 sends brownie points to @danielmw34 and @mcpengelly :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for mcpengelly
:cookie: 354 | @danielmw34 |http://www.freecodecamp.com/danielmw34
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:06
bleh
u could use stich i think
switch
but i cant even think about it right now lmao
Waqas Abbasi
@Waqas909
Nov 08 2016 21:06
but isnt switch
for mroe spcefici
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:07
ya i dont think its appropriate
cause
your doing multiple expressions
not 1
Waqas Abbasi
@Waqas909
Nov 08 2016 21:07
Yup
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:07
i was writingitout and realized that
switch(x < 1.5){
case ???:
}
but ive been working all day so my brain is basically useless
it might be doable
but you can see where im getting confused
you might be able to do lke
switch(x){
  case x < 1.5:
  break;
  case x < 3.0:
  break;
}
but i havent tested
and im half asleep
Waqas Abbasi
@Waqas909
Nov 08 2016 21:09
i thought of that
but idk if that workss
yea it doesnt work
u have to use if statements for that kind of prupose
Matthew Pengelly
@mcpengelly
Nov 08 2016 21:12
im not sure about that
i think we just have the wrong syntax
but actually even if you could
it wouldnt be ideal
youre right about using ifs
im basing what i said earlier off switch sstatements ive seen somewhere but theyre not ideal anyway and u shouldnt use them that way
1 expression for a swtich statment is good
Waqas Abbasi
@Waqas909
Nov 08 2016 21:17

So why cant i replace the text inside the quote id paragraph

http://codepen.io/Waqas909/pen/oYgYyy?editors=0110

This is the code I think is troubling me

var quo = {
  " OscarWilde ": " Be yourself; everyone else is already taken."

$(document).ready(function(){
$("#generate").click(function(){
     var x = 1.5;
     if (x <= 1.5){
       $("#quote").text(quo[0]); // Doesn't replace text with quo[0] text
});
});
I want to replace the quote with another quote from quo
but it doesnt let me
Mooli
@Mooli88
Nov 08 2016 21:18
@tracer223 can you link to codepen ?
Waqas Abbasi
@Waqas909
Nov 08 2016 21:27
Nvm Got it working
Brian
@BrianCodes33
Nov 08 2016 21:28
someone mind helping me w/ caesers cypher?
Mooli
@Mooli88
Nov 08 2016 21:31
@BrianCodes33 ?
Brian
@BrianCodes33
Nov 08 2016 21:37
its an algorithm
Callie Brooks
@CalliEliza
Nov 08 2016 21:38
hey, did anyone here use openweathermap api for the local weather app? I had originally used simpleweather.js, but it seems broken and I can't get it to work properly.
William Maes
@maeswilliam
Nov 08 2016 21:44
Hello i have a problem with a project, can anyone help me?
Brian
@BrianCodes33
Nov 08 2016 21:59
@maeswilliam what do you need
Waqas Abbasi
@Waqas909
Nov 08 2016 22:05

http://codepen.io/Waqas909/full/oYgYyy/

Can anyone tell me how I can make the white quotebox adjustable to the text, and place the generate and Twitter button in one spot so they dont move,

Any tutorials or links would help!

Norbert1986
@Norbert1986
Nov 08 2016 22:25
Help me please
CamperBot
@camperbot
Nov 08 2016 22:25
no wiki entry for: me please
Norbert1986
@Norbert1986
Nov 08 2016 22:26
Question, about (Build A Tribute Page).
Do I have to make a page similar to the one that they showed me?
William Maes
@maeswilliam
Nov 08 2016 22:45
@BrianCodes33 talked to you in private
Norvin Burrus
@ndburrus
Nov 08 2016 22:46
@dongooden yw, anyimte...
@dongooden yw,anytime...
kat-mag
@kat-mag
Nov 08 2016 22:51
@Norbert1986 functionally similar. But you can make it look as you want
Emiel Groendijk
@emielgroendijk
Nov 08 2016 22:56
Hi, I'm working on the Twitch Viewer and suddenly my Javascript won't work anymore. It should log 1 to the console on click (as a test) but it won't. Can anybody take a quick look?
Ian Lee
@asparism
Nov 08 2016 23:09
@emielgroendijk is your click button id the same as your javascript id?
but even changing that didn't seem to work :/
Emiel Groendijk
@emielgroendijk
Nov 08 2016 23:10
your right it wasn't, but indeed it won't work with that corrected even
I had a setup with pressing enter on the input field which worked but somehow it broke when I was messing around with it
I'm so lost lol
Ian Lee
@asparism
Nov 08 2016 23:14
yeah this is weird
djangoearnhardt
@djangoearnhardt
Nov 08 2016 23:15

Hello everyone, I’m working on the quote machine challenge: I’m trying to test a well, where I would click a button and add some html (just beginning phase of building this). I’m struggling to get my quote area to refresh when I click on my new quote button. Can anyone help out?

http://codepen.io/djangoearnhardt/pen/woKBzJ

Emiel Groendijk
@emielgroendijk
Nov 08 2016 23:19
@asparism I'm inclined to think its codepen related, creating a similar function in a local file works fine
Ian Lee
@asparism
Nov 08 2016 23:20
@emielgroendijk i tried logging to the console right after document.ready and still didn't get anything. you might be right. maybe copy/paste to a new pen?
Emiel Groendijk
@emielgroendijk
Nov 08 2016 23:21
Tried, same result
I think I'll just call it a night and hope the magical elves fix it while I'm sleeping
Thanks anyway @asparism
CamperBot
@camperbot
Nov 08 2016 23:21
emielgroendijk sends brownie points to @asparism :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @asparism |http://www.freecodecamp.com/asparism
José Olórtegui
@jolortegui98
Nov 08 2016 23:21
@Waqas909 text me at the private..
Ken Haduch
@khaduch
Nov 08 2016 23:21
@djangoearnhardt - it would be easier to look at this on CodePen if you followed CodePen's rules - JavaScript in the JS panel, CSS in the CSS panel, etc. But it looks like you have a syntax error - one too many )}; in your <script> area at the bottom of your HTML panel. Take one of those away, and it updates the quote area.
Ian Lee
@asparism
Nov 08 2016 23:22
@emielgroendijk ha, yeah.
djangoearnhardt
@djangoearnhardt
Nov 08 2016 23:24
thanks @khaduch I had pasted it in from Atom, and hadn’t split up the sections. you’re a lifesaver, it works :+1:
CamperBot
@camperbot
Nov 08 2016 23:24
djangoearnhardt sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1895 | @khaduch |http://www.freecodecamp.com/khaduch