These are chat archives for FreeCodeCamp/HelpFrontEnd

10th
Mar 2018
Gulsvi
@gulsvi
Mar 10 2018 00:18
@Frosty427 Most of your initial code is still there for the navbar, I just added the shopping bag icon and used some bootstrap responsive utilities to adjust formatting based on screen size.
TonyRednil
@TonyRednil
Mar 10 2018 00:22
Hey guys I was wondering if it's possible to have a button scroll down a page to an element that has a certain ID. Is there a code for that?
Gulsvi
@gulsvi
Mar 10 2018 00:24
@TonyRednil Yes, it's possible to click a button and have the page scroll down to a specific element
The most common way is to use a hyperlink and style it like a button - then you just use href="#idName" for the link
See the section "HTML Links - Create a Bookmark" here: https://www.w3schools.com/html/html_links.asp
TonyRednil
@TonyRednil
Mar 10 2018 00:26
@Gulvsi thanks!
CamperBot
@camperbot
Mar 10 2018 00:26
tonyrednil sends brownie points to @gulvsi :sparkles: :thumbsup: :sparkles:
api offline
TonyRednil
@TonyRednil
Mar 10 2018 02:12
Alright. So now I would like to code a button that opens the default email client of the user and automatically starts a new email addressed to my email. Would I use an href for that or is th
at even possible in html?
From what I've read online you have to use a form element with the mail to: action.
Jonathan Albert Cunanan
@jcunanan05
Mar 10 2018 03:11
guys any advice on my navbar Item adding is-active idea.. line 44 checkSlide(e) my code seems to work when scrolling down, but scrolling up doesn't seem to work. Any thoughts??
https://codepen.io/jcunanan05/pen/gWmraE
Ken Haduch
@khaduch
Mar 10 2018 05:54
@jcunanan05 - I did some fiddling with it and was somewhat baffled by the calculation. But what I ended up doing that made it work was to move, actually add, a line to remove the is-active class from the section before trying to set it again. This line: navbarItem ? navbarItem.classList.remove("is-active") : ""; right before your test for if (sectionIsNear) and it looks like it's working better? I should save a fork of your project as I have it working now, because I removed some of the repeated code from each of those block for the two conditions to the top (I also threw a lot of console.logs in there.) But here is the url of what I have that seems to be working... i hope it helps?
Sorin Ruse
@sorinr
Mar 10 2018 07:08
@khaduch @jcunanan05 i would not multiply navbarHeight by 4 but just let topPosition + navbarHeight >= section.offsetTop
@khaduch because if @jcunanan05 decides to apply a smooth scrolling to the corresponding section the "scrollspy" will look more natural in my oppinion
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:14
is there a rule of thumb to use array methods together?
because I'm trying to use var newArr = arr.push(num).sort(); and it's not working
Sorin Ruse
@sorinr
Mar 10 2018 07:17
@JoEeeezy_twitter have you tried var newArr=arr.push(num) and then newArr = newArr.sort() ? is it working this way?
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:21
lemme try that
that doesn't work either hmm
i dont think arr.push is returning an array
Sorin Ruse
@sorinr
Mar 10 2018 07:23
@JoEeeezy_twitter have defined your arr in arr.push()?
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:24
yeah it's in the arguments
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:25
what he's asking is have you defined it like var arr = [];
somewhere
Sorin Ruse
@sorinr
Mar 10 2018 07:25
@mbosnjak01 :+1:
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:25
sorry this is what it looks like https://i.imgur.com/iI7Ghrg.png
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:26
do var arr = []; outside the function, on the top to define your arr, so you can use it,
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:27
it's already in the function args up there
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:28
lunk that challenge
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:40
hmm werid default sorting had me confused
i thought sort() always sorted by smallest number to biggest by default
is there a way to make these two methods one line like i see some people do https://i.imgur.com/t6UFAh4.png
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:41
sec
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:41
or is it not possible because they're too different ?
ok
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:43
i don't get this test getIndexToIns([5, 3, 20, 3], 5) should return 2
like, how it should return 2 if 5 is on the 0. position
XD
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:45
man that was the one i was having trouble with too lol
that one and the one right above it
the 3, 3 5 10
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:45
i made a test
if a number is already inside array, don't push anything, just return it
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:46
i like that , i never used .includes yet
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:46
yet it doesn't work with that test i got error at, and i don't get why because number 5 is inside the array and it should return index of 2? like, how? xD
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:47
it works with the one right above it too , even though the 3 is inside the array also
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:48
the test is weird
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:48
i think the test requires you to push them all
yeah it is
oh i get it ... the 5 is gonna point to index 2 after being sorted
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:49
but if you push 5 in the array where it exist, sort will sort it from lowest to highest again and you'll get to have 5 on positions 0 and 1, not 2
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:49
the one with the 3 above is is gonna return 0 anyway because the array starts at 3 and it's already at 0
if you sort you'll get 3 , 3, 5 , 5 20
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:51
oh yeah, i totaly didn't see that other 3 there
XD
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:52
:smile:
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:52
ok then just do this and it's all good https://i.imgur.com/XGqhvtd.png
JoEezy
@JoEeeezy_twitter
Mar 10 2018 07:53
:thumbsup: like a charm
my last challenge took me 2 days to figure out :facepalm:
well ... not full .. hours of staring and then walking away in frustration lol
it's good though.. the only time i really feel like i failed is when i give up and look at the solution i dunno why but that gets to me alot
but then some other challenges i can do within an hour
Matej Bošnjak
@mbosnjak01
Mar 10 2018 07:57
it's okay to look at the solution when you can't get it on your own, as long as you don't just copy paste it and move on, but read it with understanding and learn from it
Ghost
@ghost~5928d90bd73408ce4f629b9e
Mar 10 2018 07:58
What's the api use in image search abstraction layer?
Sorin Ruse
@sorinr
Mar 10 2018 08:03
@JoEeeezy_twitter the most important thing is to understand what each function does. i never memorize js functions syntax. i just lookup for it to refresh my memory
Raghav Mundra
@Raghav17
Mar 10 2018 08:08
Hi,
There is something wrong with my calculator. Whenever I click on "=" after evaluating an equation, the number goes back to the equation.
Here's the codepen
https://codepen.io/raghav96/pen/EQBMJq
Matej Bošnjak
@mbosnjak01
Mar 10 2018 08:17
@Raghav17 i'm doing + and = just fine XD
i kinda like it that way
Raghav Mundra
@Raghav17
Mar 10 2018 08:18
Yes, The answer goes back to the equation instead of staying.
@mbosnjak01 Also, It is updating when the first character that I press is an operator.
Frosty427
@Frosty427
Mar 10 2018 08:25
image.png
how can i push those plus signs to the ends of the box
to be on the exact opposit of the words
Matej Bošnjak
@mbosnjak01
Mar 10 2018 08:28
try with float:right
@mbosnjak01 here is my code
i have a differenct set up
where like my icons are inside the li
Raghav Mundra
@Raghav17
Mar 10 2018 08:35
@mbosnjak01 What happened?
Frosty427
@Frosty427
Mar 10 2018 08:37
@Raghav17 it seems fine
Raghav Mundra
@Raghav17
Mar 10 2018 08:38
@Frosty427 It's not, buddy.
mustimuu
@mustimuu
Mar 10 2018 09:27
Hello. Anybody experienced with joomla here?
Frosty427
@Frosty427
Mar 10 2018 10:25
@Frosty427
image.png
man can someone help me push those plus signs
to the end of the box
Ian Lee
@asparism
Mar 10 2018 10:29
@Frosty427 using any css libraries?
is it that pen you posted a little bit earlier?
Frosty427
@Frosty427
Mar 10 2018 10:29
oh sorry
give me a moment
i code locally
gotta update codepen
Ian Lee
@asparism
Mar 10 2018 10:30
oh sure
@asparism wait nvm dude
Ian Lee
@asparism
Mar 10 2018 10:32
got it?
Frosty427
@Frosty427
Mar 10 2018 10:33
some guy gave me advice earlier
and i write it off
2 hours later i try it
and it fucking works
idk why i didnt listen
Matej Bošnjak
@mbosnjak01
Mar 10 2018 10:33
@Frosty427 sometimes it happen that browser cache messes it up -> doesn't reload new code ... so in that case do ctrl + f5 to reload browser and clear cache memory
idk if that was the case, but it can help sometime
Ian Lee
@asparism
Mar 10 2018 10:34
haha
i was gonna say float: right in the styling.
what was the advice that worked?
looks slick btw
Quantomistro3178
@Quantomistro3178
Mar 10 2018 11:32
@Frosty427 like @asparism said, that's a pretty cool page there, mate!
rna7
@rna7
Mar 10 2018 11:43
I need help with quote machine. I can't get the quote to refresh.
https://codepen.io/rna7/pen/rdazjv
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:07
@rna7 I had the same problem, you need to set the cache to clear. But I used jQuery for my project, so I don't know how to do it with vanilla js
rna7
@rna7
Mar 10 2018 12:08
So cache: false with vanilla js and it should work?
thanks
Stephen James
@sjames1958gm
Mar 10 2018 12:09
@rna7 Using the CORS proxy, you don't have any control over caching on the proxy.
You are getting a new response each time, so it is not caching inside your browser.
Well, I was getting a new 200 OK with the same quote which I took to mean the proxy was caching.
You could "trick" the proxy with something like this which makes the URL "unique" each time
    let x = Math.floor(Math.random() * 100) + "";
    xhr.open("GET", "https://cors-anywhere.herokuapp.com/https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&tmp=" + x, true);
rna7
@rna7
Mar 10 2018 12:11
I tried crossorigin.me but it wasn't working
Stephen James
@sjames1958gm
Mar 10 2018 12:12
@rna7 You could of course request many quotes and randomize over those and not request each time.
rna7
@rna7
Mar 10 2018 12:13
@sjames1958gm thanks your "trick" works well
CamperBot
@camperbot
Mar 10 2018 12:13
rna7 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9079 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Mar 10 2018 12:13
@rna7 :+1: It depended on the API not rejecting the request on the unknown parameter 'tmp'
rna7
@rna7
Mar 10 2018 12:16
@sjames1958gm I wonder if there isn't a "proper" way to do this using headers
Stephen James
@sjames1958gm
Mar 10 2018 12:17
@rna7 There may be. One issue is you are using a proxy to circumvent CORS, so you are restricted by the proxy behavior
rna7
@rna7
Mar 10 2018 12:18
is there any other solution for CORS?
Stephen James
@sjames1958gm
Mar 10 2018 12:18
@rna7 You can implement jsonp, which is somewhat complex with vanilla js (jquery handles that nicely)
rna7
@rna7
Mar 10 2018 12:22
this project really could have been explained better on FCC. Or at least come with FAQ and precautions
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:30
check http://api.jquery.com/jquery.ajax/ and http://api.jquery.com/jquery.getjson/ for json api calls, it's much easier than plain js ... I prefer jquery ajax instead of getjson, but if done as simple as possible, both work the same.
@rna7
rna7
@rna7
Mar 10 2018 12:31
@mbosnjak01 Thanks. I know about jquery but I just want to learn plain Javascript. It just seems like a crutch at the moment
CamperBot
@camperbot
Mar 10 2018 12:31
rna7 sends brownie points to @mbosnjak01 :sparkles: :thumbsup: :sparkles:
:cookie: 246 | @mbosnjak01 |http://www.freecodecamp.org/mbosnjak01
Stephen James
@sjames1958gm
Mar 10 2018 12:31
@mbosnjak01 Yes, I think that was my point as well. If you are just doing get's retrieving JSON no reason not to use getJSON.
If there are no CORS issues then I just use fetch API
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:33
I prefer doing ajax calls like this:
$.ajax({
type: "GET",
url: "apiURL,
dataType: "json",
success: function(request) {
// do your code here
// example
console.log(request.quotes[qRandNum].text)
}
})
I usually work with plain JS, but api calls i do with jquery
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:37
@rna7 I tried doing my quote machine project with plain js too at first. Didn't work out well....
:(
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:40
@Quantomistro3178 I did it in plain JS at first, but because of simplicity of animations in jquery i rewrote all to jquery ... and it's really small as well
rna7
@rna7
Mar 10 2018 12:42
@Quantomistro3178 My thinking was that if I can understand it in JS then jquery will be easier later on
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:42
@mbosnjak01 Well, yours is definitely faster than mine.
rna7
@rna7
Mar 10 2018 12:43
@mbosnjak01 is that your js or jquery quote machine? It looks great
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:43
@rna7 That is exactly what I was going for too. But ended up using jQuery because I didn't understand XMLHTTP, plus I needed jQuery's animations...
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:43
@rna7 it's jquery script, although it was plain JS localy, but was still working the same
rna7
@rna7
Mar 10 2018 12:43
@mbosnjak01 Could you post your plain JS version with code?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:44
@rna7 No because I lost many stuff when I formated my PC, and forgot to save stuff XD
Stephen James
@sjames1958gm
Mar 10 2018 12:44
Then use fetch
fetch(url)
.then(response => response.json())
.then(json => // process json)
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:44
But hey, in my defense, fCC's tutorials on AJAX and APIs are very vague. They literally just give you the code instead of explaining.
So I just decided to use jQuery for this one in the end. And I even kept the jQuery code pretty simple - just a get request, and a success function.
rna7
@rna7
Mar 10 2018 12:46
@sjames1958gm I plan to build this project again using fetch and then using jquery
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:47
I can show you my jquery script tho, it's on my github
but it's not meant to be copy pasted, you should read about that stuff which you don't understand and learn :P
I'm trying to implement some google apis in my weather app .. so far no luck :(
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:50
@mbosnjak01 You mean the maps?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:51
yeah I'm kinda trying to overlap 2, or even 3 maps into one
still not sure how to approach this, but i'll figure something out XD
maybe i won't have to do 2-3 maps
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:51
what do you mean by "overlap"?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:52
i meant, gathering data from about 2 or even 3 google apis to make one map
oh look
i just solved my problem
@Quantomistro3178 thanks :D
CamperBot
@camperbot
Mar 10 2018 12:52
mbosnjak01 sends brownie points to @quantomistro3178 :sparkles: :thumbsup: :sparkles:
:cookie: 272 | @quantomistro3178 |http://www.freecodecamp.org/quantomistro3178
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:53
@mbosnjak01 lol, I've no idea what you're talking about. But you're welcome anyways!
So what did you figure out?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:56
I'll try to put all google apis i need in one function ... first to render cities, then routes, then weather conditions
as custom markers
Quantomistro3178
@Quantomistro3178
Mar 10 2018 12:58
@mbosnjak01 Well, I don't really understand, but could you show it to me once its complete?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 12:59
once it's complete i'll probably post it on my github, so, sure. @Quantomistro3178
Quantomistro3178
@Quantomistro3178
Mar 10 2018 13:00
@mbosnjak01 thanks!
CamperBot
@camperbot
Mar 10 2018 13:00
quantomistro3178 sends brownie points to @mbosnjak01 :sparkles: :thumbsup: :sparkles:
:cookie: 247 | @mbosnjak01 |http://www.freecodecamp.org/mbosnjak01
Raghav Mundra
@Raghav17
Mar 10 2018 13:54
Can anyone please let me know why my webpage is shifting towards left even when I am making the h1 as "text-center".
Stephen James
@sjames1958gm
Mar 10 2018 14:09
@Raghav17 It is all centered.
@Raghav17 Inside your max-width of 700px
Raghav Mundra
@Raghav17
Mar 10 2018 14:11
@sjames1958gm I figured out the solution buddy, I was not using "container". Thanks though! :D
CamperBot
@camperbot
Mar 10 2018 14:11
raghav17 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9081 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Mar 10 2018 14:11
@Raghav17 Ah. :+1:
rna7
@rna7
Mar 10 2018 14:23
How can I assign geolocation to global variable?
Frosty427
@Frosty427
Mar 10 2018 14:24

@Frosty427
https://codepen.io/Frosty27/pen/QQRjbQ?editors=1000

can someone help
why is there a giant white space to thr right of everything?

Stephen James
@sjames1958gm
Mar 10 2018 14:33
@Frosty427 IS that only on certain screen sizes?
Frosty427
@Frosty427
Mar 10 2018 14:33
@sjames1958gm yea like lg and md
it starts to mess up
Matej Bošnjak
@mbosnjak01
Mar 10 2018 14:35
@Frosty427 or you can just do
body {
  overflow-x:hidden;
}
on the top of css file
Frosty427
@Frosty427
Mar 10 2018 14:35
@mbosnjak01 i fucking love you
Matej Bošnjak
@mbosnjak01
Mar 10 2018 14:36
even if it would only disable going to that white space
it won't permanently solve your problem
because when you resice the screen (higher resolution), that white space will be there
that's why I left you an article for responsive web design on another channel
it's important to understand how responsive web design works (in plain css as well), and to know how to make it with just css, instead of jumping directly to Bootstrap.
rna7
@rna7
Mar 10 2018 14:41
How do I add geolocation to a global variable.
I want something like var lat = position.coords.latitude
Fabien SHAN
@X140hu4
Mar 10 2018 14:42
Declare the variable in the global scope?
var lat = ""; then change its value later
rna7
@rna7
Mar 10 2018 14:53
@X140hu4 it kind of works. but then it doesn't when I refresh
Matej Bošnjak
@mbosnjak01
Mar 10 2018 14:53
@rna7 you got your code in codepen?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 14:55
@rna7 so what doesn't work as it should for you? Not sure if this is your final code you want or ...
rna7
@rna7
Mar 10 2018 15:21
i cI've got the lat and lon but now i keep getting CORS. again.
Stephen James
@sjames1958gm
Mar 10 2018 15:36
@rna7 I would recommend using the link created by FCC to facilitate this challenge.
https://fcc-weather-api.glitch.me/api/current?lat=0&lon=0
Matej Bošnjak
@mbosnjak01
Mar 10 2018 15:37
@rna7 use https
Frosty427
@Frosty427
Mar 10 2018 15:37
can someone help me?
Matej Bošnjak
@mbosnjak01
Mar 10 2018 15:37
not http in your link
if you go to mobile you can see extra text in the bottom right
i have gave a shit tone of classes for display and what not but they are still showing
(bootstrap 4)
Kevin Kindorf
@kkindorf
Mar 10 2018 15:54
@Frosty427 in a media query set your xs-none class to display none
Frosty427
@Frosty427
Mar 10 2018 15:55
@kkindorf i havent looked into media query can you show me?
meaning i havent even typed one before
Kevin Kindorf
@kkindorf
Mar 10 2018 15:56
so something like
@media(max-width: 400px) { .xs-none { display: none; } }
you would put that at the end of your css in codepen
Frosty427
@Frosty427
Mar 10 2018 15:58
image.png
@kkindorf
Kevin Kindorf
@kkindorf
Mar 10 2018 16:00
I'm not going to give you all of the answers I gave you the concept to build off. Use what resources we just shared to figure out removing that other block
Frosty427
@Frosty427
Mar 10 2018 16:05
w/e dude
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 10 2018 16:08
@Frosty427 Appreciate the time people take out to help you bro
Frosty427
@Frosty427
Mar 10 2018 16:09
@MuhammedKarim wdym?
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 10 2018 16:10
Kevin was very kindly helping you out and you showed your in-appreciation by saying w/e.... @Frosty427
Frosty427
@Frosty427
Mar 10 2018 16:10
whats wrong with w/e
i was saying ok
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 10 2018 16:11
w/e has a very different meaning to ok
Frosty427
@Frosty427
Mar 10 2018 16:11
isnt w/e ok?
theyre the same thing
Riadh
@KWFE
Mar 10 2018 16:15
hey guys
Frosty427
@Frosty427
Mar 10 2018 16:17
@MuhammedKarim he threw me into something i didnt understand and i also have a 2 hour deadline now to taking the time out to learn that wont be practical at all
spend three days trying to figure something out
and tell me you wont get frustrated
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 10 2018 16:17
i spent 3 days making a portfolio for a deadline
i was told it was rubbish and to use bs instead of css. ive never used bs before
i made a much better one in a few hours
by learning the basics
so you only have one small part left, just learn the basics of MQ and crack it
Frosty427
@Frosty427
Mar 10 2018 16:26
@MuhammedKarim idk if you reading over the line or something but i keep saying i dont have time like that
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 10 2018 16:27
@Frosty427 I was on the way to the place and i had to still learn and fix up things with my page.
Just be appreciative, that's all im saying
kerafyrm02
@kerafyrm02
Mar 10 2018 16:31
anyone stuck or need help?
im here briefly
5...
4...
3....
2........
1.....................
0_
Ian Lee
@asparism
Mar 10 2018 16:34
explosions in the distance
Frosty427
@Frosty427
Mar 10 2018 16:34
@kerafyrm02 can you help me or are you gonna have me decode ancient hieroglyphs?
@asparism can you help me?
Ian Lee
@asparism
Mar 10 2018 16:35
what do you need?
i wasn't following the thread before but i can go back and look if that's it
if you go to the codepen youll see that when you shrink it to mobile there is extra text showing at the bottom
image.png
@asparism
Ian Lee
@asparism
Mar 10 2018 16:46
I don't understand bootstrap well enough to know why the mobile footer disappears in desktop mode, but the desktop footer doesn't disappear in mobile. that's probably your answer though. a quick fix would also be a media query, which, media queries are really simple, you just insert the width at which to change styling.
but it looks like the real solution has to do with why the mobile footer disappears automatically and figuring out why desktop footer doesn't
Frosty427
@Frosty427
Mar 10 2018 16:49
@asparism the mobile footer disappearing is on purpose but thanks for trying
CamperBot
@camperbot
Mar 10 2018 16:49
frosty427 sends brownie points to @asparism :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @asparism |http://www.freecodecamp.org/asparism
Ian Lee
@asparism
Mar 10 2018 16:50
yeah! exactly! so whatever you did on purpose to make the mobile footer disappear, if i were you i would try to do that with the desktop footer, because it looks like that text is part of the desktop footer.
Aaron Sawyer
@aarondevon
Mar 10 2018 16:52

Anyone able to help with the Beta program?

ES6: Use Destructuring Assignment to Assign Variables from Objects

I am having a difficult time applying the concept to a string
and assigning length to let
Luke
@lukenetti3
Mar 10 2018 16:55
Does anyone have any experience with the Pomodoro Timer? I have some questons
Ian Lee
@asparism
Mar 10 2018 16:58
@Frosty427 one more thing, if you delete all the classes on all the divs in that footer, that text stops trailing off the page
good luck to all
and to all a good night
*morning
coderNewby
@coderNewby
Mar 10 2018 16:59
@DarrenfJ check pm thanks in advance
CamperBot
@camperbot
Mar 10 2018 16:59
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2419 | @darrenfj |http://www.freecodecamp.org/darrenfj
Tiago Correia
@tiagocorreiaalmeida
Mar 10 2018 17:01
hey @lukenetti3 sure just ask
Luke
@lukenetti3
Mar 10 2018 17:05
I am using the setInterval function and running it every second. What I do is set a variable of minutes to whatever is the html content of my Break Length. Once I run the setInterval function and then assign the html content of whatever is in minutes to display. It always ends up being one number lower than I set. I tested with an alert function right before I define the setInterval and I get the number I want. Then I tested and put the alert right after the setInterval and the number is different. Not sure what's happening.
rna7
@rna7
Mar 10 2018 17:19

@mbosnjak01 @sjames1958gm

@rna7 use https
@rna7 I would recommend using the link created by FCC to facilitate this challenge.

I've used https and the link from FCC, but it gives me 401 error
or CORS
Ian Lee
@asparism
Mar 10 2018 18:11
@lukenetti3 do you have a codepen or something you can share with us?
eliza khachatryan
@Elijbet
Mar 10 2018 20:15
Hey, can anyone explain me how to scale text instead of wrapping on smaller screen sizes?
Michael Croteau
@micqey
Mar 10 2018 20:17
If you are looking for picture perfect scaling (like for a background image or something) you might want to try an svg instead... Otherwise, if you are just talking about responsive font sizes, use a media query in your CSS
@media(max-width: 768px) {
and then add your styles like normal
and then close with an extra }
Dany Din
@danydin
Mar 10 2018 20:53
how can i find the element which responsible for the hambruger icon to appear on my site through mobile devices? so basically im looking for the class/id that triggers it to appear on my source code and i couldn't find...
Ian Lee
@asparism
Mar 10 2018 20:54
if you have the end result and you're using a browser with developer tools, you can usually do something like right-click and 'inspect element'. Then the html will pop up and highlight the element you selected.
Dany Din
@danydin
Mar 10 2018 20:55
i found it but the elemnt is not showing up on the source code
and it has js on the in the inspect element so i guess that's why but how can i modify it
Ian Lee
@asparism
Mar 10 2018 20:57
so you have the source code, right? and are you using any libraries?
Dany Din
@danydin
Mar 10 2018 20:57
bootstrap
and yes
LydaTech
@lydatech
Mar 10 2018 20:58
@danydin what are you trying to do?
Dany Din
@danydin
Mar 10 2018 20:58
the classes i use must have in the css file something to trigger the navbar to change
LydaTech
@lydatech
Mar 10 2018 20:58
media queries
Dany Din
@danydin
Mar 10 2018 20:58
yes but what cause it to appear
LydaTech
@lydatech
Mar 10 2018 20:59
@danydin the media query
Dany Din
@danydin
Mar 10 2018 20:59
they use class on my html with media query?
the class
LydaTech
@lydatech
Mar 10 2018 20:59
sorry im confused
Ian Lee
@asparism
Mar 10 2018 20:59
you can try to ctrl+f to search for all instances of the class, I think .navbar-toggler, and look through each one in your code
Dany Din
@danydin
Mar 10 2018 21:00
there is notihng such as this on my html code
and this is the class when its on mobile look
@lydatech how the navbar can appear just from media query?
if its not stated on source html file
can someone point out where i'm making a mistake please
LydaTech
@lydatech
Mar 10 2018 21:01
@danydin its a mix based on Data-toggle="collapse" what are you trying to do?
Ian Lee
@asparism
Mar 10 2018 21:01
@danydin There's no such thing as what?
Dany Din
@danydin
Mar 10 2018 21:02
i'm trying to figure the element on my html code that trigger the hamburger to appear on moible
because when i inspect it on mobile version (as it only appear on mobile) there are no such classes on my html source
Ian Lee
@asparism
Mar 10 2018 21:02
are you able to use ctrl+f to search through your source code?
ok, the class isn't present, hm.
Dany Din
@danydin
Mar 10 2018 21:03
yes it is not there... i guess it js becuase it states js on my inspect as well but i dont know where to find it i dont have any js code on my html
except few href
Ian Lee
@asparism
Mar 10 2018 21:04
and your javascript isn't injecting any html?
LydaTech
@lydatech
Mar 10 2018 21:04
@danydin its based on your screen size
Dany Din
@danydin
Mar 10 2018 21:05
maybe they are
it must come from one of my js files then lol
what is this code means? to run this js when it's appear on one of those devices? is it vanilla js?
    var isMobile = {
        Android: function() {
            return navigator.userAgent.match(/Android/i);
        },
            BlackBerry: function() {
            return navigator.userAgent.match(/BlackBerry/i);
        },
            iOS: function() {
            return navigator.userAgent.match(/iPhone|iPad|iPod/i);
        },
            Opera: function() {
            return navigator.userAgent.match(/Opera Mini/i);
        },
            Windows: function() {
            return navigator.userAgent.match(/IEMobile/i);
        },
            any: function() {
            return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
        }
    };
Ian Lee
@asparism
Mar 10 2018 21:10
yeah that's vanilla.
this just creates an object that sets boolean values for each possible case
Dany Din
@danydin
Mar 10 2018 21:11
cool and what's the purpose of any key in the end? @asparism thanks
CamperBot
@camperbot
Mar 10 2018 21:11
danydin sends brownie points to @asparism :sparkles: :thumbsup: :sparkles:
:cookie: 336 | @asparism |http://www.freecodecamp.org/asparism
Ian Lee
@asparism
Mar 10 2018 21:11
@lydatech Is right, if you can find the part of your code that injects different elements by detecting mobile/desktop, you might find what you're looking for
Dany Din
@danydin
Mar 10 2018 21:12
it's not true because it was on an external file so i couldn't find the element on the source file
LydaTech
@lydatech
Mar 10 2018 21:12
@danydin it would be MUCH easier just to define the media query you want and change it there
Ian Lee
@asparism
Mar 10 2018 21:12
looks like the any just detects whether any of the previous keys are true
Dany Din
@danydin
Mar 10 2018 21:13
ahhh so you can manipulate it easily
cool smart idea hah
yes but i wanna do it like the pros papa
Ian Lee
@asparism
Mar 10 2018 21:14
is there a media query in your css?
LydaTech
@lydatech
Mar 10 2018 21:14
@danydin then you need to look at the mixin files for bootstrap. Thats where they are defining it. and then build a custom dist
from source. I dont understand why you would want to mess with the framework where a few lines of code is all you need
Dany Din
@danydin
Mar 10 2018 21:16
yes there are medias... i found it ... the js inject the new html code and then on the css media query it's adding the style
i got that code papa i just had to learn it
since when they added those mobile useragents to js? on emca2017?
LydaTech
@lydatech
Mar 10 2018 21:18
--breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
Dany Din
@danydin
Mar 10 2018 21:18
ahh this is if i want to change the default breakponits for col-md etc...
cool learnt another thing today.. :D @lydatech thanks.. is it on the mixin dir?
CamperBot
@camperbot
Mar 10 2018 21:18
:star2: 2696 | @lydatech |http://www.freecodecamp.org/lydatech
danydin sends brownie points to @lydatech :sparkles: :thumbsup: :sparkles:
LydaTech
@lydatech
Mar 10 2018 21:20
"mixins/breakpoints"
Dany Din
@danydin
Mar 10 2018 21:22
thx papa
Jonathan Albert Cunanan
@jcunanan05
Mar 10 2018 22:39
@khaduch Thank you for looking at it it's now working!!! @sorinr thanks too good advice!!
CamperBot
@camperbot
Mar 10 2018 22:39
jcunanan05 sends brownie points to @khaduch and @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1401 | @sorinr |http://www.freecodecamp.org/sorinr
:star2: 3785 | @khaduch |http://www.freecodecamp.org/khaduch