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
I don't know why it isn't working, help would be appreciated
Lean Junio
@leanjunio
what’s the endpoint you’re trying to hit?
piteto
@piteto

you'll need to use HTTPS (and probably JSONP after that) for that API @Niloy513

angular.min.js:sourcemap:103 Mixed Content: The page at 'https://s.codepen.io/Niloy513/pen/VMQNmd?editors=1011' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en'. This request has been blocked; the content must be served over HTTPS.

Lean Junio
@leanjunio
Also, your method, should be : ‘GET'
Niloy513
@Niloy513
make a random quote appear using the variable $scope.quote I see I was confused about method because they say the method should be getQuote so it's odd. and piteto I'll try out what you advice.
@leanjunio thank you
@piteto Thank you
CamperBot
@camperbot
niloy513 sends brownie points to @leanjunio and @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 228 | @piteto |http://www.freecodecamp.com/piteto
:cookie: 288 | @leanjunio |http://www.freecodecamp.com/leanjunio
Lean Junio
@leanjunio
@Niloy513 what’s the url for the quote api?
Niloy513
@Niloy513
how were you able to tell I needed https though
Moisés Man
@moigithub
This request has been blocked; the content must be served over HTTPS.
Niloy513
@Niloy513
I can't explain it well but that can, the url they have posted on the site doesn't work for some reason
piteto
@piteto
niloy, it's a good idea to read about mixed-content. http is not secure, https is. When your web page is loaded over https everything else needs to use https too
(otherwise it's not secure)
Niloy513
@Niloy513
I am not good with api yet unfortunately. may I ask how you were able to find the bug issues so quickly? I have my debugger on codepen.
Lean Junio
@leanjunio
@Niloy513 Have you had any experience reading about AJAX for JavaScript and how requests and responses work?
Dan Schapira
@dsschapira
@Niloy513 That's a pretty common bug for people to get when they first start out with APIs - I know that's how I knew about it... @piteto just got to their answer first :)
piteto
@piteto
@Niloy513 I used the browser's debugger instead of the one in codepen. The one in codepen only reports what you log with console.log. The one in the browser is for debugging errors.
I don't know angular well, or if this is the right way to do it, but this will get your quote logged to the console:
var app = angular.module("model", []);

app.controller("control", [
  "$scope", "$http", function($scope, $http) {
    $scope.newquote = () => {
      $http.jsonp("https://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en&jsonp=showQuote")
    };
  }
]);

function showQuote(data) {
  console.log(data);
}
Niloy513
@Niloy513
I have but they don't make much sense if you have a link for a clear info of them I would love that. Thanks for the info and help as well guys.
@piteto I don't whether to be envious or jealous of you. I've been working on this for two days and you managed to get it in 10 minutes. Thank you very much for your wisdom.
CamperBot
@camperbot
niloy513 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
api offline
Dan Schapira
@dsschapira
I totally read the wrong part of this chat when I jumped in... ignore my last reply lol
Lean Junio
@leanjunio

@Niloy513 Totally man, here’s two links to AJAX requests (Basically what you’re trying to make earlier, you were trying to make a GET request to the quote person’s server), this is a great channel for all other stuff btw.

https://www.youtube.com/watch?v=h0ZUpPiV1ac&t=2s

and here’s the FCC vid for AJAX: https://www.youtube.com/watch?v=tHRNuBf_8xg

@Niloy513 Another nice on it seems, https://www.youtube.com/watch?v=ecT42O6I_WI
Niloy513
@Niloy513
@leanjunio
@piteto thank you both very much for the videos and help, I need to leave now, life calls, I'll be sure to look at your videos that you recommended. You guys take care for now.
CamperBot
@camperbot
niloy513 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
api offline
piteto
@piteto
:sparkles: :thumbsup: :sparkles:
Allan Oloo
@OlooAllaN
https://codepen.io/OA11an/full/XeejzO/
When I am in iphone 5 or mobile responsiveness. I have weird dead pixels on my modal backdrop any ideas why this is happening?
StrategyIsKey23
@23beyblade
Does anyone here know why jQuery will make only target 2 and 5 bounce, if i selected the nth-child of 2. Shouldnt it have selected 2, 4, and 6? every other one right? or is this occurring because the target classes are in 2 different div tags? Im not sure, it would rock if someone could help me with this. Thanks.
Does anyone here know why jQuery will make only target 2 and and 5 bounce, if i selected
sorry didnt mean to comment that last one^
sorry
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#target1").parent().css("background-color", "red");
    $("#right-well").children().css("color", "orange");
    $(".target:nth-child(2)").addClass("animated bounce")

  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
Lean Junio
@leanjunio
$(".target:nth-child(2)").addClass("animated bounce”) targets everything that has a class name of target
ohh wait i just saw it haha
i think what you wanted was $(".target:even)").addClass("animated bounce”) to target every other 2nd element
Ruchika Sharma
@ruchika90
@Manish-Giri ty i passed the challenge
CamperBot
@camperbot
ruchika90 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6637 | @manish-giri |http://www.freecodecamp.com/manish-giri
alteducation
@alteducation
@piteto thanks :+1:
CamperBot
@camperbot
alteducation sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 229 | @piteto |http://www.freecodecamp.com/piteto
Lean Junio
@leanjunio

React
Vue
Angular

and why? :)

Long Nguyen
@longnt80
@leanjunio ?
Lean Junio
@leanjunio
@longnt80 just wondering what people prefer working with