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
Kaz Baig
@kbaig
That's the quickest but pretty imperative way
Marius Nicolae
@bytao7mao
empty() when ?
after append ?
alpox
@alpox
@bytao7mao before the for loop
Kaz Baig
@kbaig
first 2 lines of the callback
@bytao7mao The best solution to be honest though would be to just have a boolean that your click callback checks for before making the getJSON call
That way, you don't have to keep making a new request every time the user clicks, just the first time
Marius Nicolae
@bytao7mao
The empty method seems allright, the other method , to keep just a statement and get rid of Loop ?
Kaz Baig
@kbaig
what
Marius Nicolae
@bytao7mao
oh, keep loop and make the boolean statement outside ?
Kaz Baig
@kbaig
let hasNotClicked = true;
$('.clickButton').click(function() {
  if (hasNotClicked) {
    hasNotClicked = false;
    // everything else you were doing
  }
});
@bytao7mao does that make sense
Marius Nicolae
@bytao7mao
yeah
Marius Nicolae
@bytao7mao
so, with what i replace that code now ?
homebrainbox
@homebrainbox

Hey, when I collapse my navbar and click on the "hamburger icon" or icon bars there's no dropdown menu appearing. Any advice?

<div class="container-fluid">
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
             <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myNavbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span> 
             </button>    
                <a class="navbar-brand" href="#">BRAND</a>
            </div>
          <div class="collapse navbar-collapse" id="myNavbar">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">about</a></li>
                <li><a href="#">portfolio</a></li>
                <li><a href="#">contact</a></li>
            </ul>
          </div>      
        </div>
    </nav>
</div>
<div>

</div>

Link: https://codepen.io/homebrainbox/pen/aVwmoJ

Stephen James
@sjames1958gm
@homebrainbox I think you need jquery along with bootstrap js
See console error Uncaught Error: Bootstrap's JavaScript requires jQuery
Sorin Ruse
@sorinr
@homebrainbox do u have loaded also bootstrap.js?
@homebrainbox and as @sjames1958gm pointed out jquery
Matt
@DaftlyPunkish
Hi guys. Can anyone here help me with the tic tac toe came?
Tom
@moT01
whats the problem? @DaftlyPunkish
Matt
@DaftlyPunkish
I'm having trouble with my random selction function
function compPicker() {
var compChoice = options(Math.floor(Math.random() * 9));
console.log(compChoice);
}
options is an array variable
Tom
@moT01
use brackets to grab something from an array
Nazar
@IsaakNazar
help ease-in-out doesnt work properly, works only ease-in but not out
https://codepen.io/NazarIsaak/pen/rYwEjg
Tom
@moT01
options[0] = first spot
so try option[Math.random....
Matt
@DaftlyPunkish
Ah!
Thank you!
Nazar
@IsaakNazar
.links:hover {
  transition: background  .3s ease-in-out;
  background: rgba(0, 0, 0, 0.8);
}
Matt
@DaftlyPunkish
Now I'm getting "compChoice" is not a function
Here's my pen
Tom
@moT01
ease in-out means the transition will start slow and end slow @IsaakNazar
you didnt put it in brackets
Nazar
@IsaakNazar
@moT01 there is on the code works only ease in
Matt
@DaftlyPunkish
Oops, forgot to save iut
it*
Refresh it
@DaftlyPunkish
you need to return from the function
return compChoice
so when you call compPicker()
it will give you compChoice
or whatever you return from that function
making any sense?
Matt
@DaftlyPunkish
It does
I'm just trying to figure out how to apply that to my function