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
achudoz
@achudoz
at least on my end
kirbyedy
@kirbyedy
@zhuwei12 works fine for me
Alo
@aloRanking
@kirbyedy Thanks..it works!!!
CamperBot
@camperbot
aloranking sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1834 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Zhu Wei
@zhuwei12
it is supposed to change everytime
@achudoz
oh maybe it's my browser's fault
achudoz
@achudoz
@zhuwei12 no, it doesn't work for me too. I was using this API too and got it to work by clearing cache with each call.
I ended up using a different API, but I will try to remember what I used to fixt it
Ken Haduch
@khaduch
@achudoz - I like the idea of free and open source, too - it's always good to have it in your arsenal of tools. Good luck with the project!
Zhu Wei
@zhuwei12
yea I'm trapped in this problem for a long time.I feel so bad... @achudoz
Ken Haduch
@khaduch
@zhuwei12 - sometimes you have to disable caching for some of these projects - there is a way to set it up, depends on how you're calling this. I'm going to look at your project, too, and see what might help?
Zhu Wei
@zhuwei12
what the other API do u use
achudoz
@achudoz
@zhuwei12 ok, I got it
add:
$.ajaxSetup({cache: false})
@zhuwei12 don't feel bad, a lot of us, including me, have been stuck on this very problem with this API
Walter V. Santos
@theunmanifested
I need some help with my code. I can't get my images to float within it's <div>. Can't anybody help me out?
Zhu Wei
@zhuwei12
thank u all guys
I will go on working.
Ken Haduch
@khaduch
@zhuwei12 - https://api.jquery.com/jQuery.ajax/, if you are using jQuery's ajax command. There is a way to set it up directly within the request. (I'm only posting this because the jquery documentation says that the ajaxSetup use is not recommended.)
roeP
@roeP
question about the tribute page - does it have to be similar to the exapmle?
achudoz
@achudoz
@zhuwei12 this is a working example of your pen. JS:
$(document).ready(function() {
  $.ajaxSetup({
    cache: false
  });

  $("#quoteButton").on("click", function() {
    $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
      $("#quoteBox").html(a[0].content + "<p>&mdash; " + a[0].title + "</p>")
    });

  });
});
Bartłomiej Rakowiecki
@Biskupator
I have a question about portfolio page. How to make the bar at the top of the page stay fixed while scrolling?
Ken Haduch
@khaduch
@roeP - it can be any page that you want to make, I guess that there are a couple requirements, and you want to make it look good, apply appropriate styling, etc. But it's really a blank slate. They give the example as an example.
achudoz
@achudoz
@zhuwei12 and HTML:
<button id="quoteButton">Quote</button>
<div id="quoteBox">
</div>
Ken Haduch
@khaduch
@Biskupator - are you using Bootstraps navbar? There is a class navbar-fixed, I think? Check their documentation. If you are using Bootstrap v4, it might have changed.
achudoz
@achudoz
@zhuwei12 the thing that makes the quotes change is the $.ajaxSetup()
@khaduch do you know why ajaxSetup is not recommended?
Zhu Wei
@zhuwei12
thank u!
Ken Haduch
@khaduch
@achudoz - no, I don't - perhaps it is better to just add the cache: false to the $.ajax call itself? I could see where setting up some values like that you might inadvertently have them change without realizing it?
roeP
@roeP
@khaduch im tring to make it look like the example page, it has a lot of feature that will be usful, but i cant figure it out
achudoz
@achudoz
@khaduch yeah, that makes sense. thanks
CamperBot
@camperbot
achudoz sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: achudoz already gave khaduch points
roeP
@roeP
this is what i did so far, is it any good?
Ken Haduch
@khaduch
@roeP - I think that the example page makes use of a few Bootstrap features - using the jumbotron, the grid, etc. Not too difficult, once you get familiar with those. Start small and work your way up. A good idea is to try and do it on your own, but you can post your link here and ask questions for things that you cannot figure out.
Prateek Gogia
@reeversedev
I am unable to get any data.
Here's my code .
<!DOCTYPE html>
<html>
<head>
<title>Your Weather</title>
<meta charset="utf-8">
<link rel="stylesheet" href="">
</head>
<body>
<div>
<h1>The Weather</h1>
<div>
<p>
<span id="show-weather"></span>
</p>
</div>
</div>
<script src="jquery-3.1.1.js"></script>
<script src="custom.js"></script>
</body>
</html>
Ken Haduch
@khaduch
@roeP - it is looking pretty good so far, I would say?
Prateek Gogia
@reeversedev
$(document).ready(function(){
    function getCurrentWeather() {
        $.ajax({
           url: 'http://samples.openweathermap.org/data/2.5/weather/' ,
           jsonp: 'jsonp',
           data: {
               id: '2172797',
               appid: 'b1b15e88fa797225412429c1c50c122a1'
           },
           type: "GET",
           dataType: "jsonp"

        })
        $done(function(json) {
            $('#show-weather').text(json.coord.lon);
        })
    }
});
Can anyone please help?
roeP
@roeP
@khaduch i need to search the internet about codes? or try on my own using the only the challenges i did so far?
Ken Haduch
@khaduch

@reeversedev - I don't think that you put $done for that? I think that you include it within the object parameters for the ajax call? Maybe like this:

$(document).ready(function(){

        function getCurrentWeather() {
            $.ajax({
               url: 'http://samples.openweathermap.org/data/2.5/weather/' ,
               jsonp: 'jsonp',
               data: {
                   id: '2172797',
                   appid: 'b1b15e88fa797225412429c1c50c122a1'
               },
               type: "GET",
               dataType: "jsonp".
                done: function(json) {
                $('#show-weather').text(json.coord.lon);
            })
         }
    });

Although what you did might be an alternate way to do that? Want to post your URL?

Janina Pohorecki
@janepohorecka
What's causing the space between the form and inputs? https://codepen.io/janepoho/pen/oZvvKQ
Ken Haduch
@khaduch
@roeP --- probably a combination of both. You have a foundation of information through the lessons, but the "Read, Search, Ask" philosophy of FreeCodeCamp means that you have to go out and do some additional searching and reading, because they only give you a foundation. You have to build on that.
Janina Pohorecki
@janepohorecka
How can I get rid of the whitespace between and around the inputs?
achudoz
@achudoz
@roeP yeah that seems pretty ok. Only your link is not working and you have some redundant div tags. The link is probably not working because a big part of the page is one giant button
Prateek Gogia
@reeversedev
@khaduch Okay. Lemme try.
achudoz
@achudoz
@janepohorecka inputs have some default margins I think. Force margins to 0 via CSS