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
Salomon May
@sollymay
$( document ).ready(function() {
  var url = "http://quotesondesign.com/wp-json/posts?filter[orderby]=rand"
  $( ".target" ).click(function() {
    $.getJSON(url, function(a) {
      var quote = a[0].content;
      var author = a[0].title;
      $(".content").append("<span id='quote'" + quote +"</span>" + "<p id='comida'>&mdash; " + author + "</p>");
      });
});
});
i know that append isn’t what I’m supposed to do, but I wanted to see if I could get a new one each time I was clicking
Stein-T Dale
@Lofthur
@sollymay hi i used the $('.target').on('click', function() {}); Im not sure if it's this you mean?
Salomon May
@sollymay
nope. @Lofthur. I’m also using it. what I am referring to is that each time I’m clicking the button I get the same quote instead of a new one, while if I copy paste the website and then reload it, I get a new random quote
jalley3
@jalley3
@sollymay i think that i had trouble getting anything to show up with that API, as did a few other users.
i used a different one in the end and it worked fine
aareeder
@aareeder
Hello everyone! I'm working on my tribute page and I have been looking at the example but I was wondering if anyone would be willing to let me look at theirs as well. Does it have to be EXACTLY like the example?
jalley3
@jalley3
also .click(function) should work the same as .on('click',function)
@Lofthur @sollymay
Stein-T Dale
@Lofthur
@jalley3 i thought so to ;)
Salomon May
@sollymay
@jalley3 thank you! so it might be an API specific behavior, right?
CamperBot
@camperbot
sollymay sends brownie points to @jalley3 :sparkles: :thumbsup: :sparkles:
:star: 294 | @jalley3 | http://www.freecodecamp.com/jalley3
jalley3
@jalley3
@sollymay i think mine was called forismatic or something like that
Stein-T Dale
@Lofthur
@aareeder No you can make another design if you want to.
jalley3
@jalley3
@aareeder ...it doesnt need to follow it 100% at all
just meet the user story requirements
Bruce Young
@mutantspore
@sollymay at the bottom of the page explaining that API it has this codepen code
$.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
  $("body").append(a[0].content + "<p>&mdash; " + a[0].title + "</p>")
});
it has a callbac
callback
@sollymay can we see your codepen?
aareeder
@aareeder
thanks @jalley3 !
CamperBot
@camperbot
aareeder sends brownie points to @jalley3 :sparkles: :thumbsup: :sparkles:
:star: 295 | @jalley3 | http://www.freecodecamp.com/jalley3
jalley3
@jalley3
@mutantspore can you take a look at the question i posted?
Bruce Young
@mutantspore
@jalley3 remove all those extra [] around the twitchUsers
@jalley3 var twitchUsers = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff","comster404", "brunofin","sheevergaming","TR7K","OgamingSC2”];
Greg Duncan
@GregatGit
My weather app no longer works in chrome - it works in other browsers - but not chrome. It worked before but I updated chrome and it doesn't work now. Does anyone know a simple fix on this?
Bruce Young
@mutantspore
@jalley3 ok I see you are tring to use the array as a list of arrays then push stuff back into it
@GregatGit can we see?
this part is underlined .getCurrentPosition(function (position) {
here is the warning I get - getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
Matthew Bailin
@mdbailin
Hi everyone, I have a question related to the Wikipedia API
I can make the initial API call and display the first ten hits on wikipedia (in my example, for facebook), but I am having trouble updating the display after typing a new search in my form
Here is the code I have so far
$(document).ready(function(){ 

 var nameField;
 var name;
  $.getJSON("https://en.wikipedia.org/w/api.php?format=json&action=query&list=search&srsearch=Facebook&callback=?", function(json) { 
    for(var i=0;i<=9;i++){
    $("#wikiInfo").append("<a href=https://en.wikipedia.org/wiki/"+json.query.search[i].title+">"+json.query.search[i].title+"</a><br> <p> "+json.query.search[i].snippet+"</p>");
    }
    });

function getPageName() {
nameField = document.getElementById('nameField').value;
name = nameField;
}

$("#subButton").on("click", function(){
$("#wikiInfo").html('');
getPageName();
  $.getJSON("https://en.wikipedia.org/w/api.php?format=json&action=query&list=search&srsearch="+name+"&callback=?", function(data) { 
    for(var i=0;i<=9;i++){
    $("#wikiInfo").append("<a href=https://en.wikipedia.org/wiki/"+data.query.search[i].title+">"+data.query.search[i].title+"</a><br> <p> "+data.query.search[i].snippet+"</p>");
    }

  });
});

});
Bruce Young
@mutantspore
@GregatGit not sure.. that message has been coming up for Chrome forever but it still usually works
Greg Duncan
@GregatGit
@mutantspore Thanks for looking, Bruce. The page still works on other browsers so I'll fix it later.
CamperBot
@camperbot
gregatgit sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1451 | @mutantspore | http://www.freecodecamp.com/mutantspore
Bruce Young
@mutantspore
@GregatGit yes it worked in Safari ok
Greg Duncan
@GregatGit
Does is work in your chrome?
I only updated yesterday and then the issue came up
Bruce Young
@mutantspore
no.. but I also get this strange message
'//@ sourceURL' and '//@ sourceMappingURL' are deprecated, please use '//# sourceURL=' and '//# sourceMappingURL=' instead.
from code school_devtools.js
John Knotts
@jhnnyk
hi all,
i'm just starting on the Random Quote Generator project... what are people using for the quotes. Are we expected to write our own quotes in a JSON file? or is there an external source someone would recommend?
Greg Duncan
@GregatGit
@jhnnyk I would recommend you start with an array of quotes, then once that works use an api
Andrew Schmidthuber
@calicode
get it working with array then go to an api for practice on the next challenges which are all api based