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
NixonRichard
@NixonRichard
and i made this also
$("#weather").html("City: " + data.name
);
$("#temp").html("Temperature:" +data.main.temp);
$("#weather").append("<p>Weather: " + data.weather[0].main + "</p>");
}
but it doesnt return the temperature
Sorin Ruse
@sorinr
@NixonRichard have you closed this div: <div id="temp" class="center-div"></div> ?
NixonRichard
@NixonRichard
yes u can see here
<div id="weather">
  <div id="temp">
    <p class="center">Click the button to get your local weather.</p>
  </div>
  </div>
Sorin Ruse
@sorinr
@NixonRichard do not nest
<div id="temp"> within <div id="weather"> put it after because when you call $("#weather").html("City: " + data.name
); it overwrites all content inside id="weather div
@NixonRichard <div id="weather"></div><div id="temp"></div>
NixonRichard
@NixonRichard
oh
okay
:+1: @sorinr
Sorin Ruse
@sorinr
@NixonRichard great
NixonRichard
@NixonRichard
This message was deleted
but ic ant change the city s style
just the weather and temp
Sorin Ruse
@sorinr
@NixonRichard change $("#weather").html("City: " + data.name
); into $("#weather").html("<span class='city'>City: " + data.name+"</span>"
); and make a css class city to style it
NixonRichard
@NixonRichard
yeh i forgot that
NixonRichard
@NixonRichard
Hey @sorinr
do u know how to add weather animations based on the returned weather descriptions ?
buiphuking
@buiphuking
hi guys
how can i fix this error
Refused to execute script from 'https://raw.githubusercontent.com/shinnn/AudioContext-Polyfill/master/audiocontext-polyfill.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
Sorin Ruse
@sorinr
@buiphuking how do you link this lib?
buiphuking
@buiphuking
<script src="https://raw.githubusercontent.com/shinnn/AudioContext-Polyfill/master/audiocontext-polyfill.js"></script>
Sorin Ruse
@sorinr
@buiphuking try give it a type
buiphuking
@buiphuking
i did, same error
Sorin Ruse
@sorinr
@buiphuking like type="application/js" ?
buiphuking
@buiphuking
not error anymore but not working
Sorin Ruse
@sorinr
@buiphuking maybe its the way you are calling the functions in that lib
buiphuking
@buiphuking
@sorinr thanks
CamperBot
@camperbot
buiphuking sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 469 | @sorinr |http://www.freecodecamp.com/sorinr
Pratik Chaudhary
@abs-zero
does any one know how to use twitter tweet api?
Greg Duncan
@GregatGit
@AbsoluteZero273 if it is for the quote generator this web site has a good how-to for twitter http://gpiot.com/blog/elegant-twitter-share-button-and-dialog-with-jquery/
Pratik Chaudhary
@abs-zero
@GregatGit thanks!
CamperBot
@camperbot
absolutezero273 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 690 | @gregatgit |http://www.freecodecamp.com/gregatgit
Pratik Chaudhary
@abs-zero

@GregatGit ```js

<script>window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);

t._e = [];
t.ready = function(f) {
t._e.push(f);
};

return t;
}(document, "script", "twitter-wjs"));</script>```
Do I not have to use this at all?

window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function(f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));
.
Greg Duncan
@GregatGit
did you go to there demo page http://gpiot.s1.cotidia.com/twitter-share-demo/
@AbsoluteZero273 Yours looks very complicated - they provide a very simple work through
Pratik Chaudhary
@abs-zero
I got that from twitter's website itself
https://dev.twitter.com/web/javascript/loading
yeah theirs is simple :)
Greg Duncan
@GregatGit
@AbsoluteZero273 I couldn't get my head around twitter's example and was fortunate to find that one. It only takes about 10 lines of js and a little bit of html to tweet out
shweta rajput
@ShwetaRajput
hi everyone. i want too know about twich.tv project. can someone explain what i have to do?
to*
Dhruv Kumar
@IMDhruv
@ShwetaRajput What did you try and whats the error?
@ShwetaRajput you have to build something like https://codepen.io/FreeCodeCamp/full/Myvqmo/
Jack Lyons
@JackEdwardLyons
hey guys, i have a question -- how do you split an array into arrays?
like this
 ['a', 'b', 'c']  convert to
[['a'],['b'],[c']]