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
Ken Haduch
@khaduch
@pshiwakoti1 - those errors about Tether are due to a change in Bootstrap v4 where that tether library is required for the tooltips to work. (If you haven't found that.) I think that there must be a link that you can add to your JS settings to get it?
@pshiwakoti1 - if you go to your JS panel, add another resource, and go to the new textbox and type "tether", it will pop up a URL, just click on that and you should get it into your resource, and it should solve that problem?
@pshiwakoti1 - of course, if you don't need bootstrap.js for that particular project, you could just remove it.
Tyler Moeller
@TylerMoeller
Thanks @khaduch :)
CamperBot
@camperbot
tylermoeller sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2513 | @khaduch |http://www.freecodecamp.com/khaduch
Prakash Shiwakoti
@pshiwakoti1
I will remove Bootstrap
danraybernard
@danraybernard
Can someone help me figure out how to make the text "hey" appear over to the right of my navbar links? I had it...and then my comp crashed and forgot to save.
<nav class="container navbar navbar-inverse navbar-static-top"> <div style="width:50px float:right"> hey</div> <div style="float:left"><ul> <li><a href=#page1>About</a> </li> <li><a href="#page2">dsfdfdsf</a></li> <li><a href="">dsfsfsfe</a></li> <li><a href="">fsdfesfsef</a></li> </ul></div> </nav>
Prakash Shiwakoti
@pshiwakoti1
hi @khaduch can you please look at my code? http://codepen.io/pshiwakoti1/pen/XpvdYz
I believe if someone clicks on my My waether link, then it will return a json data.
I don't know what to do from here on
should I store it in a variable and access properties?
Mike Baker
@Bakermg
help
Tom
@moT01
@pshiwakoti1 that's probly one way to go, ...i would say to do it like you did when you got the ip stuff
whats up mike
Mike Baker
@Bakermg
need some help on the record collection function to update object
Tom
@moT01
pick what you want to set the value of and set it?
Prakash Shiwakoti
@pshiwakoti1
can i define more than 1 ready function in jquery?
Tom
@moT01
object[0].name = "me" ?
Mike Baker
@Bakermg
how to set the value from the args from the function
Tom
@moT01
@pshiwakoti1 i have never seen it, ...probly not good practice but i guess it may be possible
Prakash Shiwakoti
@pshiwakoti1
ok
Tom
@moT01
lemme find the challenge @Bakermg
Prakash Shiwakoti
@pshiwakoti1
What I am getting stucked is how to call a url and store the result in a variable?
Mike Baker
@Bakermg
you can put as many functions as you want in $('document').ready
Ken Haduch
@khaduch
@pshiwakoti1 - I don't have much time to work on this, but your "link" that you are displaying is not clickable - you are not really generating a valid anchor tag. What you are currently generating is a link that has no href= value - <a href="">http://api.openweathermap.org/data/2.5/weather?lat=XXXXX&amp;lon=-XXXX&amp;appid=XXXXXX&amp;units=metric</a> is the code (with the coordinates and API key X'ed out) - you have to put the URL into the href attribute for it to be clickable. But you really don't want to do that, although it might be a good step to show you the return data.
Mike Baker
@Bakermg
how are you calling the url
Prakash Shiwakoti
@pshiwakoti1
here is my pencode Mike
I need some guidance how to procced forward from here on
Ken Haduch
@khaduch
@pshiwakoti1 - if you change the code for setting the URL into your anchor to this: $('a').attr("href", url);, then you can click on the link and it will bring up the weather for that particular location - the JSON data will appear in the browser window.
Prakash Shiwakoti
@pshiwakoti1
I want to store it in avariable and only show some of the properties
can I do that
Tom
@moT01
@Bakermg so what's the problem?
Ken Haduch
@khaduch
@pshiwakoti1 - the next step is to make a $.getJSON request to get the weather info from the site - it will return the data and you can extract the appropriate information from it.
Tom
@moT01
i think what i said was pretty accurate, ...there's a series of tests you will need to do to find out how you want to update the object
Prakash Shiwakoti
@pshiwakoti1
I got the data on my browser @khaduch thanks
CamperBot
@camperbot
pshiwakoti1 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2514 | @khaduch |http://www.freecodecamp.com/khaduch
Prakash Shiwakoti
@pshiwakoti1
But I don't want to show this to the user
I want to store it in avariable before it gets displayed
when the user clicks a link I want to show maybe 4 properties of weather
Ken Haduch
@khaduch
@pshiwakoti1 - yes, so you need to change your JavaScript code to make a request using $.getJSON or something similar.
Prakash Shiwakoti
@pshiwakoti1
before I do $('a').attr("href", url); should I call $.getJSON
Mac
@itchick85
There is some strange thing my portfolio page is doing need help nothing I tried so far has fixed the issue. http://codepen.io/itchick85/pen/vgvrBX
Johnny
@jtan3
@itchick85 what's the problem?
Ken Haduch
@khaduch

@pshiwakoti1 - you can use code similar to this:

  function getWeather() {
    $.ajax({
      url: "http://api.openweathermap.org/data/2.5/weather",
      //jsonp: "jsonp",
      dataType: "jsonp",
      data: {
        //id: "2172797",
        APPID: "YOUR_APPID_HERE",
        lat: latitude,
        lon: longitude,
        units: "metric" // get units in Celsius
      }
    }).done(function(data) {
      console.log("data = " + data);
      console.log("JSON String data =" + JSON.stringify(data));
      $("#msg").text(JSON.stringify(data));
    });
  }

Although I haven't tried that exact incantation lately, what it does is to take the latitude and longitude values, along with your APPID (you have to tweak those settings as appropriate) and it should return the JSON data as data in the .done function. (You might want to review the details of this function on the jQuery site - http://api.jquery.com/jQuery.ajax/)

You can then extract the data, which you have to figure out the particulars of, but it will be a JSON object that will have the values as you saw in your browser when you clicked the link. Then you can write those out to the HTML document as you wish.

CamperBot
@camperbot
khaduch sends brownie points to @pshiwakoti1 :sparkles: :thumbsup: :sparkles: