These are chat archives for FreeCodeCamp/HelpFrontEnd

6th
Jun 2016
Ashley Wilson
@aCodingCat
Jun 06 2016 00:00
oops never mind we figured it out! <3
Will Power
@restartedwill
Jun 06 2016 00:04
For the local weather project, I think I'm missing something simple when doing a $.json call. If you look at the snippet here: http://pastebin.com/LCMJRaT7 it writes the results of the "2:" code as 0,0, and then only after the whole $(document).ready is done, does it write the two inner console.log's. So the result is that I'm not getting variables assigned until the code completes, and I'm really confused what I'm doing wrong. So any ideas are greatly appreciated.
If you want to see the whole thing, look at http://codepen.io/restartedwill/pen/wWavMd?editors=1111
robertky
@robertky
Jun 06 2016 00:08
Anyone know a good way to make my twitter link actually quote the random quote? I dont know a good website that goes over how to customize twitter buttons :pensive:..............help?
http://codepen.io/jdjd09/pen/VjLNjP
This code came with the tweet button:
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
But....The code above that was my attempt to change the "test text" in the html when the twitter button was hit.
However, it doesn't change it :/.
Will Power
@restartedwill
Jun 06 2016 00:11
@robertky I wrote the quote and writer into local variables, and then change the link source to include the arguments. Remember to do the target="_blank" for the Twitter window to appear to finish sending the tweet.
robertky
@robertky
Jun 06 2016 00:13
@restartedwill , do you know where in the below code is the custom link though :/?
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
That came with the custom button, and honestly don't know what to edit in there to replace the http link to the quote.
I have the quote saved into a variable though, so I can easily transfer the quote if I know what to edit.
Will Power
@restartedwill
Jun 06 2016 00:16
@robertky Take a look at http://pastebin.com/0Y3rSnFL for how I did it.
I know we shouldn't give solutions, but I think this was generic enough and not the whole project.
Bruce Young
@mutantspore
Jun 06 2016 00:16
@robertky forget the embeded button. Use your own button and Twitter web intents
https://dev.twitter.com/web/intents
@restartedwill @robertky yes as WIll has suggested
robertky
@robertky
Jun 06 2016 00:18
Ok, I will attempt that, I dont know why twitter makes this so hard to find this information...but that page looks like it may answer the question.
@mutantspore.
@restartedwill , I assume that is put in something else?
Will Power
@restartedwill
Jun 06 2016 00:19
@robertky I have the "on" event set to call the function I pastebinned.
Bruce Young
@mutantspore
Jun 06 2016 00:19
@robertky the method you were trying is possible but because it’s actually an embedded “window" you have to keep destroying and recreating it. it gets ugly fast.
Will Power
@restartedwill
Jun 06 2016 00:20
@robertky ...for my Tweeting button for this project.
robertky
@robertky
Jun 06 2016 00:23
I see.
I'm playing with the code now.
I got it to work, but then it broke my box lol.........................sighn.
The border broke with the button, wow......
added more padding, seemed to fix it though.
IDK why I have to add double padding just because another button was placed in there....guess has something to do with something I dont understand though...............
bsandusky
@bsandusky
Jun 06 2016 00:28
@robertky Check out Bootstrap’s docs on how to use the grid. You’re not quite there with rows and columns which is why you are manually moving things to make it fit.
@robertky Also row is a bootstrap class, as is text-center not row-text-center
robertky
@robertky
Jun 06 2016 00:38
row-text-center is a custom I made.
Probably not best, but went with it....
I'm trying to look at bootstrap docs right now...but mainly to change the button to allow me to use btn-twitter symbol.
Instead of the "twitter" words.
But having issues making it work.
For example, if I do this:
<button class="btn btn-twitter"> | Connect with Twitter</button>
I feel like that should put the bird to left of text.
But it doesn't.
Bobby McDonald
@BobbyMcWho
Jun 06 2016 00:51
Hello all, would love some constructive criticism on my portfolio: http://rmcd.io
Emmanuelle DeBarge
@emmanuelledebarge
Jun 06 2016 00:52
@BobbyMcWho its flawless!
Bobby McDonald
@BobbyMcWho
Jun 06 2016 00:53
Thanks @emmanuelledebarge
CamperBot
@camperbot
Jun 06 2016 00:53
bobbymcwho sends brownie points to @emmanuelledebarge :sparkles: :thumbsup: :sparkles:
:cookie: 155 | @emmanuelledebarge |http://www.freecodecamp.com/emmanuelledebarge
Bruce Young
@mutantspore
Jun 06 2016 00:56
@BobbyMcWho I’d perhaps not have what looks like a fullscreen image but something cropped a bit to mak eit all more visible . as it is the project images .. the part that has any substance, is small and blurry . though the large colour area has some appeal too
Trevor Hunka
@Grizvok
Jun 06 2016 00:56
Hey guys, what's up? Just started working on the random quote machine and having a little bit of trouble I guess. My original though was that I wanted to use an API that grabbed a random quote for me and work on displaying that to the page, but after seeing the limitations of API's without have a server set up so that I can effectively proxy the API request I decided to hard code some quotes on to my page and randomly have them called based around a random number. Well I'm sort of bored doing it and wondering if they expect you to learn to deal with JSONP or something to get it to work?
Kay
@PandaProgrammer
Jun 06 2016 01:00
Hey guys I could really use some help on my portfolio project. If you click down on the page currently it takes a big leap and I would like it to stay under my navigation bar. anyone know how I can get it to go below the nav bar instead of top of the page? all hyperlinks work so far aswell http://codepen.io/PandaProgrammer/pen/yJNxKB?editors=1010
Trevor Hunka
@Grizvok
Jun 06 2016 01:05
i guess that isnt much to go off of lol
and not a specific question
but using an API from the same domain as they show you and using one from a different one are quite different
DarkCodeKnight
@DarkCodeKnight
Jun 06 2016 01:14
I'm doing the tribute page
guys, is it possible to centralize all the layout of my page using bootstrap?
I'm using 'container-fluid' class
Tzvetlin Velev
@tvelev92
Jun 06 2016 01:16
How can I decrease jumbotron width
bootstrap
DarkCodeKnight
@DarkCodeKnight
Jun 06 2016 01:17
have you tried in the css?
Tzvetlin Velev
@tvelev92
Jun 06 2016 01:17
@DarkCodeKnight whats the invvocation>?
width: .. px?
DarkCodeKnight
@DarkCodeKnight
Jun 06 2016 01:17
jumbotron{
width?
}
widht: xxpx;
Tzvetlin Velev
@tvelev92
Jun 06 2016 01:17
ill give ti a shot @DarkCodeKnight thx
CamperBot
@camperbot
Jun 06 2016 01:17
tvelev92 sends brownie points to @darkcodeknight :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for darkcodeknight
DarkCodeKnight
@DarkCodeKnight
Jun 06 2016 01:18
^^
someone can help me D:
Tzvetlin Velev
@tvelev92
Jun 06 2016 01:20
@DarkCodeKnight how can I center the window
nm
Bruce Young
@mutantspore
Jun 06 2016 01:31
@BobbyMcWho this is something I came across recently
https://testmysite.thinkwithgoogle.com/
Kay
@PandaProgrammer
Jun 06 2016 01:38
@mutantspore wow that is a great site. thanks for sharing it!
CamperBot
@camperbot
Jun 06 2016 01:38
pandaprogrammer sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1715 | @mutantspore |http://www.freecodecamp.com/mutantspore
Larry Tseng
@LTSENG01
Jun 06 2016 01:39

Hi, I'm having some trouble implementing a bootstrap navbar that collapses under smaller widths for my portfolio. I have tried everything, but nothing works. Please help!

https://codepen.io/LTSENG01/pen/LZEgNB?editors=1100

For some reason, the button won't open
Bruce Young
@mutantspore
Jun 06 2016 01:39
@LTSENG01 you will also need to add in bootstrap.js under the jQuery
@LTSENG01 you may have other issues but that is a must add
Larry Tseng
@LTSENG01
Jun 06 2016 01:40
Ohhhh thanks @mutantspore
CamperBot
@camperbot
Jun 06 2016 01:40
ltseng01 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1716 | @mutantspore |http://www.freecodecamp.com/mutantspore
Larry Tseng
@LTSENG01
Jun 06 2016 01:41
I spent so much f*ing time on it! Thank you very much!
Doomflake
@Doomflake
Jun 06 2016 01:42
What is the best way to imbed a thumbnail of a pen so you have the image on the portfolio project. I was doing it as a screenshot image, but now they aren't wanting to show up. Wasn't sure if there was a simpler way. I tried using the imbed option in the pens, but it didn't seem to show up correctly
Larry Tseng
@LTSENG01
Jun 06 2016 01:42
Also if you don't mind, how can I keep them on a single line?
Bruce Young
@mutantspore
Jun 06 2016 01:43
@Doomflake where are you hosting the images. if it’s Imgur.. it will fail as it’s against their terms of use.
Kevin Holmes
@codersc
Jun 06 2016 01:44
can someone please help me understand why the function named flash in my simon game does not work correctly? all it needs to to do is blink the correct buttons, but i get this weird bug where it works for the first four times and then stops working once the game has more than four steps the user has to repeat
Justina
@jfuller30
Jun 06 2016 01:44
I just screenshot mine and uploaded to photobucket (retro, lol) and direct linked from there to my img src. then i used <div class="row"> to lay them out in columns next to each other. @Doomflake
Doomflake
@Doomflake
Jun 06 2016 01:45
I tried it using picpaste first and that worked for a couple days before it stopped. Then I tried Flickr and it didn't want to work at all(I think I didn't set the permissions correctly though)
Bruce Young
@mutantspore
Jun 06 2016 01:45
@LTSENG01 you may have some errors in how you made the Nav bar. I can see that you have used a class for the data-target when it’s meant to be an id #navbar-collapse .go back and recopy the demo code and strip out bits slowly .
@Doomflake give http://postimage.org a go then or if you have one. use your dropbox with a public link
Justina
@jfuller30
Jun 06 2016 01:47
@Doomflake You can check out my pen to see the code I used but I would recommend photobucket. it is a bit ad-heavy nowadays but I've had an account with them for 8+ years and never once got a broken link. https://codepen.io/JFuller30/full/ZOYLKw/
Larry Tseng
@LTSENG01
Jun 06 2016 01:47
@mutantspore ok great thanks!
CamperBot
@camperbot
Jun 06 2016 01:47
ltseng01 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: ltseng01 already gave mutantspore points
Peter Weinberg
@no-stack-dub-sack
Jun 06 2016 01:48
Hey guys, working on my rando code generator, can someone take a look at this JS ? See the commented out lines for what I am struggling with. I can post the link to my pen if it helps to see it in context... Thanks!
$(document).ready(function() {
  $("#getQuote").on("click", function() {
    $(".zQuote").html(quotes[quoteKey].quote); // I want functions below the next comment to also run on button click, before this, so that the var [quoteKey] will be different on each click.
    $(".zName").html(quotes[quoteKey].person);
    });
  });

var quotes = {
    "quote1": {
      "person": "-Some Guy",
      "quote": "abc"
    },
    "quote2": {
      "person": "-Another Guy",
      "quote": "I say..."
    },
    "quote3": {
      "person": "-Jarvis",
      "quote": "This is a quote!"
    },
    "quote4": {
      "person": "-Santana",
      "quote": "I play guitar!"
    }
  };

// How would I make everything below execute on button click before the other jquery above???
var keyArr = Object.keys(quotes);

function shuffle(a) {
    var j, x, i;
    for (i = a.length; i; i -= 1) {
        j = Math.floor(Math.random() * i);
        x = a[i - 1];
        a[i - 1] = a[j];
        a[j] = x;
    }
};

shuffle(keyArr)

for (i = 0; i < keyArr.length; i++) {
  var quoteKey = keyArr[i];
}
Doomflake
@Doomflake
Jun 06 2016 01:49
I think I'll see if photobucket works. Never use my account with them anyway, so I might as well put it to use. Thanks @jfuller30
CamperBot
@camperbot
Jun 06 2016 01:49
doomflake sends brownie points to @jfuller30 :sparkles: :thumbsup: :sparkles:
:cookie: 171 | @jfuller30 |http://www.freecodecamp.com/jfuller30
Kevin Holmes
@codersc
Jun 06 2016 01:49
@no-stack-dub-sack aren't you supposed you to use an API to get the quotes?
Justina
@jfuller30
Jun 06 2016 01:50
I'm also needing some help understanding the Stand in Line lesson for JS in the cirriculum. Just totaling not getting what its taking about when it comes to queues.
@Doomflake No problem :)
Bruce Young
@mutantspore
Jun 06 2016 01:51
@codersc originally there was nothing stated about that, then they actually had the api lessons after the project .. so that indicated no api. but now it seems up to the camper again.
Peter Weinberg
@no-stack-dub-sack
Jun 06 2016 01:52
@codersc I don't believe that is a requirement, no
Kevin Holmes
@codersc
Jun 06 2016 01:52
@mutantspore ok just wonderin. have you done the simon game?
Bruce Young
@mutantspore
Jun 06 2016 01:52
groan.. not finished yet .. lol getting closer though. you’re not my wife are you?
Peter Weinberg
@no-stack-dub-sack
Jun 06 2016 01:53
@codersc I forked from one that does use an API, but I wanted to create one with all quotes of my own selection
Andrew Charlebois
@andrewchar
Jun 06 2016 01:54
lmao
Kevin Holmes
@codersc
Jun 06 2016 01:55
@mutantspore lol no but do you see any obvious reasons why this piece of code only plays the animation four times and then doesnt after ? my first instint was some kind of array bounds type thing but because there are four buttons but i dont think that can be it.
 flash: function(i) {

    var elem = $('.shape' + this.compSeq[i]);

    elem.stop().animate({opacity: '1'}, {

      duration: 50,

      complete: function() {

        elem.stop().animate({opacity: '0.6'}, 200);
      }
    });               
  },

  displayCompSeq: function() {      

    for (var i = 0; i < this.compSeq.length; i++) {             

      doScaledTimeout(i);
    }    

    function doScaledTimeout(i) {   

      setTimeout(function() {

         game.playSound(i)

         game.flash(i);

      }, i * 1000);
    }    
  },
JD Tadlock
@jdtdesigns
Jun 06 2016 01:55
@codersc
var sound = $('.sound' + i)[0]; // should be $('.sound' + i);
sound.play(); // Not sure what you're playing here lol. This isn't an audio object
Kevin Holmes
@codersc
Jun 06 2016 01:56
@jdtdesigns well i heres ounds when i click so thats all i need
Bruce Young
@mutantspore
Jun 06 2016 01:57
@andrewchar new job going well?
Andrew Charlebois
@andrewchar
Jun 06 2016 01:58
@mutantspore June 13th start date
JD Tadlock
@jdtdesigns
Jun 06 2016 01:58
@codersc hmm, i see you made audio elements in the html
try initializing them in the js instead
var sound1 = new Audio('http://soundlink.com');
Bruce Young
@mutantspore
Jun 06 2016 01:59
lol ok shoes shined? hope it goes well. I’m pretty desperate for a job. just getting discouraged buy the huge shopping list some employers ask for
Kevin Holmes
@codersc
Jun 06 2016 02:00
@jdtdesigns appreciate the help but as far as i cant tell they atleast work. on the other hand if i cant get the anims to work then the whole thing cant even be turned in
Doomflake
@Doomflake
Jun 06 2016 02:00
They want all these requirements but a lot of them try to get out of paying for the skill that comes with them!
JD Tadlock
@jdtdesigns
Jun 06 2016 02:01
@codersc i'm telling you this because i got errors regarding your sound function in the console
it's related to your problem
Andrew Charlebois
@andrewchar
Jun 06 2016 02:01
@mutantspore i look at the shopping list as more of a "wish list"
and i need new shoes
Kevin Holmes
@codersc
Jun 06 2016 02:02
@jdtdesigns ok i will try to change them, you are right.
Bruce Young
@mutantspore
Jun 06 2016 02:03
@andrewchar yes I know it is.. In the past I’ve been the bastard writing those job requirements .. so I know how it works but as an applicant again now.. it’s disheartening .
Trevor Hunka
@Grizvok
Jun 06 2016 02:03
@codersc did you use an API to get the quotes?
Kevin Holmes
@codersc
Jun 06 2016 02:04
@Grizvok yeah i thouth you had to. if i did it again though i wouldn't have
Ryan
@ispeakcomputer
Jun 06 2016 02:04
Is there a way to debug my js code when my page will not even load in codepen due to js error ? Got any good articles on this . having trouble finding this .
Kevin Holmes
@codersc
Jun 06 2016 02:04
thought*
Bruce Young
@mutantspore
Jun 06 2016 02:04
@needsMoreCoffee do you have the actual browser dev console open?
Trevor Hunka
@Grizvok
Jun 06 2016 02:04
Why? I wanted to use on originally but couldn'
couldn't*
Ryan
@ispeakcomputer
Jun 06 2016 02:05
@mutantspore i do
Trevor Hunka
@Grizvok
Jun 06 2016 02:05
get passed the different domains
did you use JSONP?
Iskya
@iskya
Jun 06 2016 02:05
Hi i have an issue with my local weather challenge, can someone help me? I want to put nicest icons than the openweathermap icons, i've found owf font, but im not sure how to use it.. help
Ryan
@ispeakcomputer
Jun 06 2016 02:05
not seeing anything come from that till I actually click the button triggering logic
Kevin Holmes
@codersc
Jun 06 2016 02:06
@jdtdesigns should i get rid of the audio html elements or keep them there?
Trevor Hunka
@Grizvok
Jun 06 2016 02:06
its almost useless to learn to use jsonp when in the professional setting it isnt really used
everyone just proxies the request from the server
but obviously you cant do that on codepen
Doomflake
@Doomflake
Jun 06 2016 02:12
@jfuller30 Thank you for posting that pen. Finally figured out why I couldn't get the images to line up using bootstrap (I feel like an idiot because I had an extra /div tag). I've reformatted that segment several times over the last week to try getting it to cooperate!
CamperBot
@camperbot
Jun 06 2016 02:12
doomflake sends brownie points to @jfuller30 :sparkles: :thumbsup: :sparkles:
:warning: doomflake already gave jfuller30 points
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:13
@tvelev92
can I get some help
http://quotes.rest/qod.json
I want to get quote out of this Json
into here $(".message").html();
JD Tadlock
@jdtdesigns
Jun 06 2016 02:13
@codersc i'd get rid of them and use js objects instead
Kevin Holmes
@codersc
Jun 06 2016 02:14
@jdtdesigns ok thanks i'll try that
CamperBot
@camperbot
Jun 06 2016 02:14
codersc sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 443 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Srinivasan
@kksrini89
Jun 06 2016 02:14
Hi guys, need help..
  • How we can show the input type="text" element when clicking on search icon ?
can anyone help me to design this?
Bruce Young
@mutantspore
Jun 06 2016 02:17
@tvelev92 that appears to be just a Quote of the Day site to me .. one quote per day. If you follow it through you get to where they get them from and they appear to charge … https://theysaidso.com/api/
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:18
I need a random quite api for my project
got one?
Bruce Young
@mutantspore
Jun 06 2016 02:19
@tvelev92 @tvelev92 To maintain our service level we rate limit (10 API calls per hour) our public API usage.
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:20
@mutantspore I need a quote api
Srinivasan
@kksrini89
Jun 06 2016 02:21
expect your help :)
Bruce Young
@mutantspore
Jun 06 2016 02:22
@tvelev92 that last one even has a fully working code snippet at the bottom of their docs page
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:23
Ill give it at try
Bruce Young
@mutantspore
Jun 06 2016 02:25
@tvelev92 …there is no try...
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:26
scope my codepen if you care to http://codepen.io/tvvelev/pen/qNdGbp?editors=1010
I am having issues getting it to display on the ".message"
Iskya
@iskya
Jun 06 2016 02:27
I want nicest icon than the openweathermap, I've found owf fonts but i dont know how to use it, helppp
bscyrpt
@bscyrpt
Jun 06 2016 02:33
@tvelev92 you need to put function(e)<---- so the e.preventDefault() works, i tried console logging the ajax return but there is no data, so maybe source is bad/url
Kevin Holmes
@codersc
Jun 06 2016 02:34
@jdtdesigns it still says sound undefined any ideas?
Greg Duncan
@GregatGit
Jun 06 2016 02:34
@tvelev92 i think if you want to use the e you have to put it in earlier on("click", function(e)
Bruce Young
@mutantspore
Jun 06 2016 02:34
wel he doesn’t have a full URL
Kevin Holmes
@codersc
Jun 06 2016 02:34
var game = {

  count: 1,
  turn: 0,
  compSeq: [],
  userSeq: [],
  mode: 'normal',
  pads: ['1', '2', '3', '4'],
  sound1: new Audio('http://s3.amazonaws.com/freecodecamp/simonSound2.mp3'),
  sound2: new Audio('http://s3.amazonaws.com/freecodecamp/simonSound1.mp3'),
  sound3: new Audio('http://s3.amazonaws.com/freecodecamp/simonSound3.mp3'),
  sound4: new Audio('http://s3.amazonaws.com/freecodecamp/simonSound4.mp3'),

  genCompSeq: function() {

    for (var i = 0; i < this.count; i++) {

      this.compSeq.push( this.pads[Math.floor(Math.random() * this.pads.length)] ); 
    }    

    this.compSeq.push('1');       // animate function does not seem to play first animation so that's why this line is here
  },

  playSound: function(i) {            

    var sound = this['sound' + i];    

    sound.currentTime=0;

    sound.play();
  },
Greg Duncan
@GregatGit
Jun 06 2016 02:34
@tvelev92 and your url looks wrong
Bruce Young
@mutantspore
Jun 06 2016 02:34
http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:35
@mutantspore I just used that
Greg Duncan
@GregatGit
Jun 06 2016 02:35
@tvelev92 no you didnt
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:35
yes I did
Bruce Young
@mutantspore
Jun 06 2016 02:35
@tvelev92 your original post had only part of it
Greg Duncan
@GregatGit
Jun 06 2016 02:35
url: '/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1',
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:35
@mutantspore I changed it to that very recently
it is now displaying a quote but when I try to press get new quote it doesnt give me a new one
Bruce Young
@mutantspore
Jun 06 2016 02:36
@tvelev92 here is teh code given in the API docs> work with that.
$.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
  $("body").append(a[0].content + "<p>&mdash; " + a[0].title + "</p>")
});
@tvelev92 if you have it working now then ok
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:37
how do you post code?
Greg Duncan
@GregatGit
Jun 06 2016 02:37
@tvelev92 the pen was different a moment ago - it must have not update - but now its working fine on my machine
Kevin Holmes
@codersc
Jun 06 2016 02:37
help format
CamperBot
@camperbot
Jun 06 2016 02:37

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick() at _start_ and _end_ around thecode`.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Kevin Holmes
@codersc
Jun 06 2016 02:41
i hate sound elements/js objects with a passion. how can something as simple as playing a sound be rocket science
Jeremy
@jer244
Jun 06 2016 02:42
Hi everyone, just finishing up the JS calculator... Would appreciate any feedback anyone has to offer. Thanks. http://codepen.io/jer244/pen/yJLrmM
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:43
test
Andrew Charlebois
@andrewchar
Jun 06 2016 02:43
@jer244 floating point numbers
do 0.1+0.2 on your calc and you'll see!
Bruce Young
@mutantspore
Jun 06 2016 02:43
@tvelev92 this is rough .. you’ll need to tailor it but this works and gives multiple quotes
http://codepen.io/MutantSpore/pen/aZOraG
bscyrpt
@bscyrpt
Jun 06 2016 02:44
@jer244 only works for first calc, so 333 + 333 = correct answer + 333 = resets to 333
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:44
js
<$("#getQuote").on("click", function()
{

  $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
  $(".message").html(a[0].content + "<p>— " + a[0].title + "</p>")
});





});>
two issues are once I press the button I cannot press wit again for a new quote
2nd issue I am getting the same quote each time
Bruce Young
@mutantspore
Jun 06 2016 02:46
@tvelev92 look at my sample
Kevin Holmes
@codersc
Jun 06 2016 02:46
@tvelev92 i think you need to append the rather than using html look up append
html method*
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:47
it gives szame quote over and over and it stacks into my message box
Jeremy
@jer244
Jun 06 2016 02:47
@andrewchar got it... Will fix that. thanks. @bscyrpt I put in an Ans button to handle calcs with the current answer. is that not working for you?
CamperBot
@camperbot
Jun 06 2016 02:47
:cookie: 276 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
jer244 sends brownie points to @andrewchar and @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 446 | @andrewchar |http://www.freecodecamp.com/andrewchar
bscyrpt
@bscyrpt
Jun 06 2016 02:47
@jer244 also if you enter number and hit =, then hit ans it repeatly just spams , need to limit/only replace once
@jer244 it would work but that is not normally how people will use the calc
Bruce Young
@mutantspore
Jun 06 2016 02:48
@tvelev92 i just changed it to be more like yours.. .. it gives me multiple different quotes.
http://codepen.io/MutantSpore/pen/aZOraG
Jeremy
@jer244
Jun 06 2016 02:50
@bscyrpt You're right. Thanks for taking the time to troubleshoot. Will fix both issues.
CamperBot
@camperbot
Jun 06 2016 02:50
:warning: jer244 already gave bscyrpt points
jer244 sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:51
@mutantspore i appreciate it but I am having the issue with the same code
Bruce Young
@mutantspore
Jun 06 2016 02:51
@jer244 the calculator allows multiple decimal places to be entered. I see you cope with an error but stopping it happen would be nicer
@tvelev92 perhaps there is something you have in your browser interferring with it .. Chrome? try another
Tzvetlin Velev
@tvelev92
Jun 06 2016 02:55
really strange
in safari
it gave me a different quote
hitting the button again doesnt give another quote just like in chorme
chrome
Tulio Natale
@tuliodnw
Jun 06 2016 02:56

people im doing the tic-tac-toe challenge, im just starting, two thing i would like advice is one, how can i clean all the inputs when win/lose, how do create the ai? ideas, you can play now singleplayer lol

http://codepen.io/tuliodnw/pen/OXVYvL?editors=1011

Jeremy
@jer244
Jun 06 2016 02:56
@mutantspore thanks for the suggestion and taking the time to look. I'll try to fix that.
CamperBot
@camperbot
Jun 06 2016 02:56
jer244 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1717 | @mutantspore |http://www.freecodecamp.com/mutantspore
Tulio Natale
@tuliodnw
Jun 06 2016 02:57
btw, use console to play its easier
people im doing the tic-tac-toe challenge, im just starting, two thing i would like advice is one, how can i clean all the inputs when win/lose, how do create the ai? ideas, you can play now singleplayer lol
http://codepen.io/tuliodnw/pen/OXVYvL?editors=1011
btw use console to play its easier
Doomflake
@Doomflake
Jun 06 2016 02:58
Anyone know how to get Scrollspy to actually highlight the active section of the nav bar?
I've tried using css and javascript, and I can't get it to work with either method
Kevin Holmes
@codersc
Jun 06 2016 03:02
var game = {

  count: 1,
  turn: 0,
  compSeq: [],
  userSeq: [],
  mode: 'normal',
  pads: ['1', '2', '3', '4'],
  sound1: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound2.mp3'),
  sound2: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound1.mp3'),
  sound3: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound3.mp3'),
  sound4: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound4.mp3'),

  genCompSeq: function() {

    for (var i = 0; i < this.count; i++) {

      this.compSeq.push( this.pads[Math.floor(Math.random() * this.pads.length)] ); 
    }    

    this.compSeq.push('1');       // animate function does not seem to play first animation so that's why this line is here
  },

  playSound: function(i) {            

    var sound = this['sound' + i];    

    sound.currentTime=0;

    sound.play();
  },

  flash: function(i) {

    var elem = $('.shape' + this.compSeq[i]);

    elem.stop().animate({opacity: '1'}, {

      duration: 50,

      complete: function() {

        elem.stop().animate({opacity: '0.6'}, 200);
      }
    });               
  },

  displayCompSeq: function() {      

    for (var i = 0; i < this.compSeq.length; i++) {             

      doScaledTimeout(i);
    }    

    function doScaledTimeout(i) {   

      setTimeout(function() {

         game.playSound(i)

         game.flash(i);

      }, i * 1000);
    }    
  },

  isCorrectInput: function() {

    var toCheck = this.userSeq.length - 1;

    if (this.compSeq[toCheck + 1] !== this.userSeq[toCheck]) {     

      return false;

    } else {

      return true;
    }
  },

  handleUserInput: function(padNum) {

    this.turn++;

    this.playSound(padNum);

    this.userSeq.push(padNum);

    if (this.mode == 'normal') {      

      if (this.isCorrectInput() && this.turn == this.count) {    

        this.userSeq = [];

        this.turn = 0;

        this.count++

        this.compSeq.push( this.pads[Math.floor(Math.random() * this.pads.length)] );

        this.displayCompSeq();

      } else if (!this.isCorrectInput()) {

        this.userSeq = [];

        this.turn = 0;

        this.displayCompSeq();
      }      
    }
  }
};

game.genCompSeq();

game.displayCompSeq(); 

// function genFlashSeq(level) {

//   var seq = []; var pads = ['1', '2', '3', '4'];

//   for (var i = 0; i < level; i++) {

//     seq.push( pads[Math.floor(Math.random() * pads.length)] );
//   }

//   return seq;
// }

// function flash(elem) {

//     playSound();

//     setTimeout( function() {
//       elem.stop().animate({opacity: '1'}, {

//         duration: 50,

//         complete: function() {

//           elem.stop().animate({opacity: '0.6'}, 200);
//         }
//       });
//     }, 700);
//   }  

// function playSound() {

//     var sound = $('.sound' + this.marker)[0];

//     sound.currentTime=0;                

//     sound.play();    
// }
why is my sound object undefined? and it still makes a sound though WTF!?
Pawan
@pawan92
Jun 06 2016 03:10
how can i get descriptions for my streams that are online? http://codepen.io/pawan92/pen/MyMRwo
Doomflake
@Doomflake
Jun 06 2016 03:12
Feeling like an idiot at the moment. Created a form for users to submit. Realized after I thought it was done I forgot to include a submit button. At least it's easy to fix!
Aryan
@aryandua
Jun 06 2016 03:12
Does my Pomodoro clock have to repeat forever???
like-
session break session break session break session break...
?
Rouque
@Rouque
Jun 06 2016 03:13
Hey anyone in here finished the tribute page project?
skilescm
@skilescm
Jun 06 2016 03:13
Can't seem to figure out why my bootstrap ddropdowns in my navbar NEVER work.
@Rouque , I've finished it.
Rouque
@Rouque
Jun 06 2016 03:14
Oh great.
Okay so in the example page, the style is really great. There is a huge margin between the top of the page and the start of the "box" area, and then a big distance from the top of the box area to the headline text. I can't figure out how to do that. Can you advise me?
skilescm
@skilescm
Jun 06 2016 03:15
You can add margins or padding to achieve this.
padding-bottom : 70px;
Rouque
@Rouque
Jun 06 2016 03:16
Not inline though, I'll have to make a CSS class
Jeremy
@jer244
Jun 06 2016 03:16
@pawan92 use the channels api to get the descriptions (instead of streams)
Rouque
@Rouque
Jun 06 2016 03:16
Can I pad the body?
skilescm
@skilescm
Jun 06 2016 03:18
@Rouque , not if the body contains the other elements
Rouque
@Rouque
Jun 06 2016 03:18
It does
I want there to be some blank blue space before the white of the box appears on mine.
skilescm
@skilescm
Jun 06 2016 03:18
Then padding the body would just shift the whole page down
What element contains the white box?
Rouque
@Rouque
Jun 06 2016 03:19
It's a box around my article essentially.
Easier to reference the example here: https://codepen.io/FreeCodeCamp/full/NNvBQW/
Pawan
@pawan92
Jun 06 2016 03:19
@jer244 thanks! ill try it out
CamperBot
@camperbot
Jun 06 2016 03:19
pawan92 sends brownie points to @jer244 :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @jer244 |http://www.freecodecamp.com/jer244
Rouque
@Rouque
Jun 06 2016 03:20
See how there is significant whitespace before the grey/green box appears, and then there is space between the beginning of the box and the title.
How do I make that happen?
Aryan
@aryandua
Jun 06 2016 03:21
This message was deleted
Doomflake
@Doomflake
Jun 06 2016 03:21
If you're asking what I think, try using the jumbotron class
Aryan
@aryandua
Jun 06 2016 03:21
This message was deleted
Is my pomodoro clock supposed to repeat forever?
Rouque
@Rouque
Jun 06 2016 03:22
Nevermind I think I got it.
Tzvetlin Velev
@tvelev92
Jun 06 2016 03:35
How can I put this request in using javascript GET http://quotes.stormconsultancy.co.uk/random.json
Rouque
@Rouque
Jun 06 2016 03:39
How would I nest text below an image, as in the example tribute page?
Xavier Velez
@JonSnow08
Jun 06 2016 03:43
@Rouque do you want it inside the jumbotron?
Rouque
@Rouque
Jun 06 2016 03:44
Whats the jumbotron?
Xavier Velez
@JonSnow08
Jun 06 2016 03:47
@Rouque look at the example page, see that grey area the image and some text about the image are nested in?
thats a jumbotron
Rouque
@Rouque
Jun 06 2016 03:47
Yeah that's what I want to do to my image
How would you recommend going about that?
skilescm
@skilescm
Jun 06 2016 03:49
@Rouque jumbotron is a class name for a div
Bruce Young
@mutantspore
Jun 06 2016 03:49
@skilescm just a guess… to make bootstrap work fully you need 3 files. Bootstrap.css, jQuery.js and bootstrap.js (in that order)
skilescm
@skilescm
Jun 06 2016 03:50
@mutantspore , haven't added the jQuery.js!!
Will try and report back!
Bruce Young
@mutantspore
Jun 06 2016 03:51
@skilescm jquery must be before bootstrap.js
skilescm
@skilescm
Jun 06 2016 03:51
@mutantspore , nada...
Here's my pen https://codepen.io/skilescm/pen/pbJmGP
Rouque
@Rouque
Jun 06 2016 03:51
It's in bootstrap?
so I can just say div class="jumbotron"
?
Xavier Velez
@JonSnow08
Jun 06 2016 03:51
exactly
Bruce Young
@mutantspore
Jun 06 2016 03:51
@skilescm you don’t have jquery before bootstrap.js
skilescm
@skilescm
Jun 06 2016 03:51
@mutantspore !!! Lifesaver!!
Rouque
@Rouque
Jun 06 2016 03:51
....That didn't work so much.
skilescm
@skilescm
Jun 06 2016 03:51
Thanks so much @mutantspore !
CamperBot
@camperbot
Jun 06 2016 03:51
skilescm sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1718 | @mutantspore |http://www.freecodecamp.com/mutantspore
Xavier Velez
@JonSnow08
Jun 06 2016 03:52
link me to your pen @Rouque
Sorry for the profanity
skilescm
@skilescm
Jun 06 2016 03:52
@Rouque ...LOL at the H1
Rouque
@Rouque
Jun 06 2016 03:56
Noooo
I like the layout the way I have itr
I just don't know how to get the text tucked right up under the picture
like in the example.
See how in the example it has a white background plus that little bar
I don't want to look at the source code... But I might just.
Xavier Velez
@JonSnow08
Jun 06 2016 03:59
@Rouque look at it later if you REALLY want to, but you'll be doing yourself a better service if you don't
Rouque
@Rouque
Jun 06 2016 03:59
Sigh I looked at the image
Xavier Velez
@JonSnow08
Jun 06 2016 03:59
ive been on a twitter button for 3 days, you have no idea how much ive learned in those 3 days though
Rouque
@Rouque
Jun 06 2016 03:59
It's a bootstrap class Caption
Aryan
@aryandua
Jun 06 2016 04:00
Is my podomoro clock supposed to infinitely loop between session and break? if so how
Aata-allah
@Atalaa
Jun 06 2016 04:04
Hello guys and girls, do we need to realize the same website or we can choose another subject ?
skilescm
@skilescm
Jun 06 2016 04:06
@Rouque , make sure you put your text for the caption in a new element
Rouque
@Rouque
Jun 06 2016 04:07
Really?
You mean a new div element yes?
I did that
skilescm
@skilescm
Jun 06 2016 04:07
@JonSnow08 , I just figured out how to make the stupid navbar dropdowns work tonight...lol
@Atalaa for the tribute page?
Aata-allah
@Atalaa
Jun 06 2016 04:08
@skilescm Yes the first front dev project
i dont understand what i have to do, new website or the same
skilescm
@skilescm
Jun 06 2016 04:09
@Atalaa you choose the topic for your tribute page
Aata-allah
@Atalaa
Jun 06 2016 04:09
@skilescm Ok for example i can choose Muhammed Ali the boxer ?
skilescm
@skilescm
Jun 06 2016 04:09
@Atalaa yes
livonian-router
@livonian-router
Jun 06 2016 04:09
it seems that I can't apply scrollspy, anyone can help?
<body data-spy="scroll" data-target="#navigation">

<div class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid" id="navigation">
    <div class="navbar-header">
      <a class="navbar-brand">WebSiteName</a>
    </div>
    <ul class="nav navbar-nav navbar-left">
      <li><a href="#intro">Page 1</a></li>
      <li><a href="#portfolio">Page 2</a></li>
      <li><a href="#contact">Page 3</a></li>
    </ul>
  </div>
</div>

<div class="container">
  <div class="jumbotron">
    <div id="intro">
      <div class="page-header text-center">
      <h2>Hello, world!</h2>
    </div>
      <div class="panel panel-default">
      <div class="panel-body">
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique. Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis. Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede. Sed velit urna, interdum vel, ultricies vel, faucibus at, quam. Donec elit est, consectetuer eget, consequat quis, tempus quis, wisi. In in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ullamcorper fringilla eros. Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros. Etiam at ligula et tellus ullamcorper ultrices. In fermentum, lorem non cursus porttitor, diam urna accumsan lacus, sed interdum wisi nibh nec nisl. Ut tincidunt volutpat urna. Mauris eleifend nulla eget mauris. Sed cursus quam id felis. Curabitur posuere quam vel nibh. Cras dapibus dapibus nisl. Vestibulum quis dolor a felis congue vehicula. Maecenas pede purus, tristique ac, tempus eget, egestas quis, mauris. Curabitur non eros. Nullam hendrerit bibendum justo. Fusce iaculis, est quis lacinia pretium, pede metus molestie lacus, at gravida wisi ante at libero. Quisque ornare placerat risus. Ut molestie magna at mi. Integer aliquet mauris et nibh. Ut mattis ligula posuere velit. Nunc sagittis. Curabitur varius fringilla nisl. Duis pretium mi euismod erat. Maecenas id augue. Nam vulputate. Duis a quam non neque lobortis malesuada. Praesent euismod. Donec nulla augue, venenatis scelerisque, dapibus a, consequat at, leo. Pellentesque libero lectus, tristique ac, consectetuer sit amet, imperdiet ut, justo. Sed aliquam odio vitae tortor. Proin hendrerit tempus arcu. In hac habitasse platea dictumst. Suspendisse potenti. Vivamus vitae massa adipiscing est lacinia sodales. Donec metus massa, mollis vel, tempus placerat, vestibulum condimentum, ligula. Nunc lacus metus, posuere eget, lacinia eu, varius quis, libero. Aliquam nonummy adipiscing augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique. Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis. Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede. Sed velit urna, interdum vel, ultricies vel, faucibus at, quam. Donec elit est, consectetuer eget, consequat quis, tempus quis, wisi. In in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ullamcorper fringilla eros. Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros. Etiam at ligula et tellus ullamcorper ultrices. In fermentum, lorem non cursus porttitor, diam urna accumsan lacus, sed interdum wisi nibh nec nisl. Ut tincidunt volutpat urna. Mauris eleifend nulla eget mauris. Sed cursus quam id felis. Curabitur posuere quam vel nibh. Cras dapibus dapibus nisl. Vestibulum quis dolor a felis congue vehicula. Maecenas pede purus, tristique ac, tempus eget, egestas quis, mauris. Curabitur non eros. Nullam hendrerit bibendum justo. Fusce iaculis, est quis lacinia pretium, pede metus molestie lacus, at gravida wisi ante at libero. Quisque ornare placerat risus. Ut molestie magna at mi. Integer aliquet mauris et nibh. Ut mattis ligula posuere velit. Nunc sagittis. Curabitur varius fringilla nisl. Duis pretium mi euismod erat. Maecenas id augue. Nam vulputate. Duis a quam non neque lobortis malesuada. Praesent euismod. Donec nulla augue, venenatis scelerisque, dapibus a, consequat at, leo. Pellentesque libero lectus, tristique ac, consectetuer sit amet, imperdiet ut, justo. Sed aliquam odio vitae tortor. Proin hendrerit tempus arcu. In hac habitasse platea dictumst. Suspendisse potenti. Vivamus vitae massa adipiscing est lacinia sodales. Donec metus massa, mollis vel, tempus placerat, vestibulum condimentum, ligula. Nunc lacus metus, posuere eget, lacinia eu, varius quis, libero. Aliquam nonummy adipiscing augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique. Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis. Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede.</p>
    </div>
    </div>
    </div>
    <div id="portfolio">
      <div class="page-header text-center">
      <h3>Hello, world!</h3>
    </div>
      <div class="panel panel-default">
      <div class="panel-body">
        <div class="row">
          <div class="col-xs-6 col-md-6">
            <div class="thumbnail">
            </div>
            <div class="thumbnail">
            </div>
            <div class="thumbnail">
            </div>
            <div class="thumbnail">
            </div>
          </div>
          <div class="col-xs-6 col-md-6">
            <div class="thumbnail">
            </div>
            <div class="thumbnail">
            </div>
            <div class="thumbnail">
            </div>
            <div class="thumbnail">
            </div>
          </div>
        </div>
        <hr class="line"/>
      </div>
    </div>
    </div>
    <div id="contact">
      <div class="page-header text-center">
      <h3>Hello, world!</h3>
    </div>
      <div class="panel panel-default">
        <div class="panel-body">
        <div class="row">
          <div class="col-xs-6 col-md-6">
            <form role="form">
              <div class="form-group form-item">
                <label for="name">Name</label>
                <input type="text" class="form-control" id="name" placeholder="Name">
              </div>
              <div class="form-group form-item">
                <label for="email">E-mail</label>
                <input type="email" class="form-control" id="email" placeholder="E-mail">
              </div>
              <div class="form-group form-item">
                <label for="tel">Telephone</label>
                <input type="tel" class="form-control" id="tel" placeholder="Telephone">
              </div>
              <div class="form-group form-item">
                <label for="message">Telephone</label>
                <textarea class="form-control" id="message" placeholder="Message"></textarea>
              </div>
            </form>
          <div>
        </div>
      </div>
    </div>
</div>
</div>
    </div>
</div>
</div>

<div id="footer">
  <div class="container">
    <p class="text-muted">Place sticky footer content here.</p>
  </div>
</div>

</body>
Aata-allah
@Atalaa
Jun 06 2016 04:09
@skilescm Thank you man
CamperBot
@camperbot
Jun 06 2016 04:09
atalaa sends brownie points to @skilescm :sparkles: :thumbsup: :sparkles:
:cookie: 163 | @skilescm |http://www.freecodecamp.com/skilescm
skilescm
@skilescm
Jun 06 2016 04:11
@livonian-router , I think the data target is incorrect. try .navbar
".navbar"
livonian-router
@livonian-router
Jun 06 2016 04:15

@skilescm I have tried that, but It seems that doesn't work either. I also changed body position to relative too.

Here's my jquery code

$('body').scrollspy({ 
  target: '.navbar' 
})
DJ
@qualitymanifest
Jun 06 2016 04:17
@livonian-router if you have a codepen, paste the URL... you'll get better help if there's code that people can play with. plus then you don't have to paste a wall of code
skilescm
@skilescm
Jun 06 2016 04:18
Heres' the example I found from bootstrap

'''

<body data-spy="scroll" data-target=".navbar" data-offset="50">
'''

CamperBot
@camperbot
Jun 06 2016 04:18
:bulb: to format code use backticks! ``` more info
skilescm
@skilescm
Jun 06 2016 04:18
failed attempt at code formatting
the heck is a backtick anyway?
DJ
@qualitymanifest
Jun 06 2016 04:19
it's on the same key as ~
skilescm
@skilescm
Jun 06 2016 04:20
@qualitymanifest wins the internet.... Thanks!
CamperBot
@camperbot
Jun 06 2016 04:20
skilescm sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1184 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Jun 06 2016 04:20
np
livonian-router
@livonian-router
Jun 06 2016 04:32
@qualitymanifest Okay, here's the code : http://codepen.io/livonian_router/full/bedyNP/
DJ
@qualitymanifest
Jun 06 2016 04:39
@livonian-router you just need to add bootstrap js and it will work
when in doubt, checking console for error messages is good: Uncaught TypeError: $(...).scrollspy is not a function
livonian-router
@livonian-router
Jun 06 2016 04:43
@qualitymanifest Thank you, it works perfectly :smile:
CamperBot
@camperbot
Jun 06 2016 04:43
livonian-router sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1186 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
DC
@dctor
Jun 06 2016 04:46
hey all...in the Wiki project, my returned search results are not lineing up under the search bar as expected...what's cause of this problem? thanks
http://codepen.io/dctor/pen/QEbRvj
DJ
@qualitymanifest
Jun 06 2016 04:55
@dctor close the input-group div before you start the ul
DC
@dctor
Jun 06 2016 04:58
ok
@qualitymanifest fixed! thank you...i've been scratching my head at 1am
CamperBot
@camperbot
Jun 06 2016 05:00
dctor sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1187 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
DC
@dctor
Jun 06 2016 05:01
thank you and time to go to bed...i will wrap up this project tomorrow...another one done!
DJ
@qualitymanifest
Jun 06 2016 05:02
yw, good night
DC
@dctor
Jun 06 2016 05:03
@qualitymanifest quick question...i tried to close <input> with </input> but didn't fix the problem..why is that?
DJ
@qualitymanifest
Jun 06 2016 05:04
@dctor <input> doesn't take a closing tag
DC
@dctor
Jun 06 2016 05:05
yap! so is <span>?
DJ
@qualitymanifest
Jun 06 2016 05:06
span does, i think
Arun Yadav
@ydarun
Jun 06 2016 05:16

Challange - "TRIBUTE WEB PAGE":

Is this correct way to build ??

Animation is not happenning on images .. How do i give animation better visual effects??

Here is the link https://codepen.io/ydarun/full/WxeBrp/

Kyle W Pilkinton
@tadake
Jun 06 2016 05:31
hey guys does anyone know any free image hosting sites that would allow me to link my own pictures to code pen?
Rouque
@Rouque
Jun 06 2016 05:33
Okay so here is what I have so far in my tribute page
The only thing I can't figure out is how to make the thumbnail closer in on the picture.
Can anyone help me with that?
Dakota Bryant
@dakotabryant
Jun 06 2016 05:34
@Rouque what do you mean when you say thumbnail?
Rouque
@Rouque
Jun 06 2016 05:34
White border around the picture and the caption text
it spreads really wide I want to tuck it in a bit.
Dakota Bryant
@dakotabryant
Jun 06 2016 05:34
You can set a width, and then give the white container a margin of 0 auto to center it
Rouque
@Rouque
Jun 06 2016 05:35
it's a bootstrap class though
Dakota Bryant
@dakotabryant
Jun 06 2016 05:35
so maybe like .white-container { width: 75; margin: 0 auto; }
Rouque
@Rouque
Jun 06 2016 05:35
can I overwrite part of the class
Hmmm nevermind I think I made it work. Made the image giant but it works.
Rouque
@Rouque
Jun 06 2016 05:41
Okay I think I am done. Is there a publish button or do I just take the link in my browser and plug that in?
Oxide Debbarma
@oxide94Git
Jun 06 2016 06:06
@oxide94Git
hi friends.. stuck with constructing the base.. need help on my portfolio
http://codepen.io/oxide94/pen/YqBQmN/?editors=1000
Greg Duncan
@GregatGit
Jun 06 2016 06:18
@oxide94Git you have to add jQuery.js and bootstrap.js to javascript in the settings to get your bootstrap working - and here is a template to help http://www.w3schools.com/bootstrap/bootstrap_scrollspy.asp
Oxide Debbarma
@oxide94Git
Jun 06 2016 06:24
thanks for sugestion @GregatGit , i've added the jquery and bootstrap, i 'm still on w3c but having a hard time figuring out where did my "About " dissapear
CamperBot
@camperbot
Jun 06 2016 06:24
oxide94git sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 565 | @gregatgit |http://www.freecodecamp.com/gregatgit
sleeplessclassics
@sleeplessclassics
Jun 06 2016 06:34
I am stuck with Caeser's Cipher, I not sure how to change the char's in the string
Elbert Cortez
@trip16661
Jun 06 2016 06:38
Hello guys
@sleeplessclassics chars?
sleeplessclassics
@sleeplessclassics
Jun 06 2016 06:39
like the character
say for example i want to change a string "AA" to "NN"
Oxide Debbarma
@oxide94Git
Jun 06 2016 06:39
pikachu @trip16661
Elbert Cortez
@trip16661
Jun 06 2016 06:40
@sleeplessclassics that screams regular expression
@oxide94Git JESUS!
YISUS!
sleeplessclassics
@sleeplessclassics
Jun 06 2016 06:40
oh, alright
i can use regular expression
Wayne Bunch
@waynebunch
Jun 06 2016 06:41
Can someone explain to me how I could turn function result() into a callback? I've been reading but it's just not clicking. I'm hoping an explanation will help. Basically I want someFunction to be able to use result()s data. Hopefully that makes sense. http://codepen.io/waynebunch/pen/QEbaNJ
Elbert Cortez
@trip16661
Jun 06 2016 06:41
@sleeplessclassics if all you want its to target some string pattern and turn in into other kind of string
then reg exp is your friend
Greg Duncan
@GregatGit
Jun 06 2016 06:42
@sleeplessclassics str.charCodeAt(index) will give you a number (that you can use)
Elbert Cortez
@trip16661
Jun 06 2016 06:42
but anyway link me the challenge and i might help
oh greg how have you been :)
@GregatGit are you familiar with fetch?
Greg Duncan
@GregatGit
Jun 06 2016 06:44
@trip16661 no
Elbert Cortez
@trip16661
Jun 06 2016 06:44
ok :P
Greg Duncan
@GregatGit
Jun 06 2016 06:44
@GregatGit what is fetch?
im trying to use some new things xD
Greg Duncan
@GregatGit
Jun 06 2016 06:49
@trip16661 it looks good!
Oxide Debbarma
@oxide94Git
Jun 06 2016 06:49
@GregatGit thanks again.. solved :smile:
CamperBot
@camperbot
Jun 06 2016 06:49
oxide94git sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:warning: oxide94git already gave gregatgit points
Elbert Cortez
@trip16661
Jun 06 2016 06:50
@GregatGit im rebuilding my weather app with ES6 and im learning a lot of things i didn't new xD
    function getJSON(response) {
        return response.json();
    }
    function getCity(location) {
        const lat = location.coords.latitude;
        const long = location.coords.longitude;
        return fetch(apis.location.url(lat, long))
        .then(getJSON)
        .then((cityData) => fetch(cityData._embedded.location.nearest-cities[0]._links.location.nearest-city.href))
        .then(getJSON)
        .then ((data) => console.log(data))
im abit stuck but well :P
Greg Duncan
@GregatGit
Jun 06 2016 06:54
@waynebunch I recomend you use some jQuery to get your search happening - so give you go button and id="search" in the html - then
$('#search').click(result);
kirbyedy
@kirbyedy
Jun 06 2016 06:56
@trip16661 geolocation?
Greg Duncan
@GregatGit
Jun 06 2016 06:57
@waynebunch give your input and id at well id="myItem"
var input = $('#myItem').val();
Elbert Cortez
@trip16661
Jun 06 2016 06:57
@kirbyedy y well its just a part of all the code but y
kirbyedy
@kirbyedy
Jun 06 2016 06:57
then make sure you use some api that supports secure connection
Wayne Bunch
@waynebunch
Jun 06 2016 06:58
@GregatGit oh yea, I haven't even really touched the html and jquery. I was just trying to figure out how to access this .ajax data outside of the result() function
Greg Duncan
@GregatGit
Jun 06 2016 06:59
@waynebunch save it to a variable declared outside the result function
Wayne Bunch
@waynebunch
Jun 06 2016 06:59
So I did that on the last one..but I've been reading around and most people say that's not a good idea because you would have to turn AJAX into SJAX
and that could cause problems. (so I've read)
basically I cheated last time by doing async: false
To counter that I've also read you could fix this by using a callback function. But I'm not really understanding how to apply that here
Greg Duncan
@GregatGit
Jun 06 2016 07:02
@waynebunch
var x;
myFunction function(){
   x = "new value";
}
myFunction();
@waynebunch you should declare things outside a function if you need to use them outside the function
Wayne Bunch
@waynebunch
Jun 06 2016 07:03
@GregatGit It won't work unless I turn async off with ajax
believe me, I've tried
:)
function result() {
    $.ajax({
      url: 'https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=' + input + '&callback=?',
      dataType: 'json',
      type: 'GET',
      async: false, //I would have to use this, and that is supposedly bad form
      success: function(data) {
        return data;
      }
    })
  }
Daniel
@clevadani
Jun 06 2016 07:13
Guys, in the simon game, how do I make my buttons light up
Elbert Cortez
@trip16661
Jun 06 2016 07:15
@clevadani active slector
Daniel
@clevadani
Jun 06 2016 07:16
@trip16661 what are active selectors?
Elbert Cortez
@trip16661
Jun 06 2016 07:16
@clevadani button:active
whenever you click it it does something
I'm sorry im not explaining myself well, you basically need to do the lighting in CSS
and css has a pseudo class (i think its called) called :active same as :hover
so if you edit your button psudoclass to do something in this case light up
it will light up on click
and you can do the patern with just an active class in css adding the lighting to the button you want
Greg Duncan
@GregatGit
Jun 06 2016 07:19
@waynebunch
$(document).ready(function() {
  function result() {
    $.ajax({
      url: 'https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=germany&callback=?',
      dataType: 'json',
      type: 'GET',
      success: function(data) {
        console.log(data);
      }
    })
  }
  result();
});
@waynebunch create some function that takes in data and displays it to the html - and put it in the success
Daniel
@clevadani
Jun 06 2016 07:22
@trip16661 ok. Would try that now
Manny
@Alloffices
Jun 06 2016 09:55
Created a list of front-end code challenges for my class mates and thought I'd share with you all | Novice to Pro: https://goo.gl/8dJ7MQ :smile:
kirbyedy
@kirbyedy
Jun 06 2016 10:47
nice :thumbsup:
I hate those sign up forms, but well done mate :)
rahildar
@rahildar
Jun 06 2016 10:55
hi !!
i need to center the paragraph please help http://codepen.io/rahildar/pen/XKbvBX
i need the red box aligned at center of blue box
rahildar
@rahildar
Jun 06 2016 11:01
@kirbyedy i tried margin left and right both are working fine but margin top is not working
kirbyedy
@kirbyedy
Jun 06 2016 11:02
you can try with padding-top, but check out that link I gave you
rahildar
@rahildar
Jun 06 2016 11:06
@kirbyedy thanks
CamperBot
@camperbot
Jun 06 2016 11:06
rahildar sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1063 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
rahildar
@rahildar
Jun 06 2016 11:07
i will check but padding will not work that will just increase the size of paragraph
kirbyedy
@kirbyedy
Jun 06 2016 11:10
@rahildar you basically need this, but I dont know how good you are with flexbox
.parent {
  display: flex;
  justify-content: center;
  align-items: center;
}
rahildar
@rahildar
Jun 06 2016 11:21
@kirbyedy thanks once again especially for the link..that one just worked
CamperBot
@camperbot
Jun 06 2016 11:21
rahildar sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:warning: rahildar already gave kirbyedy points
Doomflake
@Doomflake
Jun 06 2016 12:19
Anyone know how to make scrollspy cooperate?
Evan Davis
@davisec52
Jun 06 2016 12:28
Good morning! I think I've completed or am close to completing the Simon app. I'd appreciate anyone kicking it around and letting me know of any errors. http://codepen.io/davisec52/full/QyGOXG/
kirbyedy
@kirbyedy
Jun 06 2016 12:30
@davisec52 works for me :thumbsup:
Evan Davis
@davisec52
Jun 06 2016 12:35
@kirbyedy Thank you for checking it out!
CamperBot
@camperbot
Jun 06 2016 12:35
davisec52 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1064 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Diego Mayer
@Chrono79
Jun 06 2016 12:40
Good morning, quick question, I want to show some web page code (the source code, not the html) inside another web page, how could I do that? Is there some tag I could use, I've tried <code> but it doesn't work
Tbuglc
@tbuglc
Jun 06 2016 12:43
try with <pre> @Chrono79
Diego Mayer
@Chrono79
Jun 06 2016 12:43
@tbuglc already tried that too @tbuglc , no luck either
Tbuglc
@tbuglc
Jun 06 2016 12:46
cool, try this out now. replace these characters "<" with "<" and ">" with ">" without quotes please
inside your code tag @Chrono79
Diego Mayer
@Chrono79
Jun 06 2016 12:48
do you mean the real characters with their html entities counterpart don't you?
Tbuglc
@tbuglc
Jun 06 2016 12:48
yes, i do
Diego Mayer
@Chrono79
Jun 06 2016 12:49
Ok, I'll try, I think it could work, thanks @tbuglc
CamperBot
@camperbot
Jun 06 2016 12:49
chrono79 sends brownie points to @tbuglc :sparkles: :thumbsup: :sparkles:
:cookie: 90 | @tbuglc |http://www.freecodecamp.com/tbuglc
Tbuglc
@tbuglc
Jun 06 2016 12:52
Good luck @Chrono79 Also if you've ever heard about emmet plug-in, use it on your text-editor to boost up your html stuffs. ex: div>(button.btn.btn-default{Button $})*3 and press tab key to see its magic!
Diego Mayer
@Chrono79
Jun 06 2016 12:55
Similar to DW functionality, but free, nice one
Tbuglc
@tbuglc
Jun 06 2016 12:56
Pretty well!
purnendutiwari
@purnendutiwari
Jun 06 2016 12:58
@Chrono79 : try this replace "<" with "&lt" and ">" with "&gt", this works
Diego Mayer
@Chrono79
Jun 06 2016 12:58
@purnendutiwari yes, I've already done that ;)
purnendutiwari
@purnendutiwari
Jun 06 2016 12:59
:clap:
chetanmahore
@chetanmahore
Jun 06 2016 13:00
i need help
anyone here
Tbuglc
@tbuglc
Jun 06 2016 13:04
yep!
pls help
I am trying to get intro text and image center from all side.
nameToReachPeople
@nameToReachPeople
Jun 06 2016 13:13
Hi, i'm trying to set background-image to header tag
http://codepen.io/ustvarno/pen/pbjoBO?editors=1100
chetanmahore
@chetanmahore
Jun 06 2016 13:13
I try giving em margin, but it doesn't work
kirbyedy
@kirbyedy
Jun 06 2016 13:14
@chetanmahore try with margin: 0 auto;
Tbuglc
@tbuglc
Jun 06 2016 13:15
set the width to auto and margin: auto;
chetanmahore
@chetanmahore
Jun 06 2016 13:15
to which div?
on desktop the intro image is going on very left side.
while on mobile view it looks fine.
Yaroslav
@YVeselovskyi
Jun 06 2016 13:17
select[option[name='customer[sposob-dostavki]']]
is this ok for css?
chetanmahore
@chetanmahore
Jun 06 2016 13:18
@kirbyedy i did, it didn't change anything at all
Tbuglc
@tbuglc
Jun 06 2016 13:18
@chetanmahore is that inside jumbotron?
chetanmahore
@chetanmahore
Jun 06 2016 13:18
@tbuglc yes
REDPILLS
@Intellijentdezine
Jun 06 2016 13:20
Hey guys I;m new to this...how do i start the curriculum?
chetanmahore
@chetanmahore
Jun 06 2016 13:21
@kirbyedy @tbuglc you guys there?
Tbuglc
@tbuglc
Jun 06 2016 13:21
cool, wrap your text inside <p class="text-center" and image inside a div with a class="img-custom-style" and customiz is to width of your choice with margin:auto;
sorry for typo @chetanmahore customize its width margin/ .img-custom-style{ width: auto; margin: auto;}
chetanmahore
@chetanmahore
Jun 06 2016 13:23
ok.
made update
the image moved more on left side :worried:
Tbuglc
@tbuglc
Jun 06 2016 13:30
this is the code that may help, i'm typing...
chetanmahore
@chetanmahore
Jun 06 2016 13:31
Can you figure it out if i have set any wrong col properties
kirbyedy
@kirbyedy
Jun 06 2016 13:31
@chetanmahore put text-center
here: <div class="text-center col-xs-6 col-md-4 extra-col-4">
make it like this, should be ok
I have to say that your columns look a bit strange to me
Tbuglc
@tbuglc
Jun 06 2016 13:33
<div class="jumbotron"><div class="row"><div class="col-md-12"><p class="text-center">text here</p></div></div><div class="row"><div class="col-md-12"><img here> </div></div></div>
chetanmahore
@chetanmahore
Jun 06 2016 13:34
@tbuglc Ok. I am replacing with this.
let me see if it works. pls stay until i fix this :P
Tbuglc
@tbuglc
Jun 06 2016 13:37
okay
it looks like this now
i want image and intro text alongside in same line.
Jonathan Coleman
@jondcoleman
Jun 06 2016 13:42

any thoughts on how to get the titles to line up better given the varying heights of the thumbnails?

http://codepen.io/jondcoleman/full/YWPrWg/

Tbuglc
@tbuglc
Jun 06 2016 13:44
Oops! I'm sorry! I thought you'd like it to be as qlip
chetanmahore
@chetanmahore
Jun 06 2016 13:46
yes. i want to look like qlip. :)
Tbuglc
@tbuglc
Jun 06 2016 13:46
*like
chetanmahore
@chetanmahore
Jun 06 2016 13:47
now i feel like giving up
Tbuglc
@tbuglc
Jun 06 2016 13:47
@chetanmahore : No my friend, keep it up.
James Winfield
@jamesthemonkeh
Jun 06 2016 13:47
Hello. Can anyone advise why my tweet button does not work properly? On Firefox it opens a tweet page for every quote that has ever shown, on Chrome, it opens a tweet page for only the first quote http://codepen.io/jameswinfield/pen/vKOdKQ
Tbuglc
@tbuglc
Jun 06 2016 13:48
@chetanmahore : If I see well, qlip has text above image not image alongside text. isn't it?
chetanmahore
@chetanmahore
Jun 06 2016 13:49
you are right, it is not alongside.
Tbuglc
@tbuglc
Jun 06 2016 13:50
@chetanmahore : So, I think what remains there is to put image on center!
chetanmahore
@chetanmahore
Jun 06 2016 13:53
I think getting two col in under single div, then centering em would work. but i don't know how to do that.
Tbuglc
@tbuglc
Jun 06 2016 13:54
@chetanmahore : Wait a moment! let me check your code again. by the way Add img-responsive to <img >
<div class="row row-img-cust">
<div class="col-md-12"><img src="http://i.imgur.com/XwErPtx.png"></div>
</div>
</div>
chetanmahore
@chetanmahore
Jun 06 2016 13:57
Updated
Tbuglc
@tbuglc
Jun 06 2016 13:58
@chetanmahore : css code // .row-img-cust{ width: 150px; margin: auto; } note: if the width does suit to you, you can increase or descrease
chetanmahore
@chetanmahore
Jun 06 2016 14:03
okay.
Melike
@mokka93
Jun 06 2016 14:05

<!DOCTYPE html>

<html lang="en">
<head>
<title>BeatGeneration</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style>
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
width: 70%;
margin: auto;
}
</style>
</head>

<body>
<div class="container">
<br>
<div id="BeatCarousel" class="carousel slide" data-ride="carousel">
<!--Indicators-->
<ol class="carousel-indicators">
<li data-target="BeatCarousel" data-slide-to="0" class="active"></li>
<li data-target="BeatCarousel" data-slide-to="1"></li>
<li data-target="BeatCarousel" data-slide-to="2"></li>
<li data-target="BeatCarousel" data-slide-to="3"></li>
<li data-target="BeatCarousel" data-slide-to="4"></li>
</ol>

<!--Wrapper for slides-->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="https://s-media-cache-ak0.pinimg.com/736x/13/a5/0e/13a50ea192941c363fe47d6d61bb2cc4.jpg" alt= "Kerouac" width="460" height="345">
</div>

<div class="item">
<img src="https://macelleriamarleo.files.wordpress.com/2014/10/nyc25506.jpg" alt= "Kerouac" width="460" height="345">
</div>

<div class="item">
<img src="https://s-media-cache-ak0.pinimg.com/1200x/87/69/05/87690580eb669c63b1e001c03a552a00.jpg" alt= "Kerouac" width="460" height="345">
</div>

<div class="item">
<img src="https://pbs.twimg.com/media/B_sJT3bWEAAT8cA.jpg:large" alt= "Kerouac" width="460" height="345">
</div>

<div class="item">
<img src="http://4.bp.blogspot.com/-YkS1a7BpyHc/Va5h3UlKV8I/AAAAAAAAJLI/5XsAs5hebqI/s1600/Cat.-49-Jack-Kerouac-1953.jpg" alt= "Kerouac" width="460" height="345">
</div>
</div>

<!--Left and right controls-->
<a class="left carousel-control" href="#BeatCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#BeatCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>

</body>
</html>

I am writing the tribute page and ı wanted to add this
but is didnt work..
can anybody tell me whats wrong?
chetanmahore
@chetanmahore
Jun 06 2016 14:06
it there a col class that covers 90% of space?
@mokka93 codepen link?
Tbuglc
@tbuglc
Jun 06 2016 14:08
i think if you add a customized class and set its width: 90%; or you uset offset bootstrap class
Melike
@mokka93
Jun 06 2016 14:08
how do I do that?
I mean where do ı add it
chetanmahore
@chetanmahore
Jun 06 2016 14:16
sorry i don't understand. I checked your link. The only issue i could figure is that body isn't centered well.
Melike
@mokka93
Jun 06 2016 14:16
yea i dont get why it isnt though:D
Ill do some reseasech, thanks anyway @chetanmahore @tbuglc
CamperBot
@camperbot
Jun 06 2016 14:17
mokka93 sends brownie points to @chetanmahore and @tbuglc :sparkles: :thumbsup: :sparkles:
:cookie: 103 | @tbuglc |http://www.freecodecamp.com/tbuglc
:cookie: 153 | @chetanmahore |http://www.freecodecamp.com/chetanmahore
Melike
@mokka93
Jun 06 2016 14:17
:)
Harshit Anand
@nerocool996
Jun 06 2016 14:18
I need some help. I am working on twitch tv app. I am using 2 different api's 'https://api.twitch.tv/kraken/channels/freecodecamp' this for getting the channel info and https://api.twitch.tv/kraken/streams/freecodecamp for knowing weather they are streaming or not. Is there a way so that call the channel api first and then the stream api?
Jas K
@jask84
Jun 06 2016 14:21
Hi all. I'm working on the Simon game and I am stuck on one section at the moment - I am using an IIFE that contains a setTimeout within a for loop for my computer turn function. However, the computer turn still seems to be calling all the turns at once. Appreciate if someone could have a quick look and give me any hints. Please ignore the user turn not clearing the boxes after they have been clicked - still working on it. Thanks http://codepen.io/jask/pen/qNdRBw?editors=0010
chetanmahore
@chetanmahore
Jun 06 2016 14:23
@tbuglc thanks, i got it working. :)
CamperBot
@camperbot
Jun 06 2016 14:23
chetanmahore sends brownie points to @tbuglc :sparkles: :thumbsup: :sparkles:
:cookie: 104 | @tbuglc |http://www.freecodecamp.com/tbuglc
Jas K
@jask84
Jun 06 2016 14:23
@nerocool996 I think I remember having to have an ajax request within an ajax success call, therefore using both apis
Harshit Anand
@nerocool996
Jun 06 2016 14:27
@jask84 That's what I am doing.
hmm
Jas K
@jask84
Jun 06 2016 14:29
@nerocool996 thats all I can remember doing tbh. if that is what youre doing, it may be some small error somewhere perhaps?
Harshit Anand
@nerocool996
Jun 06 2016 14:30
https://codepen.io/nerocool996/pen/xOGvPO this my pen.
Can you give it a look
Never Mind it worked
@jask84 Thanks for the help tho :)
CamperBot
@camperbot
Jun 06 2016 14:33
nerocool996 sends brownie points to @jask84 :sparkles: :thumbsup: :sparkles:
:cookie: 258 | @jask84 |http://www.freecodecamp.com/jask84
Jas K
@jask84
Jun 06 2016 14:33
@nerocool996 ok cool. What was the issue in the end?
Adam
@AdamTheWizard
Jun 06 2016 14:39
hello, just an easy one I'm sure but any idea why the last 2 divs (far right) has space at the top? I cant work it out myself https://codepen.io/AdamTheWizard/pen/PzqLYP
Konstantin
@kostanakis
Jun 06 2016 14:41
'''
CamperBot
@camperbot
Jun 06 2016 14:41
:bulb: to format code use backticks! ``` more info
Konstantin
@kostanakis
Jun 06 2016 14:42
```
``` javascript
for (var i = 0; i < contacts.length; i++) {
    if (contacts[i].firstName == firstName && 
        contacts[i].hasOwnProperty(prop)) 
    {
      return contacts[i][prop];
    } else if (contacts[i].firstName == firstName && 
        !contacts[i].hasOwnProperty(prop)) {
      return "No such property";
    } else if (contacts[i].firstName !== firstName) {
      return "No such contact";
    } 
  }
Guys, it seems that I do something wrong... any clues?
Last elif breaks previous conditions...
Jared Abel
@jaredabel
Jun 06 2016 14:47
@jask84 Still trying to get your simon to play with the proper delay?
Jas K
@jask84
Jun 06 2016 14:48
@jaredabel yeah. I am trying to get the computer to take its turns with a delay between each button being pressed
Jas K
@jask84
Jun 06 2016 14:49
hi @AdamTheWizard I had a look but couldnt figure it out. Maybe someone else can help.
Jared Abel
@jaredabel
Jun 06 2016 14:49
in the end it looks like this
function play(array) {
     playerTurn = false;
setTimeout(function () { //new new new new
    // http://stackoverflow.com/questions/30865456/javascript-loop-through-array-with-delay
    // http://stackoverflow.com/users/702469/jashwant
        for (var i = 0; i < array.length; i++) {
          playerTurn = false;
          (function(i) {
            setTimeout(function() {
              console.log(array[i]);
              $('#' + array[i]).fadeTo('fast', 0.53).fadeTo('fast', 1);
              new Audio(audio[colors.indexOf(array[i])]).play();

            }, 600 * i);
                   })(i);
    }; 
             }, 600); // new time thing
      setTimeout(function() {
        playerTurn = true;
        }, 600 * moves.length);

} // end of play
Chase
@Belax8
Jun 06 2016 14:49
@AdamTheWizard I'm not really sure why it's doing that. you can fix it by adding top: -20px; in your CSS for .div12
Jas K
@jask84
Jun 06 2016 14:49
@jared cheers dude. I will have a look
Jared Abel
@jaredabel
Jun 06 2016 14:50
the stuff commented with new time thing, was what I also added so there would be a delay in between the players round and the computers round
Jas K
@jask84
Jun 06 2016 14:50
@jaredabel thanks. I will look at this now
CamperBot
@camperbot
Jun 06 2016 14:50
jask84 sends brownie points to @jaredabel :sparkles: :thumbsup: :sparkles:
:cookie: 346 | @jaredabel |http://www.freecodecamp.com/jaredabel
Jas K
@jask84
Jun 06 2016 14:50
@jaredabel so you had the same issue as me?
Jared Abel
@jaredabel
Jun 06 2016 14:50
yup, for weeks
i could play my game through the console
i just couldnt get it to play them in a queue properly
Jas K
@jask84
Jun 06 2016 14:51
@jaredabel ive been stuck on it for a week too. I appreciate the help. I am unsure right now why the IIFE didnt work in this case??
Jared Abel
@jaredabel
Jun 06 2016 14:57
No idea either, I'm a noob
Jas K
@jask84
Jun 06 2016 14:59
@jaredabel same here lol
Jared Abel
@jaredabel
Jun 06 2016 15:00
also think your game might have crashed my firefox, haha
and i 'stole' your error sound, if you don't mind. I hadn't added that to my game yet
Jas K
@jask84
Jun 06 2016 15:11
@jaredabel really?! Is there some bug in my game lol? Yeah feel free to take the sound - not like its mine anyway
Jared Abel
@jaredabel
Jun 06 2016 15:16
@jask84 Not sure really, once i get a few rounds in and then start clicking everywhere it starts to bog down
might just because it's unfinished
Jas K
@jask84
Jun 06 2016 15:20
@jaredabel could be. I haven't actually stopped user clicking once the computer turn ends so could be causing all sorts of issues
ill get in finished and check it out. Havent had it crash on chrome yet...
Bludfire
@Bludfire
Jun 06 2016 15:29
can i add text under a picture in same frame?
Islam Ibakaev
@dagman
Jun 06 2016 15:31
hey guys how it looks? http://dagman.github.io/
purnendutiwari
@purnendutiwari
Jun 06 2016 15:35
wow!! @dagman
navigation bar collapse isn't working properly, need help
https://codepen.io/purnendu/full/YWXBBM/
it is working fine in w3schools try it editor
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 15:38
@purnendutiwari you have to add jQuery and bootstrap.js too
purnendutiwari
@purnendutiwari
Jun 06 2016 15:41
got it, thanks @UtkarshShukla7
CamperBot
@camperbot
Jun 06 2016 15:41
:cookie: 581 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
purnendutiwari sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 15:41
@purnendutiwari np
Islam Ibakaev
@dagman
Jun 06 2016 15:44
hey guys where can i find sound like on this page and where can i find some good sounds for using in web?
purnendutiwari
@purnendutiwari
Jun 06 2016 15:46

@UtkarshShukla7 :can you please tell me where to add this in codepen?
I am missing this piece of code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 15:50
@purnendutiwari like you added bootstrap for css click javascript wheel to add those libraries
purnendutiwari
@purnendutiwari
Jun 06 2016 15:51
I did.... still not working
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 15:52
@purnendutiwari did you saved your codepen after adding and ran it again
purnendutiwari
@purnendutiwari
Jun 06 2016 15:53
yes I did
@UtkarshShukla7
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 15:54
@purnendutiwari ok so you are missing s in https in bootstrap link
you can also add easily using the dropdowns in Quick-add
@purnendutiwari done??
purnendutiwari
@purnendutiwari
Jun 06 2016 15:57
i worked now....thanks again,
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 15:57
@purnendutiwari np
purnendutiwari
@purnendutiwari
Jun 06 2016 15:57
in w3schools it was working without s... ijust copied it and pasted that link
:P
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:00
yeah its a common mistake :smile:
purnendutiwari
@purnendutiwari
Jun 06 2016 16:05
:smile:
if you search "whoosh"
Evan Davis
@davisec52
Jun 06 2016 16:15
@jaredabel Take a look at line 16 (line 47 of your pen). I found that including
an increment to the time at the end of your iffe appears to resolve
some of the sequence play-back issue. Try it out and see if this helps
on your end.
function play(array) {
     playerTurn = false;
setTimeout(function () { //new new new new
    // http://stackoverflow.com/questions/30865456/javascript-loop-through-array-with-delay
    // http://stackoverflow.com/users/702469/jashwant
        for (var i = 0; i < array.length; i++) {
          playerTurn = false;
          (function(i) {
            setTimeout(function() {
              console.log(array[i]);
              $('#' + array[i]).fadeTo('fast', 0.53).fadeTo('fast', 1);
              new Audio(audio[colors.indexOf(array[i])]).play();

            }, 600 * (i + 1));
                   })(i);
    }; 
             }, 600); // new time thing
      setTimeout(function() {
        playerTurn = true;
        }, 600 * moves.length);

} // end of play
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:17
Hi, I am unable to disable inputting an empty string in my wikipedia viewer . Please help me solve this problem . Thanks in advance.
Dylan
@dhcodes
Jun 06 2016 16:19
@UtkarshShukla7 can you do an if statement?
if input.value() === "" { change your div }
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:20
@dhcodes I added this
if ($(".searchbox").val() === '') {
            console.log("triggered");
            e.preventDefault();
     }
I thought it should prevent submittion
Dylan
@dhcodes
Jun 06 2016 16:21
remove e.
and see if it works
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:21
ok
@dhcodes no didn't work
$("form").on('submit',function(e) {
          if ($(".searchbox").val() === '') {
            console.log("triggered");
            preventDefault();

          }
Dylan
@dhcodes
Jun 06 2016 16:24
what if you .searchbox.val() to make sure that's getting the right value
i have to go to a meeting. sorry @UtkarshShukla7
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:25
np thanks @dhcodes
CamperBot
@camperbot
Jun 06 2016 16:25
utkarshshukla7 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 958 | @dhcodes |http://www.freecodecamp.com/dhcodes
femiruby
@femiruby
Jun 06 2016 16:30
@UtkarshShukla7 try
$('submit').click(function(e){
          e.preventDefault()
              if($('.searchbox').val() == ""){
                  console.log("triggered")
              }
          })
or
$('form').submit(function(e){
          e.preventDefault()
              if($('.searchbox').val() == ""){
                  console.log("triggered")
              }
          })
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:40
@femiruby didn't worked
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 16:53
@femiruby Thanks for trying . I understood what my mistake was .I was catching the event in my callback .
CamperBot
@camperbot
Jun 06 2016 16:53
utkarshshukla7 sends brownie points to @femiruby :sparkles: :thumbsup: :sparkles:
:cookie: 23 | @femiruby |http://www.freecodecamp.com/femiruby
tommy
@tommygebru
Jun 06 2016 16:54
@jdtdesigns how can i get background image to be blurred?
I tried using the filter:blur() but it didnt work....
http://codepen.io/gebrutommy/pen/LZVwGN?editors=0100
Kevin Holmes
@codersc
Jun 06 2016 17:02
var game = {

  count: 1,
  turn: 0,
  compSeq: [],
  userSeq: [],
  mode: 'normal',
  pads: ['1', '2', '3', '4'],
  sound1: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound2.mp3'),
  sound2: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound1.mp3'),
  sound3: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound3.mp3'),
  sound4: new Audio('https://s3.amazonaws.com/freecodecamp/simonSound4.mp3'),

  genCompSeq: function() {

    for (var i = 0; i < this.count; i++) {

      this.compSeq.push( this.pads[Math.floor(Math.random() * this.pads.length)] ); 
    }    

    this.compSeq.push('1');       // animate function does not seem to play first animation so that's why this line is here
  },

  playSound: function(i) {            

    var sound = this['sound' + i];    

    sound.currentTime=0;

    sound.play();
  },
can someone please help me understand why my sound object is undefined? i can post the codepen also if it helps
Wayne Bunch
@waynebunch
Jun 06 2016 17:29
Hoping someone can lead me in right direction. I want to all objects of createdArr in function create(arg) to my global var final. I'm trying to use .each but unsuccessfully have tried a bunch of things. Any ideas or different approaches I should take would be much appreciated!
$(document).ready(function() {

  input = prompt("Search for:  ");

  function result() {
    $.ajax({
      url: 'https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=' + input + '&callback=?',
      dataType: 'json',
      type: 'GET',
      success: function(data) {
        myData = data;
        create()
      }
    })
  }

  result();

  var createdArr = []; //empty after create() has run
  var final = []; //empty after create() has run

  function create(arg) {
    createdArr = myData.query.search; //has array from AJAX ( result() )
    console.log(createdArr); // This one shows what I would expect, more or less a multidemensional array from myData

    /*$(createdArr).each(function() {
      final.push(createdArr);  // Here's where I'm trying to iterate through `createdArr` and push to final[]
      console.log(final);
    })*/
  }

  console.log(createdArr); //gets nothing
  console.log(final); //gets nothing

});
*I want to *push
here's this if it helps http://codepen.io/waynebunch/pen/QEbaNJ
Manny
@Alloffices
Jun 06 2016 17:39
Short list of HTML, CSS, JS code challenges: https://campers-c.herokuapp.com/users/sign_up
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 17:45
@waynebunch your final variable does gets the objects pushed ,its because it works asynchronously that you see that they are null .
Arun Yadav
@ydarun
Jun 06 2016 17:45

Oh snap :worried: Portfolio Challange ,

1st Problem:
my Scroll spy not working (Frame work Materailize css).

2nd Problem:
How do I host images on codepen to display in my Websites that i make on code pen

Please refer this http://codepen.io/ydarun/full/GqpoKm/

Wayne Bunch
@waynebunch
Jun 06 2016 17:46
@UtkarshShukla7 So I need to do another callback function? Ugh, it took me forever to figure out the ajax callback ;)
Arun Yadav
@ydarun
Jun 06 2016 17:47

Oh snap :worried: Portfolio Challange ,

1st Problem:
my Scroll spy not working (Frame work Materailize css).

2nd Problem:
How do I host images on codepen to display in my Websites that i make on code pen

Please refer this http://codepen.io/ydarun/full/GqpoKm/

UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 17:48
@waynebunch what do you want to do with that global variable
Wayne Bunch
@waynebunch
Jun 06 2016 17:50
I guess I don't really need it, I'm just trying to figure out how it works :) Really all I'm trying to do is iterate through createdArr (which has my wikipedia objects) and create divs in my html to show the results
I suppose I could do that inside function create(arg) ?
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 17:51
@waynebunch yes exactly
Daniel
@DanielMW34
Jun 06 2016 17:54
I have a background-image / bootstrap <div> question that is perplexing me. Would anyone be so kind as to help troubleshoot this? I've found a working solution however, it is not exactly ideal and I do not want to attempt to replicate this solution
Wayne Bunch
@waynebunch
Jun 06 2016 17:56
@UtkarshShukla7 so I've tried that. Would it be something like $(createdArr).each(function(){ }?
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 18:00
@waynebunch shouldn't there be some parameters of the function
for index and value
Wayne Bunch
@waynebunch
Jun 06 2016 18:03
@UtkarshShukla7 haha..yes, I'm just trying to figure that one out. But I see it now. `$(createdArr).each(function(index, value){console.log(index, value } gives me what I need. Now I just need to use those objects. Thank you for your help
CamperBot
@camperbot
Jun 06 2016 18:03
waynebunch sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 582 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
chetanmahore
@chetanmahore
Jun 06 2016 18:03
hello folks
Evan Davis
@davisec52
Jun 06 2016 18:04
@ydarun Hi. regarding image hosting. Dropbox offers a free account. That is what I am using for the time being for most of my image hosting.
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 18:04
@waynebunch yw :+1:
chetanmahore
@chetanmahore
Jun 06 2016 18:05
i use imgur for image hosting :)
chetanmahore
@chetanmahore
Jun 06 2016 18:16
is there any class that can push down col in bootstrap?
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 18:17
@chetanmahore col-offset maybe
Dylan
@dhcodes
Jun 06 2016 18:18
@chetanmahore i'm not sure imgur works with codepen
chetanmahore
@chetanmahore
Jun 06 2016 18:19
i guess same as dropbox works.
@UtkarshShukla7 ok.
@UtkarshShukla7 well it only moves element to right and left
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 18:26
@chetanmahore check out this and I think you can also use margin properties for pushing up and down
chetanmahore
@chetanmahore
Jun 06 2016 18:29
@UtkarshShukla7 great, thank you
CamperBot
@camperbot
Jun 06 2016 18:29
chetanmahore sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 584 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
Jun 06 2016 18:29
@chetanmahore :+1:
Marko Cvetanovic
@mdesignserbia
Jun 06 2016 18:34
hi
i have problem
every div start from top
why???
Ken Haduch
@khaduch
Jun 06 2016 18:37
@marcoego - do you have a codepen (or other) link?
Ken Haduch
@khaduch
Jun 06 2016 18:40
@marcoego - I think it is just that your test is appearing behind your navbar - if you add a padding-top: 50px; to your body (you'd want to change the padding that you have there) then it will push the body content down by whatever size you specify.
Marko Cvetanovic
@mdesignserbia
Jun 06 2016 18:42
This is the first time to have that problem. I try with that.
tnx:)
ndajiya
@ndajiya
Jun 06 2016 18:45
does anyone know of any way to edit html directly in wordpress?
Dylan
@dhcodes
Jun 06 2016 18:50
@ndajiya there's usually a button with <>
or a button that says HTML
but it would just be for editing the HTML within a given post
not of the whole site
ndajiya
@ndajiya
Jun 06 2016 18:52
ok, I'm trying to edit it for a plug in that displays a coming soon page
the 'inspect' feature shows me the html and the class of the item
I was thinking perhaps through the php or something in editor, but I can't translate the class to what I should be looking for
Alex Myers
@qckpckt
Jun 06 2016 19:01
Hi all
Dylan
@dhcodes
Jun 06 2016 19:02
helloooo
ndajiya
@ndajiya
Jun 06 2016 19:02
Hi
Dylan
@dhcodes
Jun 06 2016 19:03
@ndajiya usually the settings of the plugin can be adapted via a direct menu for the plugin
under settings maybe?
Alex Myers
@qckpckt
Jun 06 2016 19:03
Can someone explain to me why resetting the page to its original state breaks my jQuery .click function? basically, I want the search box to return to default after you click submit or hit enter, which it currently does, but every subsequent click then does nothing. http://codepen.io/qckpckt/pen/BzNxEb
Alex Myers
@qckpckt
Jun 06 2016 19:09
oh wait. ignore that. I just realised the above link has some mistakes in it. the reset is resetting the whole page :worried:
ok. Now you can see the problem. When you click on “click”, it loads search, displays the results and resets the search box back to “click”, but then the “click” no longer does anything. http://codepen.io/qckpckt/pen/BzNxEb
Darryl Parks
@punchymango
Jun 06 2016 19:12
I swear, API calls are going to be the death of me
could someone help me understand why every iteration of my API call in this project is returning the same user object?
http://codepen.io/punchymango/pen/VjYPrK?editors=1111
greg
@wearenotgroot
Jun 06 2016 19:16
@punchymango use
"https://api.twitch.tv/kraken/streams/"+strName+"&?callback=?"
Darryl Parks
@punchymango
Jun 06 2016 19:17
@wearenotgroot thanks
CamperBot
@camperbot
Jun 06 2016 19:17
punchymango sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1099 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Darryl Parks
@punchymango
Jun 06 2016 19:18
it's always something embarassingly simple, isn't it? >.<
chetanmahore
@chetanmahore
Jun 06 2016 19:18
hello
Eric
@wiltbit
Jun 06 2016 19:18
Hi, I need some help styling some images.
Darryl Parks
@punchymango
Jun 06 2016 19:20
nope, that didn't do it. I'm still getting 5 copies of
http://codepen.io/punchymango/pen/VjYPrK?editors=1111
arrrgh
greg
@wearenotgroot
Jun 06 2016 19:20
@punchymango missing kraken. edited ^ look up
Darryl Parks
@punchymango
Jun 06 2016 19:21
ah, okay
I see, thanks
Marko Cvetanovic
@mdesignserbia
Jun 06 2016 19:21
codepen sucks for coding
Darryl Parks
@punchymango
Jun 06 2016 19:21
@wearenotgroot thnx
CamperBot
@camperbot
Jun 06 2016 19:21
:warning: punchymango already gave wearenotgroot points
punchymango sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
greg
@wearenotgroot
Jun 06 2016 19:21
@punchymango np
Marko Cvetanovic
@mdesignserbia
Jun 06 2016 19:21
does anybody know anything else
chetanmahore
@chetanmahore
Jun 06 2016 19:22
@marcoego jsbin
Marko Cvetanovic
@mdesignserbia
Jun 06 2016 19:22
tnx
Darryl Parks
@punchymango
Jun 06 2016 19:23
well, it's giving me a different error message, so that's progress
chetanmahore
@chetanmahore
Jun 06 2016 19:23
anyone know how can i make chat box responsive ?
Eric
@wiltbit
Jun 06 2016 19:24
Hello world
CamperBot
@camperbot
Jun 06 2016 19:24

welcome to FreeCodeCamp @wiltbit!

Islam Ibakaev
@dagman
Jun 06 2016 19:26
@dhcodes thx for charing :smile:
CamperBot
@camperbot
Jun 06 2016 19:27
dagman sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 964 | @dhcodes |http://www.freecodecamp.com/dhcodes
greg
@wearenotgroot
Jun 06 2016 19:27
@punchymango channel name and channel display names are different
@punchymango channels are usually all lowercase
Dylan
@dhcodes
Jun 06 2016 19:27
@dagman i'm like 50% done with my portfolio
coming soon...
greg
@wearenotgroot
Jun 06 2016 19:28

@punchymango try this url for api

"https://api.twitch.tv/kraken/streams/"+strName.toLowerCase()

the "&?callback=?" was unnecessary

Islam Ibakaev
@dagman
Jun 06 2016 19:29
@dhcodes waiting to see it :smile:
Dylan
@dhcodes
Jun 06 2016 19:30
won't be worth the wait
Islam Ibakaev
@dagman
Jun 06 2016 19:31
why not
Dylan
@dhcodes
Jun 06 2016 19:31
because idk what to do with it
nothing fancy is coming to mind
it'll be modestly pretty but not fancy
yerevin
@yerevin
Jun 06 2016 19:33
hey, looking for feedback:)
Creative Shin
@CreativeShin
Jun 06 2016 19:35
can someone help me understand Nesting For Loops
?
Andrew Charlebois
@andrewchar
Jun 06 2016 19:35
@dhcodes I think you're selling yourself way to short
Dylan
@dhcodes
Jun 06 2016 19:35
well we'll see
Andrew Charlebois
@andrewchar
Jun 06 2016 19:36
if it's ideas you lack just check out some examples, get some creative juice flowing
Dylan
@dhcodes
Jun 06 2016 19:38
@yerevin a few things.
1) The background takes awhile to load.
2) you can't read "Made by" very easily
3) the sound effect on wrong plays so long that you can't hear the first turn of the new series
Tonye Iyalla
@tiyalla
Jun 06 2016 19:38
Hey all, I'm having trouble viewing my weather app on mozilla firefox. I have keyframes and I used -webkit- and -moz- to accomodate other browsers but that didn't fix it. Can someone take a look at my code and tell me what the issue is http://codepen.io/tiyalla/pen/vGowxG
Andrew Charlebois
@andrewchar
Jun 06 2016 19:39
@dhcodes ok. all solvable. for your background. maybe try compressing your images https://tinypng.com/
Dylan
@dhcodes
Jun 06 2016 19:39
@yerevin regarding #3, add more of a delay in there
Andrew Charlebois
@andrewchar
Jun 06 2016 19:39
oh haha nvm
your saying that to someone else
Dylan
@dhcodes
Jun 06 2016 19:40
word @andrewchar
Andrew Charlebois
@andrewchar
Jun 06 2016 19:40
my bad
Dylan
@dhcodes
Jun 06 2016 19:40
np
all good
@tiyalla keyframes eh? Some sort of CSS ninja over here
@tiyalla it's not loading for me on chrome
says waiting for ip-api.com
Darryl Parks
@punchymango
Jun 06 2016 19:42
gotcha, @wearenotgroot
Andrew Charlebois
@andrewchar
Jun 06 2016 19:43
@tiyalla hmm seems to be working for me
Hnenry
@Hnenry
Jun 06 2016 19:43
Hey guys, I'm about to start portfolio challenge, but i think i haven't learned enough js. (that's including the lessons before the challenge) how can i learn more about it? Many thanks
Dylan
@dhcodes
Jun 06 2016 19:44
@Hnenry you probably won't need much js for the portfolio
Darryl Parks
@punchymango
Jun 06 2016 19:44
think that did it thanks mate @wearenotgroot
CamperBot
@camperbot
Jun 06 2016 19:44
punchymango sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: punchymango already gave wearenotgroot points
Andrew Charlebois
@andrewchar
Jun 06 2016 19:44
@Hnenry what do you want to do with js?
Dylan
@dhcodes
Jun 06 2016 19:44
@Hnenry the only thing that uses js is the bootstrap navbar and you can copy/paste that code from the BS website
Andrew Charlebois
@andrewchar
Jun 06 2016 19:44
This message was deleted
Creative Shin
@CreativeShin
Jun 06 2016 19:44
can anyone help me understand Nesting For Loops ?
Andrew Charlebois
@andrewchar
Jun 06 2016 19:44
lol
Dylan
@dhcodes
Jun 06 2016 19:45
easy does it @andrewchar
it's great for beginners
and regardless of the look, their grid is alright
@Creative-Shin what's your question?
Andrew Charlebois
@andrewchar
Jun 06 2016 19:45
i know i know, i guess i cant really say that. I used bootstrap for my first portfolio as well
Dylan
@dhcodes
Jun 06 2016 19:45
@andrewchar did you move on to flexbox after that?
Hnenry
@Hnenry
Jun 06 2016 19:46
@dhcodes well that's a start, and some things cleared! ty my friend
CamperBot
@camperbot
Jun 06 2016 19:46
hnenry sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 967 | @dhcodes |http://www.freecodecamp.com/dhcodes
Andrew Charlebois
@andrewchar
Jun 06 2016 19:46
for full layout?
Dylan
@dhcodes
Jun 06 2016 19:46
making a decent mobile-friendly navbar isn't easy so bootstrap is a + there
Andrew Charlebois
@andrewchar
Jun 06 2016 19:46
i moved to using a bare bones fluid grid system after bootstrap
Dylan
@dhcodes
Jun 06 2016 19:47
one you made?
Andrew Charlebois
@andrewchar
Jun 06 2016 19:47
once i understood how grids work. i customized one that works well for me
Dylan
@dhcodes
Jun 06 2016 19:47
fancy
i should probably do that
i don't like col-xs blah
Andrew Charlebois
@andrewchar
Jun 06 2016 19:47
i use col-1-of-2 and so on
lately I have been using susy as my grid system though
Le Twitch
@notalkingplz
Jun 06 2016 19:49

http://codepen.io/letwitch/pen/oLXLQx?editors=1011

I can't work out why the text on the right of every green row is able to shrink, but the blue ones aren't able to

Creative Shin
@CreativeShin
Jun 06 2016 19:49

@dhcodes function multiplyAll(arr) {
var product = 1;
// Only change code below this line
for ( var i=0 ; i<multiplyAll.length ; i++){
for(var j = 0 ; j<multiplyAll[i].length ; i++ ){
product*=multiplyAll[i][j];
}
}
// Only change code above this line
return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);

I am doing this
Dylan
@dhcodes
Jun 06 2016 19:51
@Creative-Shin you are calling your function each time; i think you mean to call your arr
pretty much replace multiplyAll everywhere in your code with arr
@Creative-Shin also on the var j loop, the last part should be j++
not i
Andrew Charlebois
@andrewchar
Jun 06 2016 19:52
Creative Shin
@CreativeShin
Jun 06 2016 19:52

@dhcodes
function multiplyAll(arr) {
var product = 1;
// Only change code below this line
for ( var i=0 ; i<multiplyAll.length ; i++){
for(var j = 0 ; j<multiplyAll[i].length ; j++ ){
product*=arr[i][j];
}
}
// Only change code above this line
return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);

still not working
Dylan
@dhcodes
Jun 06 2016 19:53
you didn't replace multiplyAll with arr
in lines 1 and 2
Creative Shin
@CreativeShin
Jun 06 2016 19:53
i see
Dylan
@dhcodes
Jun 06 2016 19:54
@andrewchar pretty nice, but where's the apple logo
Andrew Charlebois
@andrewchar
Jun 06 2016 19:54
apple?!
Dylan
@dhcodes
Jun 06 2016 19:54
it's an apple watch joke
Andrew Charlebois
@andrewchar
Jun 06 2016 19:54
lol
Creative Shin
@CreativeShin
Jun 06 2016 19:54
@dhcodes it worked thank you
CamperBot
@camperbot
Jun 06 2016 19:54
creative-shin sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 969 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Jun 06 2016 19:55
you're welcome
Andrew Charlebois
@andrewchar
Jun 06 2016 19:55
i need to find a way to make it nice
Dylan
@dhcodes
Jun 06 2016 19:55
it's nice, no?
Andrew Charlebois
@andrewchar
Jun 06 2016 19:55
basic styles to see it work
i dont even know why im making this thing lol
Andrew McKeever
@andmckvr13
Jun 06 2016 19:57
function convertToRoman(num) {
  var remArr = [];
  var romDec = [{I: 1}, {IV: 4}, {V: 5},{IX: 9}, {X: 10},{XL: 40},{L: 50},{C: 100},{D: 500},{M: 1000}];

   if (num % 1000 == romDec.indexOf(M)) {
     remArr.push(M);
   }
  return remArr;
}
convertToRoman(3559);
I get an error message that 'M' is not defined. anyone know why that is?
i changed some things how u said:)
Dylan
@dhcodes
Jun 06 2016 19:58
@yerevin magnifique.
Andrew Charlebois
@andrewchar
Jun 06 2016 19:58
@yerevin omg this looks amazing
Dylan
@dhcodes
Jun 06 2016 19:59
@yerevin love your avatar too
Andrew Charlebois
@andrewchar
Jun 06 2016 19:59
@yerevin where are you getting these (images?, textures?)
Tonye Iyalla
@tiyalla
Jun 06 2016 20:03
@dhcodes it's not working on you on chrome? it should. I was making some changes maybe thats why. try again and let me know if it does
Dylan
@dhcodes
Jun 06 2016 20:04
@tiyalla works great now!
looks good, kind of mesmeriziing. It seems like the photos sort of get a tiny bit wider and smaller
is it supposed to do that?
@tiyalla i like your portfolio site too
nice simple clean design
Tonye Iyalla
@tiyalla
Jun 06 2016 20:07
i think it has to do with the background image size
working on it @dhcodes
Daniel
@clevadani
Jun 06 2016 20:07
hey guys, I just finished designing my simon game, Coded the game to light up on click, but dunno how to what to do next. I need tips and pointers
Dylan
@dhcodes
Jun 06 2016 20:09
@clevadani you will need to have the computer randomly pick a color to light up
then store it in an array or object
then wait for the user
and see if they match
if they do, repeat the computer turn and store the next color/button-press in the array
Daniel
@clevadani
Jun 06 2016 20:11
@dhcodes ok. Lemme try it out
Dylan
@dhcodes
Jun 06 2016 20:12
best of luck
@clevadani
Daniel
@clevadani
Jun 06 2016 20:17
@dhcodes how do I make the computer randomly pick colors
Andrew Charlebois
@andrewchar
Jun 06 2016 20:25
you could use math.random
JD Tadlock
@jdtdesigns
Jun 06 2016 20:25
@clevadani arr.push(Math.floor(Math.random() * 3)) // will push a number from 0 to 3
Mrozi
@Mrozi
Jun 06 2016 20:37
Hi, I'm working on the wiki viewer zipline, I'm using a wiki url to get a list of results for a searched term but I get [object Object] returned. It seems to work ok if I just use action=parse in url api and json.parse.text["*']. What am I doing wrong?

Here's the code:var urlWiki="http://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch="+ searchTerm +"&srwhat=text&srprop=timestamp&continue=&callback=?";

$.getJSON(urlWiki,function(data){

var wiki = data.query.search;

$(".well").text(wiki);

killeraditya
@killeraditya
Jun 06 2016 20:48
Hi All
Jake
@Jaketh
Jun 06 2016 20:55
@jdtdesigns will push a whole number 0, 1, or 2. but not including 3
Daniel
@clevadani
Jun 06 2016 20:55
@jdtdesigns any idea on how to loop through the colors because for loops just loops all the colors at once?
Jake
@Jaketh
Jun 06 2016 20:57
well, not all at once, it jsut seems that way because its doing it at computer speeds. but for loops are executing sequentially not simultaneously.
Daniel
@clevadani
Jun 06 2016 20:58
yea that is what I thought. So is there any other method I can use aside for loops?
Jake
@Jaketh
Jun 06 2016 20:59
probably in addition to loops
Daniel
@clevadani
Jun 06 2016 21:00
yea
Jake
@Jaketh
Jun 06 2016 21:01
read the documentation for the timeOut method. or the setInterval method on mdn
matthew3454
@matthew3454
Jun 06 2016 21:01

Does anyone who looks at this Code Pen see anything other than "Show Me the Weather

It's No Longer a Mystery"?

Daniel
@clevadani
Jun 06 2016 21:01
ok
Trevor Hunka
@Grizvok
Jun 06 2016 21:02
hmmm so im working on the quote machine and just random into a snag. i was trying to create an effect similar to the one on the sample quote machine where the div containing the quote will shrink and enlarge depending on how large the quote is, but im just realizing that the .length property of a jquery object isnt how many characters would be in the text but how many elements that selection contains. im assuming i am going to need to use toString to get the actual string to find out how many characters are in it?
JD Tadlock
@jdtdesigns
Jun 06 2016 21:03
@clevadani you're going to have to use some intervals and timeouts to show the color sequence
Trevor Hunka
@Grizvok
Jun 06 2016 21:03
ran in*
JD Tadlock
@jdtdesigns
Jun 06 2016 21:04
@clevadani that random number will be from 0 to 3 but not including 4
Aryan
@aryandua
Jun 06 2016 21:04
Pomodoro Clock done :)
Suggestions/comments on my genius design ( :) ) will be appreeciated
JD Tadlock
@jdtdesigns
Jun 06 2016 21:04
so if you have an array of 4 values, you can then choose one of the 4 using that random number since the index starts at 0 @clevadani
matthew3454
@matthew3454
Jun 06 2016 21:05
Why do I only see the h1 and h2 elements when I look at my code pen. Someone else said that they saw more than that. Is that becase my computer is really slow? Here is my pen. I Thank you for any help your can give to alleviate my mortal suffering.
Trevor Hunka
@Grizvok
Jun 06 2016 21:06
@matthew3454 i see the two headers and 4 dots
matthew3454
@matthew3454
Jun 06 2016 21:06
@Grizvok Same here
JD Tadlock
@jdtdesigns
Jun 06 2016 21:06
@aryandua infinite loop somewhere in your code
Trevor Hunka
@Grizvok
Jun 06 2016 21:06
my pc is pretty fast so
JD Tadlock
@jdtdesigns
Jun 06 2016 21:06
froze my browser ;)
Trevor Hunka
@Grizvok
Jun 06 2016 21:06
haha
Aryan
@aryandua
Jun 06 2016 21:06
@jdtdesigns really?
matthew3454
@matthew3454
Jun 06 2016 21:07
I don't understand what could be wrong the JS analyze doesn't find any erros
JD Tadlock
@jdtdesigns
Jun 06 2016 21:07
yep
Aryan
@aryandua
Jun 06 2016 21:07
where?
Trevor Hunka
@Grizvok
Jun 06 2016 21:07
well for one thing
your js says backgroun-image
without a d
JD Tadlock
@jdtdesigns
Jun 06 2016 21:07
@aryandua didn't look :P
matthew3454
@matthew3454
Jun 06 2016 21:07
@Grizvok I don't understand what could be wrong the JS analyze doesn't find any errors.
Aryan
@aryandua
Jun 06 2016 21:07
@jdtdesigns how do you know then ?
Trevor Hunka
@Grizvok
Jun 06 2016 21:08
that doesnt mean there arent any
again
you misspelled it
background-image
not backgroun
Elizandro
@elizcarr
Jun 06 2016 21:08
I am very new to coding and I am working on my first challenge. My question: I want a dynamic background in codepen. Is there a website that allows me to use backgrounds the same way google fonts lets me use fonts and bootstrap lets me set up css tables?
Trevor Hunka
@Grizvok
Jun 06 2016 21:09
and that was from .2 seconds at looking at it lol
JD Tadlock
@jdtdesigns
Jun 06 2016 21:11
@aryandua because i've had plenty of infinite loops and they freeze the browser lol
Aryan
@aryandua
Jun 06 2016 21:12
@jdtdesigns thats codepen glitching
happens some of the times
others it is perfectly good
:)
TechAgent
@cyberwizkid
Jun 06 2016 21:14
@elizcarr what kind of background do u wish to get?
JD Tadlock
@jdtdesigns
Jun 06 2016 21:15
@aryandua .... if you hit start without setting a session or break time, it runs an infinite
it's not codepen
Aryan
@aryandua
Jun 06 2016 21:18
oh ok
adding an if statement
Elizandro
@elizcarr
Jun 06 2016 21:18
I think I am just looking for a more interesting background than just staight color. I used the wrong word. I don't need a moving background. But as far as I can tell. I can't upload files to codepen, so if I can't link to to a website, I can't use an image file, correct?
Hmm, can I upload a file to google drive or dropbox and link to a background image that way?
Eldar Tinjić
@EldarT90
Jun 06 2016 21:22
@elizcarr upload them to github for direct use
google drive didnt work for me , dropbox only works if you have paid account or account older than 2014 i think
other than that, use github, which is btw the best for these sorts of things
when it comes to background (image file), you can upload it to postimage.org, it will work
Elizandro
@elizcarr
Jun 06 2016 21:26
Thank you, I have a github account. I didn't know I you can upload files to it. I thought it was only a message board or chat rooms. Obviously there is more there for me to explore and learn. Iam sure I can figure it out, thanks.
Eldar Tinjić
@EldarT90
Jun 06 2016 21:28
@elizcarr github is most popular repository on the whole web
when it comes to programmers ofc
and developers
martinsirka
@martinsirka
Jun 06 2016 21:30
Hello there, sorry if interrupt conversation... I am doing "Build a Tribute Page" challenge and after few hours of trying to start I look at example and figure it out that there are some html elements that I were't mentioned in lesson's i passed.
Lyba M
@lybamahenti
Jun 06 2016 21:31
@martinsirka which elements?
martinsirka
@martinsirka
Jun 06 2016 21:32
<div class="jumbotron">
I dont even know what this elemnte dose
Eldar Tinjić
@EldarT90
Jun 06 2016 21:32
@martinsirka it is bootstrap element
@martinsirka i mean the class is bootstrap
what that means is some1 prewritten certain attributes of class jumbotron (and many others such as row, container, etc) and you can use them without thinking too much about responsibility, because they will do the job for you if you use them correctly
Lyba M
@lybamahenti
Jun 06 2016 21:33
@martinsirka http://www.w3schools.com/bootstrap/bootstrap_jumbotron_header.asp you read about it in this link
Eldar Tinjić
@EldarT90
Jun 06 2016 21:33
however in my opinion it is wrong way to start learning, because you wont understand concept if you use shortcuts
i would recommend you trying to do your first few projects without bootstrap, but thats jsut my suggestion
and after you do it without bootstrap, you can try improving it with bootstrap
but as i said, thats just me
martinsirka
@martinsirka
Jun 06 2016 21:34
So I can do that challenge however I know?
Eldar Tinjić
@EldarT90
Jun 06 2016 21:35
@martinsirka well yes, it should look something like example page, i mean it should containt image , little bit of text, possible a quote and it should be responsive, at least partially
but you dont have to use bootstrap at all
so dont try just looking at their code and think : "oh this guy uses this, so i have to use it"
it even says explicity not to look at their code, and its not just because of cheating, it is also confusing when you look at finished code
Coy Sanders
@coymeetsworld
Jun 06 2016 21:36
There's no reason not to use BootStrap @martinsirka
JD Tadlock
@jdtdesigns
Jun 06 2016 21:37
@martinsirka You only need to match the user stories. The style of any project is up to you.
Eldar Tinjić
@EldarT90
Jun 06 2016 21:37
i didnt say not to ever use bootstrap, but i think what he is asking is that he doesnt know what jumbotron ( and prolly other botostrap classes ) does @coymeetsworld so it can be confusing if he tries to mimic this at his very first project
RompePC
@RompePC
Jun 06 2016 21:37
Could anyone lend me a hand? Altough I know how to complete the front-end intermediate algorithm "Arguments optional", I cannot achieve what I've to do when returning the function (as the console just throws me a Type error when trying to call addTogether(2)(3):
Eldar Tinjić
@EldarT90
Jun 06 2016 21:37
but as i said its just my opinion, and based on my experience, which can work differenctly for some1 else
JD Tadlock
@jdtdesigns
Jun 06 2016 21:37
@martinsirka Pushing bootstrap on new coders is a bad practice in my opinion
RompePC
@RompePC
Jun 06 2016 21:37
if (args.length > 1) {
    return args[0] + args[1];
  } else {
    return function(val) {
      return addTogether(args[0], val);
    };
  }
Coy Sanders
@coymeetsworld
Jun 06 2016 21:38
why are people against BootStrap? It simplifies things, I would argue the opposite @jdtdesigns
JD Tadlock
@jdtdesigns
Jun 06 2016 21:38
@coymeetsworld Bootstrap is for one thing and one thing only. Prototyping
if you're making a custom site don't use it
and it's a sign of your skill if you are trying to use it for custom work
Coy Sanders
@coymeetsworld
Jun 06 2016 21:39
people use bootstrap for their own pages, not just proof of concepts
Eldar Tinjić
@EldarT90
Jun 06 2016 21:39
@coymeetsworld keep in mind it is his first project; dont you think he will learn more and understand more if he writes css himself rather than using classes that he prolly doesnt understand ?
@EldarT90 no
JD Tadlock
@jdtdesigns
Jun 06 2016 21:40
@coymeetsworld If you know css, you will understand where i'm coming from. :P
Coy Sanders
@coymeetsworld
Jun 06 2016 21:40
I disagree that its used strictly for prototyping
JD Tadlock
@jdtdesigns
Jun 06 2016 21:40
@coymeetsworld that's what it is
Coy Sanders
@coymeetsworld
Jun 06 2016 21:41
ok
JD Tadlock
@jdtdesigns
Jun 06 2016 21:41
don't use it for custom work, or you're wasting time and also adding to an already bloated framework
Aryan
@aryandua
Jun 06 2016 21:41
@coymeetsworld hi!
Coy Sanders
@coymeetsworld
Jun 06 2016 21:41
hey @aryandua
JD Tadlock
@jdtdesigns
Jun 06 2016 21:41
if you are overwriting any of their design classes, you are already doing something you shouldn't
Aryan
@aryandua
Jun 06 2016 21:42
@jdtdesigns what are design classes and why can they not be over-written?
Eldar Tinjić
@EldarT90
Jun 06 2016 21:42
@coymeetsworld as i said thats just what i think and what was my personal experience; keep in mind when i started and prolyl thing guy as well, i didnt have whole lot experience with programming in general , and based on advices you already gave me + your profile, you do
my best choice was trying to hang on intuitive things at the beginning and build on from there
every line of code was hard, but its easier to understand: left: 50% than it is col-sm and container; it was easier to understand color: blue other than class danger or some other bootstrap class
for me, as a beginner
in web development and in coding in general
martinsirka
@martinsirka
Jun 06 2016 21:44
@EldarT90 Thank you for advice
CamperBot
@camperbot
Jun 06 2016 21:44
martinsirka sends brownie points to @eldart90 :sparkles: :thumbsup: :sparkles:
:cookie: 381 | @eldart90 |http://www.freecodecamp.com/eldart90
Aryan
@aryandua
Jun 06 2016 21:44
@camperbot whats 3++ ?
JD Tadlock
@jdtdesigns
Jun 06 2016 21:44
@aryandua I know you want to defend bs to your death, but please realize that you will eventually understand why seasoned css devs will not use bs for ANYTHING other than a quick prototype for client presentation
Aryan
@aryandua
Jun 06 2016 21:45
@jdtdesigns whos bs?
JD Tadlock
@jdtdesigns
Jun 06 2016 21:45
design classes style things to look a certain way, like buttons ect
Coy Sanders
@coymeetsworld
Jun 06 2016 21:45
he was trying to say that to me, unfortunately I'm no longer interested in the conversation @aryandua
JD Tadlock
@jdtdesigns
Jun 06 2016 21:45
bootstrap....
Coy Sanders
@coymeetsworld
Jun 06 2016 21:45
use it or not its fine for the Portfolio project
can't claim myself to be a CSS expert so I can't argue any further and don't feel compelled to
Aryan
@aryandua
Jun 06 2016 21:46
@jdtdesigns actually i dont like bootstrap that mch
RompePC
@RompePC
Jun 06 2016 21:46
To put things on, what about Foundation?
JD Tadlock
@jdtdesigns
Jun 06 2016 21:46
@coymeetsworld I just want you to wake up to the beautiful world of 2016 css :P
bs is so bloated bro
Aryan
@aryandua
Jun 06 2016 21:47
This message was deleted
Coy Sanders
@coymeetsworld
Jun 06 2016 21:47
I don't necessarily disagree with that @jdtdesigns
JD Tadlock
@jdtdesigns
Jun 06 2016 21:47
@aryandua ?
Aryan
@aryandua
Jun 06 2016 21:47
whoops wrong window :)
JD Tadlock
@jdtdesigns
Jun 06 2016 21:48
I've been coding html/css/js for 5 years
Aryan
@aryandua
Jun 06 2016 21:48
@jdtdesigns nice
JD Tadlock
@jdtdesigns
Jun 06 2016 21:48
i'm just trying to save you wasted time
Aryan
@aryandua
Jun 06 2016 21:48
I started 1.75 months ago '
JD Tadlock
@jdtdesigns
Jun 06 2016 21:48
listen to your elders :P
Aryan
@aryandua
Jun 06 2016 21:48
@jdtdesigns no I was not talking to you
before
when i said - "stop making conclusion..."
JD Tadlock
@jdtdesigns
Jun 06 2016 21:49
no prob
Coy Sanders
@coymeetsworld
Jun 06 2016 21:49
you don't think BS is fine for new developers @jdtdesigns?
you prefer they write the CSS from scratch on Portfolio page? use different framework?
Aryan
@aryandua
Jun 06 2016 21:49
@camperbot what is 3-2?
I dont use Bootstrap too much
JD Tadlock
@jdtdesigns
Jun 06 2016 21:50
@coymeetsworld In my opinion, you should dive into css and get to know the basics and some advanced techniques before using BS
Aryan
@aryandua
Jun 06 2016 21:50
I make a bunch of my own classes and ids
JD Tadlock
@jdtdesigns
Jun 06 2016 21:50
@coymeetsworld what usually happens is people realize they don't need it at all
I teach on a skype group and every single BS user has left it behind ;)
Coy Sanders
@coymeetsworld
Jun 06 2016 21:51
I guess you could go either way, but using things like Bootstrap and JQuery can help out w/ development w/o knowing how the bare JS or CSS works. Not to mention it makes it more compatable with other browsers/devices
Aryan
@aryandua
Jun 06 2016 21:51
:) they shouldn't leave any kind of knowledge behind :)
JD Tadlock
@jdtdesigns
Jun 06 2016 21:52
I have absolutely nothing against jquery
Coy Sanders
@coymeetsworld
Jun 06 2016 21:52
eventually if you want to be a better web designer yeah you should learn CSS and more JS than what those frameworks provide, but as a beginner idk
Eldar Tinjić
@EldarT90
Jun 06 2016 21:52
there is place for BS, if you wanna work on quick to medium size projects, if you dont understand CSS fully, but its hard to people to see what they wanna achieve and acomplish in future
i loved bootstrap
Coy Sanders
@coymeetsworld
Jun 06 2016 21:52
neither do I but should someone learn all core concepts of JS before jumping to jQuery?
Aryan
@aryandua
Jun 06 2016 21:52
Jquery is very usefull
JD Tadlock
@jdtdesigns
Jun 06 2016 21:52
@coymeetsworld BS codes things that are total legacy practices
the modern css stuff blows BS out of the water
and lets you do the same stuff in 95% less code
sometimes 99%
Eldar Tinjić
@EldarT90
Jun 06 2016 21:53
@coymeetsworld i think there is difference between css and JS , and that was what i was talking about before - css is intuitive
color, background-color, font-size, etc
its all nice and understandable for some1 who enver coded in his life
things in JS ... not so intuitive for beginner
Coy Sanders
@coymeetsworld
Jun 06 2016 21:54
do you use any CSS frameworks @jdtdesigns? Or do you just code everything from scratch?
Aryan
@aryandua
Jun 06 2016 21:54
This message was deleted
JD Tadlock
@jdtdesigns
Jun 06 2016 21:54
@coymeetsworld Case in point http://jsbin.com/wepapi/edit?html,css,output
i code css from scratch
i use jquery from time to time
Aryan
@aryandua
Jun 06 2016 21:54
@coymeetsworld why does my page not fit to the size of any page? >>
Coy Sanders
@coymeetsworld
Jun 06 2016 21:55
I see @jdtdesigns
NewtonXu
@NewtonXu
Jun 06 2016 21:55
hey guys my tictactoe board is off alignment and its bugging me, could someone take a look? thanks! also try it out and let me know what you think!
http://codepen.io/NewtonXu/full/GqpZjP/
Coy Sanders
@coymeetsworld
Jun 06 2016 21:56
my browser crashed when clicking on start @aryandua :/
Aryan
@aryandua
Jun 06 2016 21:56
@coymeetsworld really?
JD Tadlock
@jdtdesigns
Jun 06 2016 21:57
@aryandua lol, told ya
Aryan
@aryandua
Jun 06 2016 21:57
oh wait now it shouldnt
whooops
Coy Sanders
@coymeetsworld
Jun 06 2016 21:58
now its not
not sure what i did
@coymeetsworld why does my page not adapt to the screen size and become smaller?
Coy Sanders
@coymeetsworld
Jun 06 2016 21:58
probably with your alignments are probably because you're hardcoding alot of values inside
Aryan
@aryandua
Jun 06 2016 21:59
@coymeetsworld so what should i do ?
This message was deleted
This message was deleted
Coy Sanders
@coymeetsworld
Jun 06 2016 22:00
one thing you can look at is using different units instead of px
em can be used as a scalable unit
Alex Myers
@qckpckt
Jun 06 2016 22:01
I’m working on the wikipedia project right now. I’m wondering how people managed to get URL links to the pages generated by the JSON request? It looks like you have to add on something like prop=info&inprop=url into the JSON call, but i tested it with a seperate JSON call and got rejected by the page due to it being https (I think). Same thing happens when I change to an https:// codepen project. So how else can you get the
Aryan
@aryandua
Jun 06 2016 22:01
@coymeetsworld whats em
did you make a selling error
?
Alex Myers
@qckpckt
Jun 06 2016 22:01
...URLs to the summary of the generated pages?
Coy Sanders
@coymeetsworld
Jun 06 2016 22:02
nope
do some research on it
Aryan
@aryandua
Jun 06 2016 22:03
@coymeetsworld ok thx.. again :)
CamperBot
@camperbot
Jun 06 2016 22:03
aryandua sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1072 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jun 06 2016 22:03
np
RompePC
@RompePC
Jun 06 2016 22:05
Could anyone lend me a hand in "Arguments Optional" (front-end intermediate algorithm? Altough I know what to do, I fail when returning the function:
if (args.length > 1) {
    return args[0] + args[1];
  } else {
    return function(val) {
      return addTogether(args[0], val);
    };
  }
TypoError: addTogether(2)(3) isn't a function...
Coy Sanders
@coymeetsworld
Jun 06 2016 22:08
whats your entire code @RompePC
RompePC
@RompePC
Jun 06 2016 22:09
@coymeetsworld

function addTogether() {
  var args = Array.prototype.slice.call(arguments);

  if (typeof args[0] !== "number" || typeof args[1] !== "number") {
    return undefined;
  }

  if (args.length > 1) {
    return args[0] + args[1];
  } else {
    return function(val) {
      return addTogether(args[0], val);
    };
  }
}

addTogether(2)(3);
Creative Shin
@CreativeShin
Jun 06 2016 22:10
function lookUpProfile(firstName, prop){
// Only change code below this line
for (var i=0 ; i< contacts.length ; i++){

   if(contacts[i].hasOwnProperty(prop) === true && contacts[i][firstName] === firstName) {
        return contacts[i][prop];
   }

  if(contacts[i].hasOwnProperty(prop) === false ){
    return "No such property";
  }
  if(contacts[i][firstName] !== firstName){
    return "No such contact";
  }

  }
// Only change code above this line
}
can anyone tell what is the issue here... and how to fix this without nested if's?
profile lookup in JavaScript
anyone?
Coy Sanders
@coymeetsworld
Jun 06 2016 22:13
@RompePC think your problem is with your first if statement
you need to determine whether or not theres even 2 arguments first
when you call addTogether(2)(3), there's only one argument for addTogether, thats 2
RompePC
@RompePC
Jun 06 2016 22:15
@coymeetsworld But the second in that case would be the arg for the clossure
Coy Sanders
@coymeetsworld
Jun 06 2016 22:16
don't believe so, no
your AddTogether function still only has one argument passed to it, not 2
RompePC
@RompePC
Jun 06 2016 22:17

@coymeetsworld

For example, addTogether(2, 3) should return 5, and addTogether(2) should return a function.

Calling this returned function with a single argument will then return the sum:

var sumTwoAnd = addTogether(2);

sumTwoAnd(3) returns 5.

Then I don't understand this piece of instructions

Coy Sanders
@coymeetsworld
Jun 06 2016 22:18
before you look at that you need to look at your first statement:
if (typeof args[0] !== "number" || typeof args[1] !== "number") {
    return undefined;
  }
this function doesn't always take in 2 parameters, forget about closures or anything else more advanced
you need to account for when the function takes in 1 argument, or two first
RompePC
@RompePC
Jun 06 2016 22:19
@coymeetsworld Ok, refactoring
Coy Sanders
@coymeetsworld
Jun 06 2016 22:19
if its 2 and both are numbers you add them together
if either or both are not you return undefined
if you only have one argument you return a function
NewtonXu
@NewtonXu
Jun 06 2016 22:19
@jdtdesigns sorry but isnt it a really small error
Coy Sanders
@coymeetsworld
Jun 06 2016 22:19
assuming that argument is a number itself too
try to get tests 1 and 4 working first @RompePC, then 3, then 2 and 5
NewtonXu
@NewtonXu
Jun 06 2016 22:20
@jdtdesigns i feel like its something in the html but i cant see it
JD Tadlock
@jdtdesigns
Jun 06 2016 22:20
@NewtonXu correct, which is why i'm giving you new code ;)
Coy Sanders
@coymeetsworld
Jun 06 2016 22:20
probably easy way to go
NewtonXu
@NewtonXu
Jun 06 2016 22:20
@jdtdesigns lol
JD Tadlock
@jdtdesigns
Jun 06 2016 22:20
tons of errors in your html, css @NewtonXu ;)
can't go into all them
RompePC
@RompePC
Jun 06 2016 22:21
@coymeetsworld The only tests failing where the 2 and 5, and now yes, the clossure works, thanks
CamperBot
@camperbot
Jun 06 2016 22:21
rompepc sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1073 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
NewtonXu
@NewtonXu
Jun 06 2016 22:22
@jdtdesigns uh what did i do wrong?
Coy Sanders
@coymeetsworld
Jun 06 2016 22:22
ok np @RompePC
this is going a little further than what I know about closures
but I didn't call addTogether again in my anonymous function I'm returning
although I'm not 100% sure thats not correct
Aryan
@aryandua
Jun 06 2016 22:24
someone in coding jobs is using innapporiate language
someone tell him to stop
I dont want to go back and look at those woeds
Coy Sanders
@coymeetsworld
Jun 06 2016 22:28
sorry I'm not an admin @aryandua, i see you wrote something if he keeps doing it you can let one know I think
they could ban him if he keeps offending
Aryan
@aryandua
Jun 06 2016 22:32
@coymeetsworld ok
Coy Sanders
@coymeetsworld
Jun 06 2016 22:33
he seems to be a bit off though :) first he says hes interested in front end and design, and not 15 mins go by and he says something unflattering about designing lol
Aryan
@aryandua
Jun 06 2016 22:38
@coymeetsworld yes:)
JD Tadlock
@jdtdesigns
Jun 06 2016 22:40
@aryandua I really am going to stop clicking on your clock lol
you have some js to fix for sure
Aryan
@aryandua
Jun 06 2016 22:41
@jdtdesigns What happened this time?
JD Tadlock
@jdtdesigns
Jun 06 2016 22:42
The timer showed some negative values at the start of the countdown, and then after hitting reset, the break and session settings went to 0, ... then the timer started on it's on from 60 then when i hit the button to pause it, it froze again
Aryan
@aryandua
Jun 06 2016 22:46
@jdtdesigns it starts of weird
sait for 2 seconds
and its fine
JD Tadlock
@jdtdesigns
Jun 06 2016 22:46
@aryandua you need to run tests on it
click on it in different ways
and after you refresh your browser, figure out what's crashing
Aryan
@aryandua
Jun 06 2016 22:47
@jdtdesigns yeh
Luis Carlos Garcia Barajas
@Luiko
Jun 06 2016 22:49
my weather app is not working in chrome and opera :worried:
Aryan
@aryandua
Jun 06 2016 22:49
@Luiko did you use geolocate
This message was deleted
JD Tadlock
@jdtdesigns
Jun 06 2016 22:53
@Luiko geolocation is deprecated in chrome using http. You'll need to run the app on https or use another api for location such as http://ip-api.com/
Aryan
@aryandua
Jun 06 2016 22:53
@jdtdesigns is right :) as always ;P
Luis Carlos Garcia Barajas
@Luiko
Jun 06 2016 22:54
I think so.
Aryan
@aryandua
Jun 06 2016 22:54
@Luiko dont use geolocate for chrome
I find ip-api a little scary
it know everything about me
but its safe
Luis Carlos Garcia Barajas
@Luiko
Jun 06 2016 22:56
@aryandua @jdtdesigns yeah thanks I was using it.
CamperBot
@camperbot
Jun 06 2016 22:56
luiko sends brownie points to @aryandua and @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @aryandua |http://www.freecodecamp.com/aryandua
:cookie: 444 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Aryan
@aryandua
Jun 06 2016 22:57
@Luiko no problem