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
jalley3
@jalley3
if you scroll to line 42 of the javascript
it starts my page load queries
i do console log inside of the for each, and i have verified in the debugger that each array is set up the way i want...i do console log after constructing my "buttons" variable, to ensure that somthing did not get scrambled along the way
however, if i console.log the "buttons" variable....all of the user variables that i inserted into the html code get replaced with "undefined"
and i have no idea why this is
Bruce Young
@mutantspore
@Lofthur http://en.wikipedia.org/w/api.php?action=query&titles=San_Francisco&format=json&callback=?
@Lofthur and
$(document).ready(function() {
    wikipediaCall();
});
Stein-T Dale
@Lofthur
@mutantspore Super. I'worked. You got me out of hours of frustration :D Thanks again :D
CamperBot
@camperbot
lofthur sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: lofthur already gave mutantspore points
Salomon May
@sollymay
Hi guys, so I am going nuts over the random quote project. I’ve been trying to get the information reloaded each time I click the button, but it just won’t do it. which jquery function can I use in order to do this?
$( 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.