by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 20:09
    @krisb1220 banned @Gastony
  • May 14 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:38
    @bjorno43 banned @real-action
  • Feb 01 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 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
Johnny
@jtan3
how are you writing the quotes?
Saboor Malik
@MathematicsCoding
$(document).ready(function() {
    $("#getMessage").on("click", function(){
      $(".message").html("Mistakes are always forgivable, if one has the courage to admit them. - Bruce Lee" );
    });
    });
Do you need to see my html code?
Johnny
@jtan3
is that all you have?
Saboor Malik
@MathematicsCoding
I could add more if I know how to repeat different quote..
Johnny
@jtan3
you can put all your quotes in an array and loop through them
Saboor Malik
@MathematicsCoding
Ah
I will try that
So I have to remove that code then?
Just
$(".message").html("Mistakes are always forgivable, if one has the courage to admit them. - Bruce Lee" );
    });
Honestly? I dont where to add for loop... Im new to codepen
Inside these document function?
Johnny
@jtan3
you can just comment your code for later use
you can write your javascript in there
Saboor Malik
@MathematicsCoding
okay
So I need to create new functoin?
function
$(document).ready(function(NAME HERE?)
Johnny
@jtan3
you can make an array inside the $(document).ready(function(){ });
Saboor Malik
@MathematicsCoding
So I dont need for loop?
Oh never mind I thought you meant something like $(document).ready(function() {array} { });
So I need to add new var for array?
Johnny
@jtan3
why don't you try it first
Saboor Malik
@MathematicsCoding
Yeah I was about to..
Johnny
@jtan3
you know how to make an array right?
and you know how to call it?
Saboor Malik
@MathematicsCoding
Ok full JS code
$(document).ready(function() {
  var myArray = ['Mistakes are always forgivable, if one has the courage to admit them. - Bruce Lee', 'My yesterdays walk with me. They keep step, they are gray faces that peer over my shoulder. - Author Golding']
  for (var i = 0; i<myArray.length; i++) {
    return myArray;
}
    });
Bazita
@bazita
my first tribute page , tell me what's wrong?
https://codepen.io/bazita/details/XMQdem/
Johnny
@jtan3
okay. how do you update the html in jquery? @MathematicsCoding
@MathematicsCoding use console.log() to see your myArray
Saboor Malik
@MathematicsCoding
Nothing show up
Johnny
@jtan3
$(document).ready(function() {
    $("#getMessage").on("click", function(){
      $(".message").html("Mistakes are always forgivable, if one has the courage to admit them. - Bruce Lee" );
    });
    });
try to combine this with your array
Saboor Malik
@MathematicsCoding
Well I got another idea..
Johnny
@jtan3
You can also use a quote api if you don't want to hardcode the quotes.
Karan Nandha
@karann7
if anyone here wants to do a node.js, passport.js auth course in the next 20-30 minutes i will be broadcasting one on google hangouts
Saboor Malik
@MathematicsCoding
I know its not random quote machine but what do you think?
I edited alittle so restart it again
Johnny
@jtan3
  var quote=["keys"];
  $("#quote1").on("click", function(){
      $(".quote1").html(quote);

    });
you can do this also @MathematicsCoding
Saboor Malik
@MathematicsCoding
What for?
Johnny
@jtan3
you can make an array of quotes and call it
Saboor Malik
@MathematicsCoding
Oh any quotes in instead of "keys"?
Johnny
@jtan3
this calls the quote in the array
Saboor Malik
@MathematicsCoding
So return then?
Johnny
@jtan3
i made and array called quote and i'm calling it on the click function
Saboor Malik
@MathematicsCoding
oooh I get it how it work