by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 20:09
    @krisb1220 banned @Gastony
  • May 14 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:38
    @bjorno43 banned @real-action
  • Feb 01 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 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
NixonRichard
@NixonRichard
ah that s mine
nevermind
lol
Pranay Kumar
@pranaykumar389
Hi Everybody!
I'm Pranay Kumar. I done with My 2nd Project build a personal portfolio please have a look over here https://rudrapranaykumar.github.io/MyPortfolio/
Please comment good and bad and mostly suggest me for more improvement.
Thank you
Harry Adel
@harryadel
@rudrapranaykumar lol why don't you just show us your codepen directly?
Chris Cullen
@123xylem
http://codepen.io/123xylem/pen/JKqYZY?editors=1010
Hi could you help with my .click function.. WHy its not showing text in the div on click?
Harry Adel
@harryadel
@123xylem aren't u mssing a "}" ?
you didn't end your if statement, I suppose
there's only one "}", and it belongs to the click function
Chris Cullen
@123xylem
Sorry its also I was using a different selector to outputter

@Harry97

var userX=1;
$("#box").click(function ()
               {
  if (userX>0){
    $("#box")..THIS BOX.text("X");????????????????????????????

  }
});

Is ther a way of me saying the above with box to apply to all boxes?

Harry Adel
@harryadel
Well, I've not taken a deep look at your code, but if you want to apply something to couple of elements; why don't you assign a class to them and then call it?
so instead of "#box" maybe ".box"?
Sorin Ruse
@sorinr
@Harry97 try: $(".box").on('click', function () {here your logic});
Harry Adel
@harryadel
@sorinr @123xylem
Chris Cullen
@123xylem
@Harry97 @sorinr nice one
NixonRichard
@NixonRichard
@sorinr
why did u comment
// keys.forEach(function(key) {
// html += "<strong>" + key + "</strong>: " + val[key] + "<br>";
// });
these ?
Chris Cullen
@123xylem
@sorinr When I click them my X moves the box and I dont know how to style the X
Sorin Ruse
@sorinr
@123xylem i know. you should look at your css to fix that behaviour
Chris Cullen
@123xylem
@sorinr ive managed to style it but not sure why text is moving them
Sorin Ruse
@sorinr
@NixonRichard there is no need to loop twice as you can grab the info from the first loop
NixonRichard
@NixonRichard
hey what does the $ character mean
Sorin Ruse
@sorinr
its the abbreviation of jquery
instead of writing jquery.getJSON for ex you just write $.getJSON
it supposed that you have already loaded jquery lib
NixonRichard
@NixonRichard
okay
Phanindra M
@PhaniMaddi


$(document).ready(function(){

  function getMyLocation() {
    if(navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(getLocation);
    } else {
      alert("Oops, no support");
    }
  }

function getLocation(position) {
  var lt = position.coords.latitude;
  var lg = position.coords.longitude;
  getData(lt, lg);
}
  function getData(lati, longi) {
    var durl = "https://api.forecast.io/forecast/";
    var apiKey = "2e591f122507ef51a781deaff8643744";
    var weatherURL = durl + apiKey + "/" + lati + "," + longi + + "?callback=?";

  $.getJSON(weatherURL, function (data) {
    var conditions = data.currently.summary;
    var tempF = data.currently.temperature;
    var tempC = Math.floor((tempF - 32) * 5/9);
    var icon = data.currently.icon;
    var skycons = new Skycons({"color": "#f3e5f5"}); //this line generates the set of Skycons, and also changes the default color to a hint of purple
    skycons.set("icon1", icon); //this first points to the <canvas> element with ID "icon1," and the sets the var icon above to it
    skycons.play(); //and the animation starts!
    $("#currentWeather").append(conditions);
    $("#currentTemperature").text(Math.floor(tempF));

   });
  }
});
not getting data back from forecast.io
whats wrong with this code?
Harry Adel
@harryadel
navigator.geolocation isn't working anymore
Chris Cullen
@123xylem
@Harry97 http://codepen.io/123xylem/pen/JKqYZY?editors=1010 can you give me ahint why my boxes jump onclick input?
Phanindra M
@PhaniMaddi
what is the alternative?
Harry Adel
@harryadel
using the users ip
hold I'mma give a sample

@phanther8 ```$.getJSON("https://jsonip.com/?callback=?", function(user){
var ip = user.ip;
console.log(ip);

  var ipGeo = "https://freegeoip.net/json/" + ip;

$.getJSON(ipGeo,function(location){

var long = location.longitude;
var lat = location.latitude;

```

NixonRichard
@NixonRichard
@sorinr and what is <br> ?
Harry Adel
@harryadel
and then you'd proceed calling the weather api like you were doing
Phanindra M
@PhaniMaddi
Thanks @Harry97
CamperBot
@camperbot
phanther8 sends brownie points to @harry97 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for harry97
Harry Adel
@harryadel
@123xylem I'm not an expert, but I'mma take a look
Sorin Ruse
@sorinr
@NixonRichard you put them there. it adds a line feed
Sorin Ruse
@sorinr
@Harry97 add overflow: hidden; to your .box class
Harry Adel
@harryadel
@123xylem sorin, is right using overflow:hidden would fix the issue
@sorinr with all due respect, using overflow is a nice cover up, though, but it's really fixing the root of the problem
I'm thinking that this is caused by the type of element he is using to insert is text, am I right?