Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Jerzz
@2cool4school
This message was deleted
can anyone tell me why this code wont work? Im trying to replicate and example of a dropdown button but use a link inside my navbar instead:
<!DOCTYPE html>
<html>
<head>
<style>

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}

li {
    float: left;
}

li a {
    display: block;
    color: powderblue;
    text-align: center;
    padding: 7px 7px;
    text-decoration: none;
}

li a:hover {
    background-color: #111;
}

.dropbtn {
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #3e8e41;
}
</style>
</head>
<body>

<h2>Hoverable Dropdown</h2>
<p>Move the mouse over the button to open the dropdown menu.</p>



<ul>
  <li class='dropdown'>
    <a href='#' class='dropbtn'>Dropdown</a>
    <div class="dropdown-content">
      <a href="#">Link 1</a>
      <a href="#">Link 2</a>
      <a href="#">Link 3</a>
    </div>
  </li>
</ul>

</body>
</html>
Evan W
@Dirtier
Can someone please help me figure out why I'm getting a reference error? I'm using Vue.js
I've been at this for 3 days
John Garrison
@johntg96
I am making a hangman game and I get:
game.js:71 Uncaught SyntaxError: Unexpected end of input
// start a new game
$('#new-game').on('click', function() {
$('.game').removeClass('hide');
$(this).addClass("hide");
$('#reset').removeClass('hide');
main()
});
@johntg96 Why would I get this error? I am pretty sure I have all the right closings..
// start a new game
$('#new-game').on('click', function() {
    $('.game').removeClass('hide');
    $(this).addClass("hide");
    $('#reset').removeClass('hide');
    main()
});
Jordan Bartholomew
@tourdejord
3 days? That's rough, Your tic tac toe worked for me.
Beautifully I might add. Looks good.
Evan, what's the issue?
@Dirtier
I had to jump on the computer. My phone isn't being tag(@) friendly.
Stephen James
@sjames1958gm
@Dirtier Try game.compStart("X") the modal is not part of game
@johntg96 That is all there is?
Evan W
@Dirtier
I'm back
sorry
Ok so when you click the versus computer
you should be able to click on either the X or the O
and that will call the function compStart that sets the respective marker, and then makes the modal disappear
Stephen James
@sjames1958gm
In your modal template try game.compStart
Evan W
@Dirtier
v-on:click='game.compStart' ?
Stephen James
@sjames1958gm
yes, add game. to the front of the two calls
Evan W
@Dirtier
Holy shit
are you fing kidding me
Stephen James
@sjames1958gm
@Dirtier Sorry :(
Evan W
@Dirtier
that actually worked? I've been smashing my head against the wall for days
trying to figure out why this wasn't working
Lol wow @sjames1958gm thanks a lot man
CamperBot
@camperbot
dirtier sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3780 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
@Dirtier I believe it did, the modal is outside of the game object, so it needed to reference it
Evan W
@Dirtier
Yea it worked lol I'm just astounded
Bc I swear it was able to change data
before I made it a function, so I thought it had something to do with it being a function
@tourdejord Thanks :P
CamperBot
@camperbot
dirtier sends brownie points to @tourdejord :sparkles: :thumbsup: :sparkles:
:cookie: 272 | @tourdejord |http://www.freecodecamp.com/tourdejord
Evan W
@Dirtier
@tourdejord It wasnt a problem with the game itself, it was with the way I was trying to get input from the user about which marker they wanted when they hit vs computer
Kevin Janada Roy Ardian
@kevinjanada
Hey all, hows it going?
Evan W
@Dirtier
I finished the game and most of the UI first and then kind of went back through and rectro-actively added the AI and the marker selection, which turned out to be way bigger of a pain in the ass than I thought it would
@sjames1958gm Thanks again man, can't believe it was that simple lol, after 3 days on stackoverflow and spamming questions in here and getting no answers you have no idea how much that just helped
CamperBot
@camperbot
:warning: dirtier already gave sjames1958gm points
dirtier sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
Evan W
@Dirtier
Now I just have to figure out why it isn't transitioning into the modal O.o and why the sounds aren't working on the welcome screen
Kevin Janada Roy Ardian
@kevinjanada
Im trying to assign an ajax response to a variable, but it is not working.
Could someone take a look at my code please?
```
Im trying to assign an ajax response to a variable, but it is not working.
Could someone take a look at my code please?

$(document).ready(function(){


var quoteData;

      $.ajax({
        url: 'https://andruxnet-random-famous-quotes.p.mashape.com/', // The URL to the API. You can get this in the API page of the API you intend to consume
        type: 'GET', // The HTTP Method, can be GET POST PUT DELETE etc
        dataType: 'json',
        success: function(data) { 
          console.log(data);
          quoteData = data;
        },
        error: function(err) { alert(err); },
        beforeSend: function(xhr) {
        xhr.setRequestHeader("X-Mashape-Authorization", "FBozgJ3jMGmshCl5vNX6duTY1Zuop1wJypcjsnL0HOmBEK4Jm4"); // Enter here your Mashape key
        }
    });

  console.log(quoteData);
console.log(quoteData) returns undefined
Evan W
@Dirtier
@kevinjanada can you post your codepen