These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Oct 2016
Joanne Yeung
@jttyeung
Oct 22 2016 00:02 UTC
@TylerMoeller oh, wow. I think you just saved me a ton of hours of head banging against the wall. Thank you!
CamperBot
@camperbot
Oct 22 2016 00:02 UTC
jttyeung sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: jttyeung already gave tylermoeller points
kenobijr
@kenobijr
Oct 22 2016 00:02 UTC
Hey there.
Got a confusing problem with my Tic Tac Toe project:
I want to code a dumb AI and smart one, to start I coded a simple function which does a random move on AI´s turn. It works, but only on the AI´s first move. On the second turn , the AI does 2 moves. On the third turn, the AI does 3 moves and so on....
I just can´t find the error, would be great if someone could help me!
Thank you in advance!
Here´s my pen:
http://codepen.io/kenobijr/pen/ozJorK
Ken Haduch
@khaduch
Oct 22 2016 00:26 UTC
@kenobijr - I'm wondering if you might be adding click handlers in a way that multiple handlers get added? I'm trying to look at your code, not figuring it out just yet...
Ken Haduch
@khaduch
Oct 22 2016 00:34 UTC
@kenobijr - I think that's it - every time you invoke init_hi_turn(), you are adding another click handler for the .class elements. If you just condition it so that you add the click handler only one time, it seems to clear up that problem. To test it, I just added a flag variable that is global, and initialize it to false. Just before setting the click handler, test that flag, if it is false, add the handler, then set that variable to true. Problem solved!

@kenobijr - the snippets of code that I added:

   var clickAdded = false;  // the global variable

and this around the click handler code:

        //get HI choice
      if ( ! clickAdded ) {
        $(".cell").click(function(){

            if (game.turn === "HI" && game.status === "running"){
                    var position = Number($(this).attr("data-pos"));

                    $(".cell").removeClass("click_now");

                    // add x or o on ui and board
                    if (game.ai_is_x){
                        $(this).text("O");
                        game.board[position] = "O";
                        advance_turn();
                    } else {
                        $(this).text("X");
                        game.board[position] = "X";
                        advance_turn();
                    }
               }
        });
       clickAdded = true;
      }
emamadordev
@emamadordev
Oct 22 2016 01:12 UTC

i wrote this to test if javascript was working but it doesn't work. Do any of you guys see something wrong with this code?

var df=1;

function checker() {
if (df==1) {

       return true;
        } else {
        return false;

       }

}
checker();

It's not picking up that df is a variable.

pablo
@pbgnz
Oct 22 2016 01:15 UTC
var df=1;
function checker(df){ return df == 1; }
your problem has to do with local vs global variables
Ken Haduch
@khaduch
Oct 22 2016 01:17 UTC
@emamador - well, it seems that your variable df should be a variable that is in scope for your function? Why do you think, @pbgnz that it shouldn't? I haven't tried this yet in a browser...
@emamador - running this in the firebug console in firefox, it looks like it works? I can change the value of the global variable, and it seems to respond correctly?
pablo
@pbgnz
Oct 22 2016 01:19 UTC
Screen Shot 2016-10-21 at 9.19.02 PM.png
it works my bad
emamadordev
@emamadordev
Oct 22 2016 01:20 UTC
ok yeah i called df within the function and now it recognizes that it's a variable. thanks..but in onsole shouldn't it return true?
pablo
@pbgnz
Oct 22 2016 01:20 UTC
it did
emamadordev
@emamadordev
Oct 22 2016 01:21 UTC
wait the way that i had it fat first was right? right?
Ken Haduch
@khaduch
Oct 22 2016 01:21 UTC
@emamador - I also saw it return true. Which console are you looking at?
emamadordev
@emamadordev
Oct 22 2016 01:21 UTC
the console on chrome
i guess something is wrong with my browser
im on codepen.io
pablo
@pbgnz
Oct 22 2016 01:22 UTC
try writting your function in one line
Ken Haduch
@khaduch
Oct 22 2016 01:23 UTC
@emamador - within the Chrome devtools? Or the console that is available under CodePen's UI? That one doesn't always show everything...
pablo
@pbgnz
Oct 22 2016 01:23 UTC
function checker(){ if (df ==1) return true; return false;
emamadordev
@emamadordev
Oct 22 2016 01:24 UTC
ok it works thanks guys.
pablo
@pbgnz
Oct 22 2016 01:25 UTC
:+1:
emamadordev
@emamadordev
Oct 22 2016 01:26 UTC
if i put return true; does that show up in console? or do i have to put return console.log (true) ?
Ken Haduch
@khaduch
Oct 22 2016 01:27 UTC
@emamador - if you look in the devtools, and actually run your script through the devtools console, you'll see it report "true" or "false", but in CodePen, I found that I had to put a console.log statement there.
Amit Patel
@AmitP88
Oct 22 2016 01:28 UTC
hey guys, I'm designing a website for a restaurant starting with the mobile view. I'm wondering if it would be a good idea to just have images of each dish for the menu section, and just have each image stack on top of each other with the name of the dish over the image, then having the descriptions appear as modals when the user taps on the images. btw, the menu has 12 main dishes, 4 desserts, and 4 unique drinks
emamadordev
@emamadordev
Oct 22 2016 01:28 UTC
@khaduch wow i didn't even know you can run the scripts directly into the chrome console. yeah i find that you have to pt console.log anyways thanks
CamperBot
@camperbot
Oct 22 2016 01:28 UTC
emamador sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1812 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 22 2016 01:30 UTC
@emamador - I like the firefox / firebug console for that - it opens a separate pane that you can put your code into and edit, and even "pretty print" it to format it. That's useful sometimes. But console.log is definitely more reliable, and looking at the developer console is the best way to make sure you see it.
Marina
@joyinthenow
Oct 22 2016 01:35 UTC
I've tried using the "row" and "col-x-*" code to align my text and photo but it doesnt line up and I can't see why. Help?
emamadordev
@emamadordev
Oct 22 2016 01:37 UTC
@joyinthenow can you share your code with us?
@khaduch cool. i'll make sure to checkout firefox's console later.
Ken Haduch
@khaduch
Oct 22 2016 01:57 UTC
@emamador , there is a devtools built into Firefox, and FireBug is a separate plugin. FireBug is what i usually use on Firefox. Just to clarify...
This message was deleted
JD Tadlock
@jdtdesigns
Oct 22 2016 02:02 UTC
@mhdavis did you get it figured out?
Ken Haduch
@khaduch
Oct 22 2016 02:04 UTC
@joyinthenow - can you post your URL for your project?
JD Tadlock
@jdtdesigns
Oct 22 2016 02:09 UTC
@mhdavis
function main() {

  // this won't work because these variables will only be available inside this function
  // move them outside all your functions at the top of your code
  var author;
  var quote;

// you can still set them inside this like you're doing
  $.getJSON('http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&jsonp=?&lang=en', function (data) {
    author = data.quoteAuthor ? data.quoteAuthor : 'Unknown';
    quote = data.quoteText;
  });

 // this won't work because like my animation shows you have to either set the html inside the getJSON or call a function that sets the
 // the html from inside the getJSON
 // You can use .done() or .on('done', setHTML) at the end of the getJSON as well
  $('#quote').html(
    '<p>"' + quote + '"</p>' +
    '<span>- ' + author + '</span>'
  )
}
c0d0er
@c0d0er
Oct 22 2016 02:10 UTC
@jdtdesigns thanks
CamperBot
@camperbot
Oct 22 2016 02:10 UTC
c0d0er sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 714 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Oct 22 2016 02:15 UTC
@mhdavis Here's the animation again http://jsbin.com/yevovuv/6/edit?output
Marina
@joyinthenow
Oct 22 2016 03:03 UTC
@emamador @khaduch
Sorry I was off trying to figure things out but I will totally take the help!
https://codepen.io/joyinthenow/pen/ozPgrr
Ken Haduch
@khaduch
Oct 22 2016 03:07 UTC
@joyinthenow @joyinthenow - so what's your question on that again? (OK, I started looking at the code)
@joyinthenow - bootstrap column classes are col-sm-8, col-sm-4, etc? xs, sm, md, lg if I remember them all correctly...
@joyinthenow - also, if you are doing multiple classes, like you have here: <h1 class="text-center" class="col-s-8" >, it should be written as <h1 class="text-center col-sm-8" >, with a correction to the class for the column. Each class in the same attribute, space-separated.
Also, I think that you should have your class="container" div as the parent for all of your row and col divs. It probably won't work the other way around.
Ken Haduch
@khaduch
Oct 22 2016 03:15 UTC
@joyinthenow - also, on CodePen, all of your CSS classes should be in the "CSS" panel - remove that <style> section from your HTML panel. It might just mess with your page because of the way CodePen loads things...
Ken Haduch
@khaduch
Oct 22 2016 03:21 UTC
@joyinthenow - also, it might be better to make all of your column elements in <div> elements, with the column classes added to those, and then put your other elements, like the <h1> nested inside of those divs. It might avoid some other problems, such as conflicting style settings on the <h1> compared to the column class settings? (I'm not sure that there are, but that's a "for instance"...)
khaduch @khaduch - signing off for the night...
Ciel
@xfffrank
Oct 22 2016 03:33 UTC
Can I get to learn the Back End part before finishing my FrontEnd learning?
Because I think there are too many algorithm challenges. A little bit tedious...
Timchen7
@timchen777
Oct 22 2016 03:39 UTC
Thanks!!
Ken Haduch
@khaduch
Oct 22 2016 03:44 UTC
@skfwnelf - I think that you can mix things up, just so you get all of the requirements completed by the end of the program? Sometimes it's good to switch to other things for a while...
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 03:49 UTC
Hello! Good Morning! :)
Nic
@ElSantoNic
Oct 22 2016 04:03 UTC
Hi all. i am working on my tribute page. I have two images on the same row using col-sm-6 grid. I am trying to put captions underneath each image. I've been adding these tags immediately after '<img>', <div class="caption text-center">. But does not seem to work. It looks okay in mobile but on desktop the caption slides over on top of the 2nd image . Any suggestions?
Eric
@eextreme
Oct 22 2016 04:11 UTC
hi I'm trying to make a Wikipedia View and for some reason my getJSON request isn't getting through all the time what am i doing wrong?
currently i have this
req.done(function(data){....}
Arvind Gilkinja
@ArvindGilkinja
Oct 22 2016 05:07 UTC
Whether city name displaying properly in this?
http://codepen.io/ArvindGilkinja/pen/JRkrgz
JD Tadlock
@jdtdesigns
Oct 22 2016 05:09 UTC
@eextreme post the codepen?
@ArvindGilkinja yes
Nic
@ElSantoNic
Oct 22 2016 05:19 UTC
never mind, i figured it out.
Jean Baptiste Kwizera
@jbkwizera
Oct 22 2016 05:45 UTC
Hello World
CamperBot
@camperbot
Oct 22 2016 05:45 UTC

welcome to FreeCodeCamp @jbkwizera!

Jean Baptiste Kwizera
@jbkwizera
Oct 22 2016 05:45 UTC
I know this my sound trivial, but I just want to know: How do you write a code (like here) so that it comes looking like a real code...with black background and all that?
F22rapt
@F22rapt
Oct 22 2016 05:49 UTC
ahoy!
would anyone look at my..uhm tribute project and give me some feedback? I'm not 100% sure what I'm doing as I've defiently never done something like this before
Jean Baptiste Kwizera
@jbkwizera
Oct 22 2016 05:54 UTC
Never mind guys, I learned it
@F22rapt I think it looks okay. Everything is technically okay. Unless you would want to make it a little fancy...like picture size, font-style...
F22rapt
@F22rapt
Oct 22 2016 06:06 UTC
I was considering that. just don't think i want to sink that much into it
oh wiat if orgot a couple thign s:o
F22rapt
@F22rapt
Oct 22 2016 06:14 UTC
how do i make anchored links open in different tabs?
got it.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 06:20 UTC
:)
Jean Baptiste Kwizera
@jbkwizera
Oct 22 2016 06:44 UTC
Links that open in a new tab:
<a href="url" target="_blank"> ....</a>
Sorin Ruse
@sorinr
Oct 22 2016 07:10 UTC
@F22rapt i would give to the div class text-left some padding like padding: 20px; or so
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:14 UTC
Guys, what is wrong with this media query? Just testing some stuffs.. I want to change the color of div with class brand-logo on screen sizes below 400px.
@media screen and (max-width:400px) {
    .brand-logo {
        color: red;
    }
}
Sorin Ruse
@sorinr
Oct 22 2016 07:16 UTC
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:21 UTC
Thanks @sorinr I think i figured it out.. the brand-logo had an "id" as well.. so i applied the query to ID and it worked :P
Thank you @sorinr
MarcS
@marcs12
Oct 22 2016 07:21 UTC
hey guys, I'm currently working on the building a portfolio challenge. I started mine from absolutely nothing but it is asking for navigation buttons which I haven't learned on how to make yet.. how do I complete this without looking at someone else's code.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:21 UTC
Where's the camperbot? :P
don't look at the code @marcs12 but read-search-ask :)
F22rapt
@F22rapt
Oct 22 2016 07:22 UTC
google is a hell of a drug :D
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:22 UTC
for navigation, as a beginner you only need to use <ul> and a couple of <li> tags
F22rapt
@F22rapt
Oct 22 2016 07:22 UTC
I'm on that one myself nitin..i litterly just don't know what i should do for layout..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:23 UTC
you can also use <a> for navigation :)
F22rapt
@F22rapt
Oct 22 2016 07:23 UTC
opps..wrong name. but whatever
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:23 UTC
so where you'd stuck at?
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 22 2016 07:23 UTC
Anyone has suggestions for what else I could do?
I am messing around with animations and stuff, but my inspiraton is ceasing ^^
https://codepen.io/A_A/full/XjyqaJ
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:25 UTC
it only rotates @Otto-AA ? Here's your motivation - https://material.uplabs.com/posts/google-design-icon-animation
Sorin Ruse
@sorinr
Oct 22 2016 07:27 UTC
@NitinNair89 its free today. took a day off :)
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:27 UTC
LOL
F22rapt
@F22rapt
Oct 22 2016 07:37 UTC
hey so now that I'm on the profolio project I'm a little stuck, Since I have nothing to add to it, I can't invinsion a layout
Sorin Ruse
@sorinr
Oct 22 2016 07:42 UTC
@F22rapt but you can add info about you, portfolio with just some placeholders where you can add later more info, a contact section, whatever you want on that page
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 22 2016 07:43 UTC
@NitinNair89 No, you have to click on it ^_^
@NitinNair89 Guess I should make that more obvious
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:44 UTC
Good one @Otto-AA Sorry I did not interact with your code at first! I liked the animations.. Good job! :D
F22rapt
@F22rapt
Oct 22 2016 07:46 UTC
headers are supposed to be a large font by default right? or am i mistaken..because mines is tiny
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:47 UTC
@F22rapt probably the HTML or CSS is messing the size?
F22rapt
@F22rapt
Oct 22 2016 07:47 UTC
i only have the one line so far lol. its preplexing me
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 22 2016 07:48 UTC
@F22rapt well, compared with the paragraph it should be big
/bigger
@NitinNair89 Thanks for the animation-link :)
CamperBot
@camperbot
Oct 22 2016 07:49 UTC
otto-aa sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 289 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:49 UTC
@F22rapt code pls?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:52 UTC
I hope you are using between <h1> and <h6> inclusive.. anything else will be treated as a normal para
the <div> didn't close proper before <h1>
<div class="text-center"
should be <div class="text-center">
notice the ">" after quotation
F22rapt
@F22rapt
Oct 22 2016 07:54 UTC
facepalm i make that mistake all the time. i shuda knwon
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 07:54 UTC
:hamster:
F22rapt
@F22rapt
Oct 22 2016 07:59 UTC
right..now..what else does one need.
is there a good image you might recoomend to use as a palceholder?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:03 UTC
try lorem pixel website
Aditi Roy
@AlluringAditi
Oct 22 2016 08:05 UTC
Hey Guys!!
I'm designing my portfolio and I don't understand how can I insert my own image into the code!!
I tried pulling from dropbox but the image doesn't load!!
Please help!!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:06 UTC

A quick question - How do i change the font style of a <span> within the .brand-logo having the class as "desc"?

.brand-logo {
    font-family: 'Rochester', cursive;
}
.desc {
    font-family: monospace;
    font-size: 15px;
}

The above code does not work. Here's the HTML:

 <a href="#" class="brand-logo center" id="fLogo">
                  Brand Logo goes here&nbsp;
                   <span class="hide-on-small-only" class="desc">Small description goes here</span>
            </a>
@DevD01 Check the image URL. Code please?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:08 UTC
give proper image URL
@NitinNair89 So I want to insert this into my code!! I tried to insert it as well but the image doesn't load!!
Ian Smit
@iansmit7
Oct 22 2016 08:15 UTC
hi guys.. question. why are my thumbnails, images, and blocks overlapping my fixed nabber?
bar*
suggestions would be much appreciated :pray:
NAV Bar problem
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:19 UTC
@iansmit7 try:
.nav-pills{
  z-index:1;
}
Ian Smit
@iansmit7
Oct 22 2016 08:20 UTC
@NitinNair89 thanks! so that z-index meansit overlaps everything?
CamperBot
@camperbot
Oct 22 2016 08:20 UTC
iansmit7 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
F22rapt
@F22rapt
Oct 22 2016 08:21 UTC
@iansmit7 while ya wait for that to be figured out..tell me, the top bar with the buttons, how did you create those? I feel like i missed a lesson or two there. Is it a colored well or..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:21 UTC
@iansmit7 Yes, z-index means the 3rd axis (X and Y are the first two). It determines how far or near the objects are.
Ian Smit
@iansmit7
Oct 22 2016 08:22 UTC
this the css

.nav-pills{
z-index:1;

font-size: 20px;
background-color: saddlebrown;
margin-bottom: 9%;
color: white;

Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:22 UTC
A positive value = the element is near (overlap other elements.
A negative value = the element is far (overlapped by other elements)
Ian Smit
@iansmit7
Oct 22 2016 08:22 UTC
@F22rapt

@F22rapt this is the css.nav-pills{
z-index:1;

font-size: 20px;
background-color: saddlebrown;
margin-bottom: 9%;
color: white;

MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:23 UTC
Hey guys
F22rapt
@F22rapt
Oct 22 2016 08:24 UTC
did a miss a lesson on that..
Aditi Roy
@AlluringAditi
Oct 22 2016 08:24 UTC
@NitinNair89 Thanks!! I got it!! The solution was to add raw=1 at the end of the link, anyone having the same trouble can do this now!! :)
CamperBot
@camperbot
Oct 22 2016 08:24 UTC
devd01 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:24 UTC
Hi there @MangoKing-IV :)
Ian Smit
@iansmit7
Oct 22 2016 08:24 UTC

@F22rapt this is html<div class="pageOne text-center">
<ul class="nav nav-pills">
<li><a href="#">Ian Smit</a></li>

<li class="pull-right"><a href="#">Contact</a></li>

 <li class="pull-right"><a href="#">Portfolio</a></li>

<li class="pull-right"><a href="#">About Me</a></li>

</ul>

Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:24 UTC
Good job @DevD01 :+1:
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:24 UTC
Hey @NitinNair89 seeing you again !
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:24 UTC
:)
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:25 UTC
I finally got some practice done with navbars and made this
But how can i remove the lines under the list items
Also I was trying to make the navbar in fixed position
Ian Smit
@iansmit7
Oct 22 2016 08:26 UTC
@F22rapt oh i just looked that up on google. cause im currently on my portfolio page had no idea how to put a nav bar. i think it was on w3schools
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:26 UTC
but once i do that it shifts to the left
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:26 UTC
Good start @MangoKing-IV :) Try this:
text-decoration: none;
to your links
F22rapt
@F22rapt
Oct 22 2016 08:26 UTC
ok thanks.
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:28 UTC
I tried but it doesnt seem to work
I used it for both <a> and <li>
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:29 UTC
it's for <a>
maybe you put the code in wrong place

#navbar a{
  font-size:40px;
  text-decoration: none;
}
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:30 UTC
OH WOW simple mistake, i wrote decoration"s"
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:30 UTC
LOL
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:30 UTC
part of programming :)
Also, do you know how I would be able to have the navbar wrapper's position fixed in the same position
as i scroll down
Ciel
@xfffrank
Oct 22 2016 08:32 UTC
@khaduch thank you for your advice
CamperBot
@camperbot
Oct 22 2016 08:32 UTC
skfwnelf sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1816 | @khaduch |http://www.freecodecamp.com/khaduch
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 22 2016 08:32 UTC
@MangoKing-IV position: fixed?
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:32 UTC
i got this to work before by make position:fixed; in css
yes that worked, but it causes the wrapper to be shifted to the left
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 22 2016 08:33 UTC
@MangoKing-IV Then add left: 12.5%;
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:33 UTC
Which causes the original settings of margin-left and margin-right : auto; to be changed
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:34 UTC
why did you give margins?
#navbar-wrapper{
  width:100%;
  height:100px;
  background-color:white;
  padding-bottom:20px;
  opacity:0.7;
  position:fixed;
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:34 UTC
it worked A_A :)
Ill also try your way nitin
I gave it margins to the wrapper so it can be fit inside the outer navbar
which i made the photo to
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:36 UTC
um, margins..if not treated carefully will cause lot of problems in future. :)
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 22 2016 08:36 UTC
@MangoKing-IV Oh, and just a tip: I'd use margin: 0; on the body :)
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 08:37 UTC
I am trying to understand how to layer elements, and is failing miserably. I am trying to build four buttons, and layer a image over it.
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:40 UTC
Thanks @NitinNair89 and @Otto-AA
CamperBot
@camperbot
Oct 22 2016 08:40 UTC
mangoking-iv sends brownie points to @nitinnair89 and @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @otto-aa |http://www.freecodecamp.com/otto-aa
:cookie: 292 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:42 UTC
Similar to layering elements, why is my navbar going behind the images in this pen
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 08:43 UTC
@MangoKing-IV you need to use z-index
John Michael Tubiera
@jmstubiera
Oct 22 2016 08:46 UTC
@pkshreeman Were you trying to do it like this?
blob
This message was deleted
With the black one as the overlay?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 08:47 UTC
@jmstubiera Yes sir!
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:48 UTC
@pkshreeman I gave that a shot with both the id reference and img element reference and it didnt seem to work
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 08:49 UTC
@MangoKing-IV yeah...I was checking out your codepen...when I changed the nav's index, it wouldn't go over the images...and got blocked in.
I wonder if it's <div> issue
John Michael Tubiera
@jmstubiera
Oct 22 2016 08:49 UTC
@pkshreeman You can apply an absolute positioning to the image so that it won't affect the buttons and setting positions for both top and left. Tried it like this via inspect
blob
sycrat
@sycrat
Oct 22 2016 08:49 UTC
Hey guys! I think I've finished my first project, the tribute page! Would anybody care to give some feedback if they have a sec? https://codepen.io/sycrat/full/JRZwxW/
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 08:53 UTC
@jmstubiera that's odd..if I write that in css, it doesn't work.
MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:54 UTC
Now I lost my original background image for my navbar
can someone help me figure out how to get it back
Artur Arsalanov
@kurumkan
Oct 22 2016 08:56 UTC

@sycrat hey that's cool! Not about links on codepen: do it like that

<a href="http://somecoolshit.com" target="_blank" alt="blahblah">click here</a>

TARGET BLANK - it's important otherwise your links will not open

MangoKing-IV
@MangoKing-IV
Oct 22 2016 08:56 UTC
Okay I just got it back by removing the margin:0; in the body
Why did cause the issue ?
John Michael Tubiera
@jmstubiera
Oct 22 2016 08:57 UTC

@pkshreeman Could be an issue with specificity of the elements. Associating the image with a class like this:

<img src="https://raw.githubusercontent.com/pkshreeman/pkshreeman.github.io/master/Blackcircle.png" class="imageOverlay">

Then apply these style to that class

.imageOverlay {
    position: absolute;
    top: 120px;
  left: 135px;
}
sycrat
@sycrat
Oct 22 2016 08:57 UTC
Ah, thanks @kurumkan , looks like I missed it on my github link!
CamperBot
@camperbot
Oct 22 2016 08:57 UTC
sycrat sends brownie points to @kurumkan :sparkles: :thumbsup: :sparkles:
:cookie: 357 | @kurumkan |http://www.freecodecamp.com/kurumkan
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 08:59 UTC

@sycrat hey that's cool! Not about links on codepen: do it like that

<a href="http://somecoolshit.com" target="_blank" alt="blahblah">click here</a>

TARGET BLANK - it's important otherwise your links will not open
browser will try to open the link in the same page unless the "target" value is explicitly specified. Hence, codepen might block any external links while the browser attempts to open it inside codepen itself. :)

you can test it by using the link to your codepen settings or profile page.. it will open inside your codepen itself :P
so it will be a codepen inside a codepen! :D
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 09:03 UTC
@jmstubiera I'm stumped. It didn't work. You can open my codepen by clicking on it, and modify it and see what works.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:03 UTC
@pkshreeman what's wrong?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 09:04 UTC
@NitinNair89 can't force the image of black circle to be overimposed these four buttons.
Artur Arsalanov
@kurumkan
Oct 22 2016 09:04 UTC
@jmstubiera if you don't want problem with your images from github you must use http://rawgit.com/
John Michael Tubiera
@jmstubiera
Oct 22 2016 09:06 UTC
@pkshreeman You can check it now, you have a typo. :)
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:06 UTC
@pkshreeman Try this:

.imageOverlay{
  position: absolute;
  top: 120px;
  left: 135px;
  margin: 0 auto;
  width: 50%;

}
John Michael Tubiera
@jmstubiera
Oct 22 2016 09:07 UTC
.imageOverlay{
  position: absolute;
  top: 120px;
  left: 135px;
  width: 50%;
}
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 09:08 UTC
Thank you @jmstubiera @NitinNair89 ! Sigh...so stupid of me..
Interestingly, buttons no longer work.
Thank you @jmstubiera
CamperBot
@camperbot
Oct 22 2016 09:10 UTC
pkshreeman sends brownie points to @jmstubiera :sparkles: :thumbsup: :sparkles:
:cookie: 95 | @jmstubiera |http://www.freecodecamp.com/jmstubiera
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 09:10 UTC
thank you @NitinNair89
CamperBot
@camperbot
Oct 22 2016 09:10 UTC
pkshreeman sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 293 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 09:10 UTC
Dunno why that didn't work first time...
kenobijr
@kenobijr
Oct 22 2016 09:12 UTC
@khaduch Thank you so much, sir!!!! i went sleeping, because i thought nobody will answer me. I tried find the error for hours
CamperBot
@camperbot
Oct 22 2016 09:12 UTC
kenobijr sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1817 | @khaduch |http://www.freecodecamp.com/khaduch
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:30 UTC
Hello, Sorry my PC crashed
i am building a landing page for my portfolio.. what things should I put in?
about/projects/contact - is it enough?
F22rapt
@F22rapt
Oct 22 2016 09:33 UTC
who knows. we're only hoomans
Artur Arsalanov
@kurumkan
Oct 22 2016 09:33 UTC
@NitinNair89 probably your skills - as a separated section=)
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:34 UTC
i thought i will put it inside about
F22rapt
@F22rapt
Oct 22 2016 09:36 UTC
mmm how do i change the size of a navigation bar and its items?
i'm not seeing any easy to udnerstand answers on google
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:37 UTC
What did you try in your code?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:40 UTC
li a {
  font-size: 30px;
}
F22rapt
@F22rapt
Oct 22 2016 09:41 UTC
hm..how does that work?
as in..what is the.."a"
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 09:44 UTC
a is the anchor element that you are using inside your <li>
the CSS selector for tags are their tag names. So for <a>, it will be a, for <span> it will be span, etc.
the font-size gets applied to all anchors inside the <li> tag. That's how the above code works
since <li> is a tag, so its CSS selector would be just 'li'.
the CSS selector for classes is a 'period' ( . ) and for IDs is a 'hash' ( # )
F22rapt
@F22rapt
Oct 22 2016 09:48 UTC
mkay mkay
F22rapt
@F22rapt
Oct 22 2016 10:03 UTC
yikes i need a second monitor. all these dman tabs open xD
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:08 UTC
:D
F22rapt
@F22rapt
Oct 22 2016 10:11 UTC
ought move my tower and just pop my little ole tv up here lol
poor mans creativity
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:14 UTC
still stuck on my landing page.. i am bad in writing although i have a blog :(
I dunno how to appeal my visitors .. LOL!
Muhammad Hasham
@MohammadHasham
Oct 22 2016 10:14 UTC
can anyone help me with my tic tac toe game project the problem is that my signs are beign overridden
Please select option 1 and X
https://codepen.io/Mohammad_Hasham/full/rryQmV/
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:14 UTC
in this case, potential employers :P
Get rid of the alerts.. and maybe maintain an array of available spaces
I didn't see your code yet, but I guess it is randomly putting up the value. So..
F22rapt
@F22rapt
Oct 22 2016 10:17 UTC
nitin, obviously your landing page needs boobies.
Muhammad Hasham
@MohammadHasham
Oct 22 2016 10:27 UTC
is this alright if i don't use minimax algorithm for tic tac toe game and instead use if else statements as i am finding it really difficult ?
@NitinNair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:28 UTC
@MohammadHasham I am not sure. I didn't even reach that challenge.. Sorry! I hope someone who has completed it can help you better :)
@F22rapt Bad joke.. LOL!
Angela
@Baby007mix
Oct 22 2016 10:29 UTC
This message was deleted
F22rapt
@F22rapt
Oct 22 2016 10:30 UTC
uhm to maintain font size of H1-H3 elements..would i need to use like a div..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:31 UTC
Why did you copy the entire source @Baby007mix ?
@F22rapt No
Angela
@Baby007mix
Oct 22 2016 10:31 UTC
i dontk know...
shouldn't i?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:32 UTC
you should not..you won't learn otherwise
Are you doing FCC challenges @Baby007mix ?
Angela
@Baby007mix
Oct 22 2016 10:33 UTC
nope! just my own thing!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:33 UTC
Try FCC then. You will learn better! :)
F22rapt
@F22rapt
Oct 22 2016 10:33 UTC
nailed it..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:34 UTC
or W3schools also had good tutorials! :)
F22rapt
@F22rapt
Oct 22 2016 10:35 UTC
w3 is what i keep pulling up ..
Angela
@Baby007mix
Oct 22 2016 10:36 UTC
I just wanted to understand why my navigation bar is not displaying I am trying to understand the different nav bars. it says try it! so I am!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:36 UTC
Why don't you try the code for navigation only and remove everything else?
Angela
@Baby007mix
Oct 22 2016 10:37 UTC
okay. thanks for your constructive feedback.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:38 UTC
:)
F22rapt
@F22rapt
Oct 22 2016 10:39 UTC
so, How does this look for just a blank slate to be filled in for the portfolio? http://codepen.io/f22rapt/full/xEmZKN/
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:40 UTC
nav does not look good
change the color scheme
F22rapt
@F22rapt
Oct 22 2016 10:47 UTC
eeee...colors...
seriously xD i'd spend hours on this before getting it prutty
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:47 UTC
haha
which challenge are you on?
F22rapt
@F22rapt
Oct 22 2016 10:49 UTC
the portfolio..i'm just about done as you can see..as i have nothing to slap in it i figured just partitioning out some space would suffice
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:51 UTC
mention about the tribute page you did before portfolio
don't keep it blank
F22rapt
@F22rapt
Oct 22 2016 10:51 UTC
don't keep the..port blank or the tribute blank? xD
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:52 UTC
portfolio
This is mine. I won't update it any longer though. :P
http://codepen.io/Nitin-Chandran-Nair/full/pbPLVk
F22rapt
@F22rapt
Oct 22 2016 10:54 UTC
alright..well then. I shall press on
ooh i like the scrolling image..Think ill see if i can't do that.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:55 UTC
It's all thanks to animate.css
;)
F22rapt
@F22rapt
Oct 22 2016 10:57 UTC
i seriously think ima try to use my tv as another monitor xD
so, where would i be pulling these images from?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 10:59 UTC
which images
?
F22rapt
@F22rapt
Oct 22 2016 11:00 UTC
place holder images. I mean..i wouldn't be using a src would i?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:00 UTC
yes..src
F22rapt
@F22rapt
Oct 22 2016 11:02 UTC
bah. complicated..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:02 UTC
nope it isn't
F22rapt
@F22rapt
Oct 22 2016 11:03 UTC
says you :o:
<.>
like there are ways i can just stright up copy the code for it..but i wana actually understand it lol
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:04 UTC
that's a good sign
i think at this stage, being able to code HTML and CSS, and knowing how to add images, various tags, etc.. is more than sufficient
So don't think much, move ahead
F22rapt
@F22rapt
Oct 22 2016 11:09 UTC
still a little hard to get it to work around what i have if i don't know whats going on
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:09 UTC
hmm
F22rapt
@F22rapt
Oct 22 2016 11:13 UTC
like i know that because i inserted this below everything it appears below my contacts but thats obviously not where i want it
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:14 UTC
because you put it after your </body> closing tag
place the code where you want it exactly
adding line-height:25; does not mean you are adding a blank space. It just determines the space between two lines
so i suggest, make your code a simple and easy one.. the JS looks complicated for someone who is at the portfolio challenge. But, if you wrote it yourself, then that's well and good. Work on your HTML part
F22rapt
@F22rapt
Oct 22 2016 11:20 UTC
that was total copy/paste.
well instead of line height then, would i need to use like...margin top and margin bottom?..or is that padding..mmm
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:24 UTC
none of them
you add a simple <div> and put some height and width between each heading tags
Gaston Kirsman
@gastikirs
Oct 22 2016 11:25 UTC
Hi guys, can someone give me a hand?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:26 UTC
:hand:
Gaston Kirsman
@gastikirs
Oct 22 2016 11:26 UTC
I want to 'expand' the div size
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:26 UTC
increase height and width
Like the second section , which has another color
But if i expand i have to put like 500px, is it ok?
I mean,is it a good practice?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:27 UTC
the portfolio section?
why don't put 100% width?
Gaston Kirsman
@gastikirs
Oct 22 2016 11:27 UTC
I'll try
but its 100% related to what?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:28 UTC
Good animations
100% to the browser window.. the viewable size
Gaston Kirsman
@gastikirs
Oct 22 2016 11:28 UTC
Let me try
I added width 100% to the div css but doesnt make any change.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:30 UTC
which div width you want to expand?
Gaston Kirsman
@gastikirs
Oct 22 2016 11:30 UTC
I want to get white until the end of the thumbnails
the #thumbnail div i want to expand
Sorry, #portfolio
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:32 UTC
but it is already 100%
Gaston Kirsman
@gastikirs
Oct 22 2016 11:32 UTC
But the color of the div doesnt go until the bottom
Oh, its the height, not the width
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:33 UTC
:laughing:
Gaston Kirsman
@gastikirs
Oct 22 2016 11:34 UTC
thank you mate, ill keep working on this :)
F22rapt
@F22rapt
Oct 22 2016 11:41 UTC
hmmm I'm not aware of this div statement you were speaking of. I'm seeing many different ways to seperate/space out the headings but nothing that seems to be what you were talking about
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:41 UTC
what i meant was to follow a standard HTML format :)
F22rapt
@F22rapt
Oct 22 2016 11:42 UTC
still lost <.> apologies
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:42 UTC
:P
<html><body>
<nav>
Your navigation things go here
</nav>

<section>
    <header>Heading for that section</header>
    <div>Content</div>
</section>
</body></html>
Follow the above approach, if you can :)
so your about, portfolio, contact will have their own <section> tags and <header> as well
I will be right back in few minutes.
Taras Yaremkiv
@Y-Taras
Oct 22 2016 11:46 UTC
Hello everyone!
Is there any way to center the title of the game "TicTAcToE" right upon the table
https://codepen.io/Y-Taras/full/rrkKWz/
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:47 UTC
the title is centered.
F22rapt
@F22rapt
Oct 22 2016 11:47 UTC
what does that div do..
oh wait i get it..but why not a p?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:48 UTC
@F22rapt that div will hold contents. You can put a p inside div :)
F22rapt
@F22rapt
Oct 22 2016 11:49 UTC
would that be to..i guess seclude it so its not unintentionally affected by other things then?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 11:49 UTC
probably
with that you have full control on your HTML elements
F22rapt
@F22rapt
Oct 22 2016 11:50 UTC
i reckon
Taras Yaremkiv
@Y-Taras
Oct 22 2016 11:53 UTC
@NitinNair89 i'm talking about header
Pratheev
@prattheev
Oct 22 2016 11:55 UTC

@Y-Taras <p data-height="265" data-theme-id="0" data-slug-hash="rrkKWz" data-default-tab="js,result" data-user="Y-Taras" data-embed-version="2" class="codepen">See the Pen <a href="http://codepen.io/Y-Taras/pen/rrkKWz/">Tic-Tac-Toe</a> by Taras (<a href="http://codepen.io/Y-Taras">@Y-Taras</a>) on <a href="http://codepen.io">CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

Taras Yaremkiv
@Y-Taras
Oct 22 2016 11:58 UTC

@prattheev I want that header to be right upon the table

<header>
<h2>Tic Tac Toe Game</h2>
</header>

Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:05 UTC
I think you didn't understand what i wanted to say @Y-Taras
The title "Tic..." is already aligned to the center. The table is aligned a little to the left because of "Choose to play"
move the choose to play thing just below the title..if you want :)
Pratheev
@prattheev
Oct 22 2016 12:06 UTC
<div>
  <h2 style="text-align:center">Tic Tac Toe Game</h2>
  <table class="gameTable">
    <tr>
      <td id="a1"></td>
      <td id="a2"></td>
      <td id="a3"></td>
    </tr>
    <tr>
      <td id="b1"></td>
      <td id="b2"></td>
      <td id="b3"></td>
    </tr>
    <tr>
      <td id="c1"></td>
      <td id="c2"></td>
      <td id="c3"></td>
    </tr>
  </table>
</div>
I guess this would do good instead of header @Y-Taras
grouping the title and table is the best way to do it
Taras Yaremkiv
@Y-Taras
Oct 22 2016 12:14 UTC
@prattheev thanks, I also thought about that way, but didn't want to change html code)
CamperBot
@camperbot
Oct 22 2016 12:14 UTC
y-taras sends brownie points to @prattheev :sparkles: :thumbsup: :sparkles:
:cookie: 8 | @prattheev |http://www.freecodecamp.com/prattheev
F22rapt
@F22rapt
Oct 22 2016 12:21 UTC
so..for my portfolio just what the fudge should i slip into my "about" section..I'm pretty dense at this yet
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:33 UTC
just few things about you, what you love, etc. maybe your skillset, experience and stuff
F22rapt
@F22rapt
Oct 22 2016 12:36 UTC
I have none of that lol.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:36 UTC
Where you live, educational qualifications
F22rapt
@F22rapt
Oct 22 2016 12:36 UTC
not a single one xD
I'm as fresh as a middle school student
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:36 UTC
LOL. That's great
You should put it. School name, what subjects u like, why u chose web design, etc.
Trust me, i am as good as you when it comes to describing ourselves :P
F22rapt
@F22rapt
Oct 22 2016 12:38 UTC
"hi I like anime and i'm tired of working 10hr shifts. so plz- I will code for love"
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:38 UTC
I have been coding my portfolio 2 days and it is still blank :laughing:
that's hilarious @F22rapt :P
F22rapt
@F22rapt
Oct 22 2016 12:39 UTC
I'm a pretty decent writer, but always the first few words just get me for hours at a time
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:39 UTC
do you blog?
F22rapt
@F22rapt
Oct 22 2016 12:40 UTC
no. I think i would like to though
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:40 UTC
you said it yourself - pretty decent writer :)
F22rapt
@F22rapt
Oct 22 2016 12:42 UTC
will blog for money
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:42 UTC
Hmm good
:)
:+1:
F22rapt
@F22rapt
Oct 22 2016 12:43 UTC
you know what..I'm totally popin my tv on my desk and using it as a second monitor..yep
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 12:44 UTC
haha
F22rapt
@F22rapt
Oct 22 2016 12:45 UTC
they'r eabout the same size even
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:17 UTC
:P
Hello World!
CamperBot
@camperbot
Oct 22 2016 13:19 UTC

welcome to FreeCodeCamp @NitinNair89!

Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:19 UTC
:P
Hello World!
CamperBot
@camperbot
Oct 22 2016 13:19 UTC

welcome to FreeCodeCamp @NitinNair89!

Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:19 UTC
:laughing:
wake up guys
Hello!
F22rapt
@F22rapt
Oct 22 2016 13:24 UTC
yaaaaawn hi hi
was having such a lovely dream..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:27 UTC
hahaha
Dawidby
@Dawidby
Oct 22 2016 13:27 UTC

Hi guys I'm working on personal portfolio and I've got problem with gradient in my progress bar

This is how I want to look like: http://codepen.io/dawidb/pen/amPgaQ

This is how it looks like : http://codepen.io/dawidb/pen/dpGbVB

Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:29 UTC
Good one @Dawidby Gradient looks fine to me
F22rapt
@F22rapt
Oct 22 2016 13:30 UTC
this color scheme is just awful http://codepen.io/f22rapt/full/xEmZKN/
I can't even with myself
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:30 UTC
Then don't use it :smile:
Dawidby
@Dawidby
Oct 22 2016 13:30 UTC
I see that gradient progress bar in 2nd link is blue ... and I want to be gradient one :)
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:31 UTC
didn't get you
both pens are yours, what issue are you facing?
Dawidby
@Dawidby
Oct 22 2016 13:32 UTC
yes, both are mine, 1st link is the gradient bar that I want to put into my personal portfolio .. after copying working gradient into portfolio it doesn't work :<
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:33 UTC
you gave the gradient different.. as a background
the gradient works with your about border
vínαч puppαl
@vinaypuppal
Oct 22 2016 13:44 UTC
@Dawidby in 2nd codepen you did not close some braces properly before your @media rule check that if you resolve those , your progress bar will be gradient colored. And also your .progress-bar styles are inside media query .
F22rapt
@F22rapt
Oct 22 2016 13:50 UTC
uuuh..Its..on the tip of my puny brain..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:51 UTC
Hi @vinaypuppal :)
vakio
@vakio
Oct 22 2016 13:51 UTC
@F22rapt where is the tip of the brain located? the top?
F22rapt
@F22rapt
Oct 22 2016 13:51 UTC
I don't even know
vínαч puppαl
@vinaypuppal
Oct 22 2016 13:52 UTC
@NitinNair89 Hi
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:53 UTC
@vinaypuppal I was thinking maybe on click your active nav can be dark opaque background and white text
have you tried that already?
vakio
@vakio
Oct 22 2016 13:55 UTC
@F22rapt according to google image search, it's the front of the brain. tip of the brain
vínαч puppαl
@vinaypuppal
Oct 22 2016 13:55 UTC
@NitinNair89 sorry I did not understand your question properly??
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 13:56 UTC
for your website @vinaypuppal
F22rapt
@F22rapt
Oct 22 2016 13:56 UTC
so..I'm trying to make a word wrap for my p statement inside of my div...only examples i'm pulling up are using div though..but i ahve more than one div..
vínαч puppαl
@vinaypuppal
Oct 22 2016 13:58 UTC
This message was deleted
This message was deleted
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:00 UTC
on click, the text is grayed out
so wanted to tell you
@F22rapt didn't get your question
F22rapt
@F22rapt
Oct 22 2016 14:02 UTC
I'm just trying to make a word wrap for my paragraph.
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:02 UTC
@NitinNair89 oh okay is there any UX issue if its greyed out ??
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:02 UTC
less readability
word wrap as in?
F22rapt
@F22rapt
Oct 22 2016 14:03 UTC
word break.. to shorten the width
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:03 UTC
tried padding?
F22rapt
@F22rapt
Oct 22 2016 14:03 UTC
no..<.>
"{" is an unexpected token..
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:05 UTC
@NitinNair89 tag people when replying I am not understanding to whom your replying .
whats your suggestion for this :point_up: October 22, 2016 7:32 PM
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:06 UTC
@NitinNair89 oh okay is there any UX issue if its greyed out ??
Less readability
@F22rapt some issue with braces in your code
F22rapt
@F22rapt
Oct 22 2016 14:07 UTC
grrrr
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:07 UTC
@NitinNair89 since the background is colored i did not find any good color to use so i used grey to indicate active page. And suggestions which color would be more readable
F22rapt
@F22rapt
Oct 22 2016 14:08 UTC
nope wait i know whats up..heh
Osaid
@osaidAz
Oct 22 2016 14:10 UTC
how can i split my HTMlL page like a newspaper?
i want to write in sections
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:11 UTC
@F22rapt you have p1 tag instead of p tag in HTML and inside your ul you gave a closing div remove that.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:11 UTC
follow HTML5 guidelines @osaidAz
Osaid
@osaidAz
Oct 22 2016 14:11 UTC
i want to have 2 raws in the same page
@NitinNair89 really man -_-
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:11 UTC
@osaidAz check bootstrap tutorial from Tutorial Republic
try it once, then if stuck, we are there to help you :)
Osaid
@osaidAz
Oct 22 2016 14:11 UTC
i want in HTML not bootstrap
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:12 UTC
Bootstrap is a responsive framework which will make work easier for you. If you want it plain, then code gets a little complex
Dawidby
@Dawidby
Oct 22 2016 14:12 UTC
@vinaypuppal THE GREATEST!
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:12 UTC
@osaidAz do you mean you want two columns or newspaper folding effect??
Dawidby
@Dawidby
Oct 22 2016 14:13 UTC
@vinaypuppal Good job Pal, all working good!
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:13 UTC
@Dawidby :smile:
Gaston Kirsman
@gastikirs
Oct 22 2016 14:13 UTC
Hey guys, i have a trouble with this
In the second section (portfolio) you can scroll to the right and see its not fully white..
Its supposed to be 100% of the width of the screen
Osaid
@osaidAz
Oct 22 2016 14:14 UTC
@vinaypuppal yes i want 2 columns
not columns , raws
i want 2 raws in my page
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:14 UTC
he means 'rows' @vinaypuppal
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:15 UTC
@osaidAz rows?? what are raws??
Osaid
@osaidAz
Oct 22 2016 14:15 UTC
omg
bye , thanks for nothing
F22rapt
@F22rapt
Oct 22 2016 14:15 UTC
so my section tag seems to be broken for me.uhm..
<div class="text-center">
<section>
<h2> About</h2>
<div>
<p class="text">Hello I am an aspiring web developer. I've chosen this field to find a career in something interesting and get out of the usual nine to five. I hope to use my skillset to make a difference in the companies or communities I work for. </p>
</div>
</section>

<section>
<h3> Contact</h3>
<div>
<p>buuuuu</p>
</div>
</section>
</div>
</div>
</div>
my text thats in the ABout is appearing beneath everything..
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:18 UTC
@osaidAz div is block level element and two div's like below create two rows
<div>row 1</div>
<div>row 2</div>
Gaston Kirsman
@gastikirs
Oct 22 2016 14:19 UTC
Any idea?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:20 UTC
@F22rapt please use the 'analyze html' option
F22rapt
@F22rapt
Oct 22 2016 14:21 UTC
<.> didn't tell me anything relevent to the problem..pointed out osme other things i can adress though..
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:22 UTC
@gastikirs on body add overflow: hidden it will remove horizontal scroll bars
body{
overflow: hidden;
}
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:23 UTC
@vinaypuppal I agree, but I feel something with his grid is wrong, checking that
Gaston Kirsman
@gastikirs
Oct 22 2016 14:23 UTC
@vinaypuppal It also removes the up and down bar
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:23 UTC
@NitinNair89 yeah i did not find whats wrong so i suggested that
@gastikirs sorry its overflow-x
Gaston Kirsman
@gastikirs
Oct 22 2016 14:23 UTC
@vinaypuppal And i need to scroll, theres content
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:24 UTC
he needs the scrollbar, try overflow:vertical
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:24 UTC
@gastikirs add overflow-x: hidden
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:24 UTC
or overflow:scroll
yeah, i forgot :P
Gaston Kirsman
@gastikirs
Oct 22 2016 14:24 UTC
Its not working anyway. I still have the 'yellow' line in the right side of the website
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:24 UTC
it's not the yellow line, it's your background color
Gaston Kirsman
@gastikirs
Oct 22 2016 14:25 UTC
Yeah, i know. But i dont understand why
The div is supposed to have 100% of the width
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:26 UTC
@gastikirs did you save your pen after adding , i still see horizontal scrollbar
body{
overflow-x: hidden;
}
F22rapt
@F22rapt
Oct 22 2016 14:26 UTC
sigh. ima just tear some of my code down..
Gaston Kirsman
@gastikirs
Oct 22 2016 14:26 UTC
Sorry, i did it on my localhost.
Ill do it there, but you will see its not working
There
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:28 UTC
@gastikirs yes if you add you wont see that yellow background you were seeing before
Gaston Kirsman
@gastikirs
Oct 22 2016 14:28 UTC
Well, apparently in codepen its working
But in my localhost, which i have the exact same code, its not
I still see the background
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:28 UTC
good luck @F22rapt
Gaston Kirsman
@gastikirs
Oct 22 2016 14:29 UTC
Ah, wait. I know why. Forgot to copy the navbar
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:29 UTC
@gastikirs okay update your pen with navbar we will check again
Gaston Kirsman
@gastikirs
Oct 22 2016 14:29 UTC
Check now
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:30 UTC
@gastikirs i still see old page only
F22rapt
@F22rapt
Oct 22 2016 14:30 UTC
cna you add a class to <section>?
or will it have to be div
Gaston Kirsman
@gastikirs
Oct 22 2016 14:31 UTC
You dont see the navbar?
F22rapt
@F22rapt
Oct 22 2016 14:32 UTC
got it..
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:32 UTC
@gastikirs yes repost your pen link again here that may help to make we are viewing same pen
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:32 UTC
@F22rapt you can add class to almost all the elements
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:33 UTC
@gastikirs If i remember, this issue wasn't there few hours back right?
M Nurkhoiri Hendratno
@khoirihendra
Oct 22 2016 14:33 UTC
im trying to build my own portfolio but confused chosing the style
i need help choosing the style, which one you guys prefer?
(A)http://s1113.photobucket.com/user/khoirihendra/media/a_zps4rxpu1dq.png.html
or
(B)http://s1113.photobucket.com/user/khoirihendra/media/b_zps5f9jn9zy.png.html
Gaston Kirsman
@gastikirs
Oct 22 2016 14:33 UTC
@NitinNair89 Its similar. I have big problems understanding this thing
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:34 UTC
@gastikirs i don't see horizontal scroll in the above pen with navbar you shared. Is the same code you have locally??
F22rapt
@F22rapt
Oct 22 2016 14:35 UTC
@khoirihendra I'd legit just go with which one you think would be easier to pull off lol
Gaston Kirsman
@gastikirs
Oct 22 2016 14:35 UTC
@vinaypuppal There isnt horizontal scroll
M Nurkhoiri Hendratno
@khoirihendra
Oct 22 2016 14:36 UTC
both easier :
Gaston Kirsman
@gastikirs
Oct 22 2016 14:36 UTC
But you can scroll anyway with the scroll click (3rd click) and see that is not good
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:36 UTC
the only difference is the navigation @khoirihendra
M Nurkhoiri Hendratno
@khoirihendra
Oct 22 2016 14:36 UTC
@NitinNair89 yeah, thats one got me confused
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:37 UTC
build both, present it as viewer's choice
@khoirihendra
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:37 UTC
@gastikirs okay understood, give a min i need to check your html grid structure
F22rapt
@F22rapt
Oct 22 2016 14:42 UTC
bah time to admit defeat and make out with the bed..catcha fellas later
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:44 UTC
cya @F22rapt :sleeping:
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:54 UTC
@gastikirs I was not able to find whats causing that but you can solve by overriding few bootstrap styles.
.row {
 margin-right: 0;
 margin-left: 0;
}
.container-fluid {
     padding-right: 0;
     padding-left:  0; 
}
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:54 UTC
@vinaypuppal Can you please take a look at his pen settings?
@gastikirs Have you tried wrapping the portfolio with <section> and give that section width:100% ?
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:55 UTC
@NitinNair89 yeah he added bootstrap two times and one head settings and in css panel settings
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 14:55 UTC
is that the cause @vinaypuppal
vínαч puppαl
@vinaypuppal
Oct 22 2016 14:56 UTC
@NitinNair89 no i removed one and checked but still same problem
Gaston Kirsman
@gastikirs
Oct 22 2016 14:57 UTC
Ill try that @NitinNair89
Stills the same
And removed the bootstrap in head setting
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:01 UTC
ok. :(
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:06 UTC
@vinaypuppal help pls
vínαч puppαl
@vinaypuppal
Oct 22 2016 15:12 UTC
@gastikirs I dont see that yellow background when horizontally scrolled in below pen https://codepen.io/vinaypuppal/full/dpabkd/
Gaston Kirsman
@gastikirs
Oct 22 2016 15:13 UTC
Looks solved
What did you do?
vínαч puppαl
@vinaypuppal
Oct 22 2016 15:14 UTC
@gastikirs i just added what i suggested you before here :point_up: October 22, 2016 8:24 PM
Gaston Kirsman
@gastikirs
Oct 22 2016 15:14 UTC
I see
But isnt a bad practice to overwrite boostrap style?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:16 UTC
nope @gastikirs If you're good at bootstrap, you're free to customize (if you know what's where and how it works). That's the motive of open-source! :)
Gaston Kirsman
@gastikirs
Oct 22 2016 15:16 UTC
Thanks :)
Michael Shull
@shullmb
Oct 22 2016 15:17 UTC
Hi there!
I am working on the Weather App project and seem to be having a scoping issue that doesn't make sense to me
Is anyone available to take a look?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:20 UTC
@shullmb Wassup! :) What's the error?
Michael Shull
@shullmb
Oct 22 2016 15:21 UTC
Alright, here goes....
in theory, I can create a variable
var test;
then i can set this variable inside a function
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:22 UTC
so?
is the variable declared inside the function or outside?
@shullmb
Michael Shull
@shullmb
Oct 22 2016 15:24 UTC
function setTest() {
    test = 2;
}
declared outside
set inside
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:25 UTC
nope, won't work I guess. unless the function and the variable fall inside the <script> tag
vínαч puppαl
@vinaypuppal
Oct 22 2016 15:25 UTC
@shullmb AJAX call is ASync so any code below your ajax call runs before you got data. may be your using text outside your ajax call before even ajax req completes. so test is undefined, this may be correct if i guessed your problem
Michael Shull
@shullmb
Oct 22 2016 15:26 UTC
thanks @vinaypuppal
CamperBot
@camperbot
Oct 22 2016 15:26 UTC
shullmb sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 634 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:26 UTC
pass that variable as an argument to setTest() then you can do whatever you want with that variable :D
Michael Shull
@shullmb
Oct 22 2016 15:26 UTC
that is likely it
Ricky11
@ricky11
Oct 22 2016 15:27 UTC
hi all.. the Jquery tutorial, which jquery version does it use? also does it use jqueryui or just jquery. for some reason the class animated bouce does not work in my projects... wonder if its because jquery version or do i need to add jqueryui cdn?
Michael Shull
@shullmb
Oct 22 2016 15:29 UTC
this is my original pen...http://codepen.io/shullmb/pen/pEkqxN
I was unhappy with the nested AJAX calls, so I set out to clean it up and broke everything here http://codepen.io/shullmb/pen/XjoogL/
vínαч puppαl
@vinaypuppal
Oct 22 2016 15:29 UTC
@ricky11 you need to animate.css for animations to work. Fcc tutorial already includes it but in your own projects you need to add it. And it's not jquery issue
Ricky11
@ricky11
Oct 22 2016 15:30 UTC
@vinaypuppal what is the cdn for the animate.css? isn't it https://code.jquery.com/jquery-3.1.0.slim.min.js
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:31 UTC
Sorry to popup. I had this in handy - <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.css" rel="stylesheet">
@ricky11
vínαч puppαl
@vinaypuppal
Oct 22 2016 15:32 UTC
@shullmb oh your using slim version of jquery try full version of jquery if you want jquery animations which are different from animate.css
Ricky11
@ricky11
Oct 22 2016 15:32 UTC
@vinaypuppal @NitinNair89 does fcc teach us this , dont see it anywhere.
vínαч puppαl
@vinaypuppal
Oct 22 2016 15:33 UTC
@shullmb if you have nested callbacks then try promise version of jquery Ajax syntax
Michael Shull
@shullmb
Oct 22 2016 15:33 UTC
I'll look into that
thank you!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:34 UTC
@ricky11 no. You can just look it up on github . The doc is quite good
Ricky11
@ricky11
Oct 22 2016 15:35 UTC
@NitinNair89 yes i got you, but i wish for beginners it would be nice if FCC told us about the src for jquery and that we need to add the css src as well. -- im looking at jquery.org to figure it out now thanks.
CamperBot
@camperbot
Oct 22 2016 15:35 UTC
ricky11 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:35 UTC
jquery and animate.css is different. Don't get confused please :)
just search animate.css on google, u will get it's doc on github
Ricky11
@ricky11
Oct 22 2016 15:39 UTC
@NitinNair89 oh.... it is indeed confusing becasue FCC starts the jquery course with "Now we're ready to learn jQuery" then it tells us to addClass("animate bounce"); how is one suppose to know that animate is not part of jquery??
Sorin Ruse
@sorinr
Oct 22 2016 15:48 UTC
@ricky11 in the challenges the animate.css lib is already loaded. the idea is to learn how to add a class to an html element using jquery. that two classes "animate bounce" where chosen just for the learner to immediately visualize what happens when you add a class
Ricky11
@ricky11
Oct 22 2016 15:50 UTC
@sorinr -- Thanks for your explanation. but one would assume that this css is built in to jquery lib that has been added by FCC. so when we create a project ourselves after adding in jquery , we only then learn that animate bouche is not part of jquery and requires another animate.css library which FCC fails to inform us about.. but i guess that is what gitter is for.. i just wish it would explain the backend a bit more. -- also why teach us animate.css there are many animations built in to jquery itself not the minified version.
CamperBot
@camperbot
Oct 22 2016 15:50 UTC
ricky11 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 780 | @sorinr |http://www.freecodecamp.com/sorinr
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:51 UTC
@sorinr is perfectly right! :)
Ricky11
@ricky11
Oct 22 2016 15:51 UTC
@NitinNair89 fcc does indeed say jquery is loaded, but it does not say animated.css is loaded.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:51 UTC
@ricky11 animate.css makes developers life a lot easier
because for a perfect animation using CSS, there's lot of codes.. and with this file, you only need to add classes to the elements you want to animate. I use it in almost all of my projects :)
yes, you are right. But as @sorinr said, just focus on jquery methods - addClass, removeClass, etc.
it's not about animate.css :)
Ricky11
@ricky11
Oct 22 2016 15:53 UTC
@NitinNair89 yes i see. projects can get bloated very quickly with so many libraries.
Sorin Ruse
@sorinr
Oct 22 2016 15:53 UTC
@ricky11 jquery has some animation functions incorporated. here some ref: https://api.jquery.com/category/effects/
Ricky11
@ricky11
Oct 22 2016 15:54 UTC
@NitinNair89 okay so now im going to locate a cdn for animate add at the link.
emamadordev
@emamadordev
Oct 22 2016 15:54 UTC
@NitinNair89 i discovered animate.css recently. it is a godsend.
Sorin Ruse
@sorinr
Oct 22 2016 15:55 UTC
@ricky11 but the exercise was to learn to add/remove classes using jquery
Ricky11
@ricky11
Oct 22 2016 15:55 UTC
@emamador so you were not confused when adding jquery and the animate bounce did not work
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:56 UTC
Sorry to popup. I had this in handy - <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.css" rel="stylesheet">
@ricky11
Ricky11
@ricky11
Oct 22 2016 15:56 UTC
@sorinr yes it was more about add/remove classes, but similar to bootstrap, it was very clear that we needed bootstrap.js and bootstrap.css.. it wasn't clear with animate.. but i guess i should have figured it out that animated is a class that is either in bootstrap.css or somewhere else.
@NitinNair89 wow 74kb file
@NitinNair89 huge just for a few css animations.
emamadordev
@emamadordev
Oct 22 2016 15:59 UTC
@ricky11 no because when i was messing with codepen.io settings I saw that under add external css Animate.css was an option. And i know that if its an external css file then its something seperate. I also know this because fcc taught us the same with the bootstrap. that you add it as an external source.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 15:59 UTC
@ricky11 not few mate, there's loads of it
Ricky11
@ricky11
Oct 22 2016 16:01 UTC
@emamador yes im not using codpen but normal atom ide editor, i also thought perhaps animate bounce are bootstrap css classes. as we were not taught animate.css -- anyway i will drop it and move on. thanks all.
CamperBot
@camperbot
Oct 22 2016 16:01 UTC
ricky11 sends brownie points to @emamador :sparkles: :thumbsup: :sparkles:
:cookie: 211 | @emamador |http://www.freecodecamp.com/emamador
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:07 UTC
Hello! I am working on a single webpage myself, after I made the First FrontEndProjects. I have an issue with data attributes. And I have hard time even defining it for search in google
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:08 UTC
error?
Sorin Ruse
@sorinr
Oct 22 2016 16:09 UTC
@ndzhingarova what issue do u have with data attributes?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:10 UTC
they do not work and they do not even look active, like class or type
it is html5, i have bootstrap and jquery links
Sorin Ruse
@sorinr
Oct 22 2016 16:13 UTC
@ndzhingarova when using data attributes in html there is javascript you have to write to interpret them. here some quick examples: http://www.w3schools.com/tags/att_global_data.asp
emamadordev
@emamadordev
Oct 22 2016 16:13 UTC
I'm working on the weather app. why doesn't json load? chome console message: http://i.share.pho.to/6df924bb_o.png
Sorin Ruse
@sorinr
Oct 22 2016 16:15 UTC
@emamador try to add "&callback=?" to your json url
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:15 UTC
I am not sure I got the idea. I have next attributes: data-toggle, data-target, data-ride, data-slide-to
Sorin Ruse
@sorinr
Oct 22 2016 16:16 UTC
@ndzhingarova can u post the codepen link?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:16 UTC
my syntax is as on the example
it is not codepen
it is on my comp, where could i upload it?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:17 UTC
@emamador how are you calling json?
@ndzhingarova Um, what error are you facing?
Sorin Ruse
@sorinr
Oct 22 2016 16:18 UTC
@ndzhingarova so you have something like <div data-toggle="something in here" data-target="some other thing in here" etc ></div> ?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:19 UTC
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
and one carousel: <div id="myCarousel" class="carousel slide" data-ride="carousel">
id, class are active
I do it on notepad++ and id, class type got red
data atributes do not
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:21 UTC
don't rely on notepad++ syntax coloring
your code is not working?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:21 UTC
the navbar does not look ok
I just started the carousel. Actually it is not done yet. But i saw it here too
Sorin Ruse
@sorinr
Oct 22 2016 16:24 UTC
@ndzhingarova have you added bootstrap links (css and js) to your html page?
Toughee
@Toughee
Oct 22 2016 16:25 UTC
Hi FCC. I'm trying to finish my tribute page challenge, but I've run into a wall recently. I can't manage to 1) Put my text and images into columns 2) Put my first image into a background page and have go down locked 3) Fonts aren't getting updated.
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:25 UTC
yes, two in the <head> for ccs and team. And Jquery and js in the end of the <body>
emamadordev
@emamadordev
Oct 22 2016 16:27 UTC
@NitinNair89 doesn't work its refusing the connection ove https
Magnus
@magnus195
Oct 22 2016 16:28 UTC
How do i make submit buttons?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:29 UTC
@emamador have you tried with http?
@magnus195 submit buttons can be made with <input type='submit'>
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:30 UTC
@NitinNair89 @sorinr Ok, thank you for your time. Obviously this will be difficult to communicate. I will finish the carousel and see if it works. Then I will upload somewhere and post a link. So we could be on one page
CamperBot
@camperbot
Oct 22 2016 16:30 UTC
:cookie: 781 | @sorinr |http://www.freecodecamp.com/sorinr
ndzhingarova sends brownie points to @nitinnair89 and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 295 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:30 UTC
@ndzhingarova Can send image of your code?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:31 UTC
Capture.JPG
that is the beginning and the navbar
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:32 UTC
get rid of the integrity.. Show me the jquery and the bootstrap js imports please?
@ndzhingarova Also check this - http://getbootstrap.com/getting-started/#template
It has sample templates you can refer
@ndzhingarova Check this too - http://getbootstrap.com/components/ for all components
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:34 UTC
Capture.JPG
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:34 UTC
imports look good @ndzhingarova :)
emamadordev
@emamadordev
Oct 22 2016 16:34 UTC

@NitinNair89 http://i.share.pho.to/d69f6f7a_o.png

so I have to use https but if i do the api doesn't work. it's something with the api itself because it says Err connection refused.

Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:35 UTC
I rewrote it from bootstrap page, i copied it
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:35 UTC
but how are you calling the url @emamador ?
can show us the code?
ok @ndzhingarova then why doesn't it work? have you checked browser console?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:38 UTC
do you mean the inspector tool(mozilla)?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:38 UTC
Yep
be right back after dinner guys! :)
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 16:39 UTC
@NitinNair89 ok, not quite sure what to look for here :)
emamadordev
@emamadordev
Oct 22 2016 16:39 UTC
@NitinNair89
function weatherApp (){
  $.getJSON("http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&APPID=d20ca486d73723c50174e1b7564caf53", function(a) {
   $(".appbg").html(a);


    });
}

weatherApp();
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 16:54 UTC
@emamador I used the HTTP version only.. and nothing is wrong with your URL. If you paste it in your browser, you will get weather data
problem might be in your javascript
@ndzhingarova You will see some red colored errors in your console when you run your code
Sorin Ruse
@sorinr
Oct 22 2016 17:03 UTC
@ndzhingarova do uhave on your file whats below "<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->" ? and in the same order as per http://getbootstrap.com/getting-started/#template
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:04 UTC
@sorinr Check the screenshots above.
Sorin Ruse
@sorinr
Oct 22 2016 17:05 UTC
@NitinNair89 yea. then there is some bad or incomplete navbar
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:06 UTC
yep, that's what i think
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 17:08 UTC
@NitinNair89 the part with ajax is missing
but i have different one with jquery
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:08 UTC
@ndzhingarova why do you need ajax? You just need the right versions from cdn..
Marcus Vinícius
@MarcusVRdoN
Oct 22 2016 17:10 UTC
Hey People
What's Up?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 17:12 UTC
@NitinNair89 I do not have this one: <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
Marcus Vinícius
@MarcusVRdoN
Oct 22 2016 17:12 UTC
About what they're talking here?
CamperBot
@camperbot
Oct 22 2016 17:12 UTC
you need to ask about @someone!
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 17:12 UTC
I have : <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
avi twito
@aviTwito
Oct 22 2016 17:12 UTC
can anyone help me a little but in the design of the qute machine?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:12 UTC
@ndzhingarova Try that then
Hello @aviTwito How are you?? Late today?
avi twito
@aviTwito
Oct 22 2016 17:13 UTC
http://codepen.io/avitt/pen/ORBxXL
when i look at this on the phone the center box is to small and the text and button slide out
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:13 UTC
@MarcusVRdoN @ndzhingarova Ran into a problem trying to run bootstrap code in her local system.
avi twito
@aviTwito
Oct 22 2016 17:13 UTC
@NitinNair89 hi im fine how are you?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:14 UTC
@aviTwito I am fine too! Have you made your code responsive?
avi twito
@aviTwito
Oct 22 2016 17:14 UTC
@NitinNair89 didnt had time to work on it since we last did it togehter
also the link was n good it always brought the same quote but i left it for now
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:15 UTC
Then can't do anything about your code not rendering properly in small devices.. @aviTwito
but if it meets the requirement, then proceed ahead
Marcus Vinícius
@MarcusVRdoN
Oct 22 2016 17:15 UTC
@NitinNair89 Hmm... Ok! I'll be watching to see if I can contribute something!
avi twito
@aviTwito
Oct 22 2016 17:15 UTC
@NitinNair89 but it suppose to be respnsive. i used % for the size and im using boostrap
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:16 UTC
agreed, but you did not use classes for small devices - col-xs and col-sm
avi twito
@aviTwito
Oct 22 2016 17:16 UTC
@NitinNair89 oh that right
Jonathan Doliver
@porygonj
Oct 22 2016 17:17 UTC

Why is the responseText always just ""?

var searchArticles = function(searchText){
  //console.log("searching");
  var xhr = new XMLHttpRequest();
  xhr.onreadystatechange = function(){
    if (xhr.readyState == XMLHttpRequest.DONE){
      console.log("yay");
      console.log(xhr.responseText);
    }
  };
  xhr.open('GET', "https://en.wikipedia.org/w/api.php?action=opensearch&search=" + searchText + "&limit=8&namespace=0&format=json", true);
  xhr.send(null);
};

When I go to https://en.wikipedia.org/w/api.php?action=opensearch&search=anime&limit=8&namespace=0&format=json directly in my browser, it shows an okay json.
Codepen at http://codepen.io/porygonj/pen/KrOBZv/?editors=1111

avi twito
@aviTwito
Oct 22 2016 17:18 UTC
@NitinNair89 still no change on the hone screen
@aviTwito just adding the classes won't work. You need to understand how the grid actually works
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 17:19 UTC
@NitinNair89 Meanwhile i copied carousel. It shows the pictures one after the other in a column
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:20 UTC
col-*-12 means occupy 12 columns in a row @aviTwito
@ndzhingarova maybe you need to initialize carousel? Anything in the doc?
I say this because I use Materializecss.com and carousel needs initialization to work :D
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 17:23 UTC
initialize is? :(
avi twito
@aviTwito
Oct 22 2016 17:23 UTC
@NitinNair89 i know that iv`e read all about it here: http://getbootstrap.com/
http://getbootstrap.com/css/#grid to be precized
Trust me, i didn't find any better tutorial - took me 5 days to learn it from there, and I am proud that i can atleast create average layouts in bootstrap grid.
avi twito
@aviTwito
Oct 22 2016 17:24 UTC
look at the 2nd link
ok ill read it too
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:25 UTC
:)
avi twito
@aviTwito
Oct 22 2016 17:25 UTC
but anyways, col-xs-12 means i want it to take the all row, right?
Nikoleta Dzhingarova
@ndzhingarova
Oct 22 2016 17:26 UTC
@NitinNair89 I have to leave. Thank you for your time!
CamperBot
@camperbot
Oct 22 2016 17:26 UTC
:warning: ndzhingarova already gave nitinnair89 points
ndzhingarova sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:26 UTC
@ndzhingarova see you tomorrow! :)
@aviTwito yes
avi twito
@aviTwito
Oct 22 2016 17:27 UTC
are you sure it related to the col class and not something else i massed up?
the reason the text and button all massed up in small screen
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:28 UTC
in full screen as well @aviTwito
it's all happening due to position:absolute and margin setups :(
Adel
@AdelMahjoub
Oct 22 2016 17:29 UTC
@porygonj add &origin=* to the url
avi twito
@aviTwito
Oct 22 2016 17:29 UTC
@NitinNair89 oh ok i tought i related to this. i just wanted the box to be centered in any screen and took some code from an answer on stackoverflow
honesty1997
@Honesty1997
Oct 22 2016 17:30 UTC
Hello guys~ Need some help here.
I am working on the javascript calculator.
This is my codepen.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:30 UTC
That's ok @aviTwito At this point, you only need the basics and knowledge of ajax calls. :)
honesty1997
@Honesty1997
Oct 22 2016 17:30 UTC
The problem is after i click equal.
Although it prints the right result.
avi twito
@aviTwito
Oct 22 2016 17:31 UTC
what do u mean by ajax calls? @NitinNair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:31 UTC
@aviTwito I meant API calls through AJAX or JSON whichever
honesty1997
@Honesty1997
Oct 22 2016 17:31 UTC
But when i want to click on other numbers key to restart
It only lets me input one number....
avi twito
@aviTwito
Oct 22 2016 17:32 UTC
@NitinNair89 oh ok
honesty1997
@Honesty1997
Oct 22 2016 17:32 UTC
Don't quite know why it happened....
avi twito
@aviTwito
Oct 22 2016 17:32 UTC
ill get back to it
@NitinNair89 but the json api we used was no good i need to find new ne
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:32 UTC
@Honesty1997 I didn't get any errors. I executed three operations and it worked
@aviTwito oh ok, plenty available on the net :)
honesty1997
@Honesty1997
Oct 22 2016 17:33 UTC
After you click on equal
you just randomly click some number key
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:33 UTC
I did, 5-4=, 7-4= and 3-4=
all worked correct
i did not use "AC" button
@Honesty1997
honesty1997
@Honesty1997
Oct 22 2016 17:34 UTC
Yeah
Try click several numbers
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:34 UTC
like 9999 ?
honesty1997
@Honesty1997
Oct 22 2016 17:35 UTC
Yeah
After click on equal
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:36 UTC
it stores only the last digit
?
honesty1997
@Honesty1997
Oct 22 2016 17:36 UTC
Yes.....
Tried to figure out
And it kind of crushed now..
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:40 UTC
@Honesty1997 Does this work proper?
 var x = parseInt(comp2);
        var y = parseInt(comp);
comp2 and comp and arrays, right?
console.log(x);
        console.log(y);
only displays the last digit
honesty1997
@Honesty1997
Oct 22 2016 17:42 UTC
oh i see....
I just casually delete the join function
I now add it on
The calculator can work fine when doing first computation.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:44 UTC
ok
I did not do any calculations now, entered number and pressed =
to check the console
Cameron Burkholder
@Cameron-Burkholder
Oct 22 2016 17:47 UTC

So I've been working on tic tac toe, and I can get it so that the player can choose the number of players, and I copied the code for the x's or o's, but that doesn't work.

http://codepen.io/CameronBurkholder/pen/WGkELZ

honesty1997
@Honesty1997
Oct 22 2016 17:47 UTC
Oh i found the problem!
I forgot to change the count variable named compute!
It works fine now!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:48 UTC
that's awesome!
honesty1997
@Honesty1997
Oct 22 2016 17:48 UTC
@NitinNair89 Thanks!
CamperBot
@camperbot
Oct 22 2016 17:48 UTC
honesty1997 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:48 UTC
I didn't help at all @Honesty1997 :)
honesty1997
@Honesty1997
Oct 22 2016 17:48 UTC
Haha still thanks for replying and reviewing my project!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:49 UTC
haha @Honesty1997 :)
@Cameron-Burkholder the JS Analysis shows this -
Reassignment of 'game', which is is a function. Use 'var' or 'let' to declare bindings that may change.
that's because you declared 'game' variable outside the function, so inside the function it will be 'undefined'
Maybe that's why the rest of the Javascript code is not functioning
Jonathan Doliver
@porygonj
Oct 22 2016 17:55 UTC
@NitinNair89 I looked through the XMLHttpRequest docs, but I don't see anything that contradicts what I'm already doing. Is there some glaring issue that should have been obvious if I looked through the docs?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:56 UTC
I am not sure @porygonj I never tried using XMLHttpRequest for API calls in my projects. Have you tried the same with JSON on .ajax() calls?
Cameron Burkholder
@Cameron-Burkholder
Oct 22 2016 17:56 UTC
Game should be a global variable, so I renamed my function and nested my other .click triggers to make less functions, but still nothing.
Jonathan Doliver
@porygonj
Oct 22 2016 17:57 UTC
@NitinNair89 I haven't tried it with an ajax() call, but I'll go try that.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 17:59 UTC
@Cameron-Burkholder Put this outside the main function but inside the doc.ready():
   $("#o h3").click(function() {
      player = "o";
      games();
    });
same for:
  $("#x h3").click(function() {
      player = "x";
      games();
    });
rest you can format, since I am not sure exactly when you want to call these functions as I saw them in multiple places.
If needed, use the same function but with different arguments. And based on those arguments, you can decide what to execute..
@porygonj All the best! :)
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:12 UTC
http://codepen.io/pkshreeman/pen/RGEVkY?editors=1111 Can someone help me with audio. I don't think it's working.
@NitinNair89 good morning!
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:12 UTC
@pkshreeman It's night here! Good Morning!
Did you try the <embed> tag?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:13 UTC
@NitinNair89 :) Yeah, I remember...you said good morning other time when it was midnight.... No. I am not familiar with <embed> looking into it.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:13 UTC
hehe.. where are you currently?
I am in India
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:14 UTC
california
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:14 UTC
hmm, that's why the timing difference :P
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:14 UTC
yep..it's 11:14AM here.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:14 UTC
11:44PM here
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:15 UTC
really? 12 hours exact.
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:15 UTC
12:30
right?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:15 UTC
Here? it's 11:15AM
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:15 UTC
11:45 - 11:15 = ?
:grin:
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:16 UTC
lol.
well, technically that's :30
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:17 UTC
:P
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 22 2016 18:29 UTC
@NitinNair89 thanks...I used <audio> as that seem to be HTML5-ish now. Although I am not sure why the one i used didn't work...oh well. Now, time to make arrays for the game...
CamperBot
@camperbot
Oct 22 2016 18:29 UTC
pkshreeman sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:29 UTC
:)
Good one.
Don't thank me, i did nothing
Amarillia
@Amarillia
Oct 22 2016 18:57 UTC

Hi,

Can somebody help me please what am I doing wrong? It seems my code always true and not working for the false cases.


function mutation(arr) {
  //create two variables for the first string and the second string
  //lowercase them
  //split each arrays to letters
  firstArray= arr[0].toLowerCase().split('');
  targetArray=arr[1].toLowerCase().split('');

  //looping through the array
  //check if the letters in the target string are in the first string, order doesn't matter
  for (var i = 0; i<firstArray.length; i++){
    for (var j = 0; j<targetArray.length; j++){
      if (j!==i){
        return false;
      }
      else{
        return true;
      }
    }
  }
//return firstArray + ", " + targetArray;
}

mutation(["Mary", "Aarmy"]);
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 18:59 UTC
in your code, even if one letter from target is found in first, it will return true
Amarillia
@Amarillia
Oct 22 2016 19:00 UTC
@NitinNair89 So it doesn't check through all the letters that is the problem?
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 19:00 UTC
instead of using return statements, set some flag or switch. Then based on that flag or switch return true or flase
yes, once the code hits "return" it stops processing and control goes back to caller
so, the rest of the code is ignored
Amarillia
@Amarillia
Oct 22 2016 19:01 UTC
Okay, thanks @NitinNair89
CamperBot
@camperbot
Oct 22 2016 19:01 UTC
amarillia sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 22 2016 19:01 UTC
ok then, i hope others are online. It's late here. Let me know if it works! Cya
Amarillia
@Amarillia
Oct 22 2016 19:01 UTC
Bye @NitinNair89
Gaston Kirsman
@gastikirs
Oct 22 2016 20:01 UTC
Hi all
Magnus
@magnus195
Oct 22 2016 20:03 UTC
hey
Gaston Kirsman
@gastikirs
Oct 22 2016 20:06 UTC
How can i adjust the thumbnail size to 100% of the column?
Nvm i got it hah
Gaston Kirsman
@gastikirs
Oct 22 2016 20:41 UTC
Guys, 2 questions:
How can i center the text in the thumbnail? Like center in the middle, not just left to right
And i cant add new content to the last div (contact) .. i still dont understand why
In a new row, under the social media icons
@gastikirs text-center to the row
Cameron Burkholder
@Cameron-Burkholder
Oct 22 2016 20:54 UTC
Has anyone completed tic tac toe, or can help me with it?
Gaston Kirsman
@gastikirs
Oct 22 2016 20:54 UTC
Not working @RuinIsProbablyTaken
Cameron Burkholder
@Cameron-Burkholder
Oct 22 2016 20:56 UTC

I have code that should run you through two sets of buttons, the first set sets the number of players, and the second lets you choose if you want to be x or o. The first set works properly, but the second set doesn't do anything that its supposed to on click.

http://codepen.io/CameronBurkholder/pen/WGkELZ

@gastikirs working for me
kat-mag
@kat-mag
Oct 22 2016 20:58 UTC
@RuinIsProbablyTaken he probably wants it to be vertically centered
@gastikirs https://codepen.io/RuinIsProbablyTaken/pen/QKYbob forked, look at the first row
@kat-mag I'm more thinking that he wants to center the image as well or center the text so it's centered as opposed to the page not the columns it takes up
@Cameron-Burkholder nvm didn't look carefully enough
@Cameron-Burkholder it works, it sets the player variable. I don't understand what's the problem here
Gaston Kirsman
@gastikirs
Oct 22 2016 21:32 UTC
@RuinIsProbablyTaken I meant the 'coming soon' text inside the thumbnail
Anyway im going to sleep. I'll continue tomorrow :)
xSnowpeltx
@xSnowpeltx
Oct 22 2016 21:38 UTC
I can't figure out how to run jquery on clicking an input type thing (like a checkbox or radio)
@gastikirs Add padding around the text, so to the parent element. You can't center vertically in any other way.
@xSnowpeltx Pen?
Walid Ashri
@walidashri
Oct 22 2016 21:59 UTC
@xSnowpeltx add jquery to ur settings
xSnowpeltx
@xSnowpeltx
Oct 22 2016 22:00 UTC
omg i cant believe i forgot to do that
Walid Ashri
@walidashri
Oct 22 2016 22:00 UTC
:)
xSnowpeltx
@xSnowpeltx
Oct 22 2016 22:02 UTC
everything works now c:
JD Tadlock
@jdtdesigns
Oct 22 2016 22:02 UTC
@xSnowpeltx change the col classes inside the .center row to xs instead of md
xSnowpeltx
@xSnowpeltx
Oct 22 2016 22:03 UTC
but I'm making it for a normal screen...
JD Tadlock
@jdtdesigns
Oct 22 2016 22:03 UTC
they won't overlap on smaller displays then
JD Tadlock
@jdtdesigns
Oct 22 2016 22:09 UTC
@xSnowpeltx xs goes from smallest to largest
so that will work for smalls and large
xSnowpeltx
@xSnowpeltx
Oct 22 2016 22:09 UTC
ah ok
Sam Griffen
@ssgriffen
Oct 22 2016 22:43 UTC
I know this may not be the most straight forward approach to this challenge but here is my code for Title Case a Sentence.. I think there may be a bug because I return the correct output for every scenario but it won't pass me. Can anyone help? function titleCase(str) {
var strArray = str.split(" ");
var word;
var rest;
var build = "";
for(i = 0; i < strArray.length; i++){
word = strArray[i].substring(0,1);
word = word.toUpperCase();
rest = strArray[i].substring(1, strArray[i].length);
rest = rest.toLowerCase();
build += word + rest + " ";
}
return build;
}
Michael Karpinski
@karpimpski
Oct 22 2016 22:46 UTC
@ssgriffen any chance you could format that to make it easier to read?
Sam Griffen
@ssgriffen
Oct 22 2016 22:47 UTC
@karpimpski hey I figured it out I'm adding a space after the last word whichh is fuc*ed
Michael Karpinski
@karpimpski
Oct 22 2016 22:47 UTC
@ssgriffen no just add ``` before and after your code
code here
This message was deleted
Michael Karpinski
@karpimpski
Oct 22 2016 23:11 UTC
@ssgriffen wow, I just re-read it and completely didn't realize you meant you had it figured out. nice work!
F22rapt
@F22rapt
Oct 22 2016 23:27 UTC
ahoy there
vuasin
@vuasin
Oct 22 2016 23:28 UTC
this is confusing
wow you really do this on your own
thats good because i felt i was just doing the challenges and not learning
F22rapt
@F22rapt
Oct 22 2016 23:48 UTC
is there a difference between w3-container and just container?
or maybe thats just a product of what i'm reading
Walid Ashri
@walidashri
Oct 22 2016 23:51 UTC
@F22rapt w3-container
F22rapt
@F22rapt
Oct 22 2016 23:53 UTC
mmm what is W3 though..like..just..uh
Walid Ashri
@walidashri
Oct 22 2016 23:54 UTC
@F22rapt W3.CSS is a modern CSS framework with built-in responsiveness: :)
F22rapt
@F22rapt
Oct 22 2016 23:58 UTC
mmm no chang in my text..surely i can adjust the margins and paddings though..right..