@DuskyPixel but there is to much work, i thing the problem is becous I make css background to photo before first JSON is called and div witch class that I want to change doesn exist in moment of execution, what can I do about it?

DuskyPixel

@DuskyPixel

@mr4199 not sure what you mean.. When I first got the ajax result I added the onlines to an online container and the offlines to an offline container which I just toggled their display when ever a button was clicked

DavidR

@davidrinconv

Hi guys, Im doing the Sorted Union challenge but im stuck on how to do it.... any tips on how to start it?

Jaren Escueta

@jarenescueta731

@davidrinconv read the arguments object link in the problem description. using reduce on an array can be similar to using a for loop.

Chris Drain

@Chrislearns

Hey everyone is there anyone that can help with my weather app zipline I can't get the getJSON to work

@sorinr - one thing that is a little disturbing is that if you go from, say, the "ABOUT" page to the "PORTFOLIO" page, a scroll bar pops up and shifts the background. Everything else is so clean. A great little project!

Sorin Ruse

@sorinr

@khaduch i've seen that. but my idea was to make all the project (still unfinished) using just two html tags (an inline <span> and <input> that i cannot recreate otherwise :) i didn't paid attention to rest of aspects

Ken Haduch

@khaduch

@sorinr - I just thought you might have some way to fix it... it's a very cool concept.

Sorin Ruse

@sorinr

@khaduch i think its all about the background img. i'll fix it. even i will make some other versions using only tags like <a>

Ken Haduch

@khaduch

@droidvoider - they use one of the Bootstrap classes on a div to enclose the whole page content - <div class="jumbotron">. It doesn't look like you have balanced tags to close all of your divs that you currently have. But this jumbotron div should be the next in the hierarchy after your "container" div.

@droidvoider - oh, I see that you are not using Bootstrap, or are not including it in your CSS settings. If you are trying to use Boostrap classes, then you have to include it. If you are not using bootstrap classes, then you need to mimic the setup for the "jumbotron" div, which sets the background-color to a light gray value.

backspaceit

@backspaceit

Hello, could I get a pointer please, I'm trying to check for a property in an object, if its not there I need to then create it. But the new property is an array, this is what I have so far - else if (prop === "tracks" && collection[id].hasOwnProperty("tracks") === false) { var newArray = []; collection[id].push(newArray);

So the object is called correction and I want to push the "tracks" value into it as an empty array

Collection!

Nathaniel

@DeathStarGnR

Hello, I am working on the random quote machine project. I am attempting to do it using an api, and I got my function working that pulls in the quote, but it will only work once. clicking the button a second time doesn't do anything, or if i call the function when the page loads, the button will not work at all. any pointers would be much appreciated. http://codepen.io/nsbailey2010/pen/bZrgEY

@DeathStarGnR You need a random number generator after your api call. So in your function just make a random number variable and make it roughly like 30 numbers(not sure how big your son object is) and then concatenate that with the end of the url call.

@DeathStarGnR I would also advise taking your function out of the document ready call. So just have your function first, then add your document.ready call with the function name inside of it. Then after that, have your click event. Does that make sense?

Troy

@Socrates714

I need help getting my buttons to scroll to various divs on my web page with jquery. I am on the personal portfolio page challenge. I copied and edited some code from stack overflow to the best of my abilities but it isn't working. Here is my codepen: https://codepen.io/Socrates714/pen/EybzRVHow do I get the buttons to scroll?_

Luke

@lukenetti3

@DeathStarGnR So ".....callback=" + randNum. This will concatenate a random quote each time.

@Socrates714 So for each section I would label it. So for your About Me I would id="section1" and so on for as many sections as you want. Then in your navbar element make an "<a>" element inside your <li> for your different headers, and put an href="#section1" in that. So when that is clicked it will take you to that section. Does that make sense?

Nathaniel

@DeathStarGnR

@lukenetti3 Thanks. I will give a shot. I had it outside the document.ready at one point but have been moving it around trying different things. I will give the randNum thing a try, but it confuses me because the function generates a different quote each time I refresh the page, or if I call the function multiple times, but not when I click the button.

@lukenetti3 Not remotely. Can you explain more? I feel like the front end stuff didn't teach me how to do this yet.

Luke

@lukenetti3

@DeathStarGnR Yeah because when you click the button its running the same number through each time. If you just manually enter numbers in after "callback=1" and save and refresh the page and keep changing that number. That is using a different quote. So when you refresh the page its changing the number but when you click and the function runs again its using the same number thus not changing the quote.

@Socrates714http://v4-alpha.getbootstrap.com/components/navbar/ This explains a little better than I do. If you scroll down a little the first section of code has different lists for the headers. In each "a" element it also has an href="#" after that pounds sign, put your section id.