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
Chi
@chiyc
@Pendramon Do you have the rest of the code?
Pendramon
@Pendramon
Everything else is correct i am 100% sure 1 sec i'll get it for you
Pendramon
@Pendramon
@chiyc nvm i got it. Had it as itemAmount = document.getElementById("itemInput").value; and so on... just changed it to document.getElementById("itemInput") and did (itemAmount.value itemCost.value) - ((itemAmount.value itemCost.value) - discountAmount / 100)
@chiyc Thanks for responding tho really appreciate it
CamperBot
@camperbot
pendramon sends brownie points to @chiyc :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @chiyc |http://www.freecodecamp.org/chiyc
Chi
@chiyc
Oh, cool. You’re welcome! It’s awesome you figured it out!
Marc
@MWBauer
Hey everyone
er.....anyone
chadcuomo
@chadcuomo
Hello
Liang-Shih Lin
@ll931217
Lol hello @MWBauer
Bogdan
@oblanao
Hello, just finished my first D3 project - Simple Bar Chart. Check it out here: https://codepen.io/oblanao/full/aVrooX/ Any feedback welcome! Thank you very much
alpox
@alpox
@oblanao Looks good :-)
Only one little thing: If you move your cursor too fast from the left to right, the tooltip won't show up because the pointer event gets captured by the previous tooltip.
Add .style('pointer-events', 'none') to the tooltip to make it work :-)
Bogdan
@oblanao
@alpox thanks for the tip!
CamperBot
@camperbot
oblanao sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1489 | @alpox |http://www.freecodecamp.org/alpox
dinesh
@1532j0004kg

$(document).ready(function(){
  $("button").click(function(){
  if(navigator.geolocaion)
    {
      navigator.geolocation.getCurrentPosition(function(position){
        var lat = position.coords.latitude;
        var lon = position.coords.longitude;
        $.ajax({
          url : 'https://fcc-weather-api.glitch.me/api/current?lat='+lat+"&lon="+lon,

          success : function(result){
          var ourData = result.name;
          $("#select").html(ourData);
        }
        });   
      });
    }
  });
});
guys,can u please tell y this is not working?
Markus Kiili
@Masd925
@1532j0004kg What is geolocaion ;)
dinesh
@1532j0004kg
ohh yes!!!
hehe!
@Masd925 But still its not showing the right answer.
$(document).ready(function(){
  $("button").click(function(){
  if(navigator.geolocation)
    {
      navigator.geolocation.getCurrentPosition(function(position){
        var lat = position.coords.latitude;
        var lon = position.coords.longitude;  

        $.ajax({
          url : 'https://fcc-weather-api.glitch.me/api/current?lat='+lat+"&lon="+lon,

        success : function(response)
        {
          var ourData = JSON.parse(response.cod);
          $("#select").html(ourData);
             }
          });   
       });
     }
  });
});
Markus Kiili
@Masd925
@1532j0004kg Try to console.log those callback parameters and variable values.
dinesh
@1532j0004kg
@Masd925 ok marks i will try and tell u.
it actually display nothing.!!!
Markus Kiili
@Masd925
@1532j0004kg There is an error on the browser developer tools console (F12 on most browsers).
dinesh
@1532j0004kg
Is this shows the right answer?
dinesh
@1532j0004kg
what i want to do? @Masd925
Stephen James
@sjames1958gm
@1532j0004kg If you do something like this you can start to see the data - then you can decide what data you want from result and how you want to show it
document.querySelector("#weather").textContent = JSON.stringify(result);
dinesh
@1532j0004kg
@sjames1958gm @Masd925 thanks
CamperBot
@camperbot
1532j0004kg sends brownie points to @sjames1958gm and @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 8757 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
:star2: 4596 | @masd925 |http://www.freecodecamp.org/masd925
dinesh
@1532j0004kg
Now its working good!
Markus Kiili
@Masd925
@1532j0004kg :+1:
Stephen James
@sjames1958gm
@1532j0004kg :checkered_flag:
tundeiness
@tundeiness

hi campers. So i'm apparently doing something wrong with this code: the searchValue can't seem to store the value retrieved from the input box. Any help?

<input type="text" size="20" maxlength="30"name="search" placeholder="Search Wikipedia" Id="searchstring" class="sTerm">

that is the html code. The below is the Javascript code:

var searchValue = $('#searchstring').attr('searchstring');

any heads up on this? Thanks.

Sulaiman
@suli-g
@tundeiness The javascript looks like you're trying to get an attribute of "searchstring" from $("#searchstring") and the attribute "searchstring" doesn't exist.
What you want is val(), since you want the value of the input box, and not attr('searchstring') (which would work if your input box had a searchstring="blah" on it)
Chuck Pierce
@ChuckPierce
also id is capitalized it looks like
tundeiness
@tundeiness
@suli-g did .val() once...didn't work that time, but i will try again
@ChuckPierce yes it is sigh
tundeiness
@tundeiness

@suli-g so I did this:

var searchvalue = $('#searchstring').val()

and i'm getting empty string?

Chuck Pierce
@ChuckPierce
is there anything in the input?
Stephen James
@sjames1958gm
@tundeiness Are you running that code in an on change event handle, so it runs after input is in the element?
Onome Sotu
@onomesotu
Good evening all
Can anyone confirm why this code gives me syntax error on the console?
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
@onomesotu Good evening :)
Onome Sotu
@onomesotu
let(a = 2){ console.log(a); //-> 2 }