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
Xavier Velez
@JonSnow08
so lets say I had this
Japneet Singh
@japsuchiha
how to make a one page scroll using jquery ??
Anshul Jain
@ajain706
ok @JonSnow08
Xavier Velez
@JonSnow08
function madLib(adj, noun,){
var sentence =  "My " + noun + "is" + adj;
return sentence 
}
Don Price
@KingHippo
@CrumineCoder I get an error in console "CORS header 'Access-Control-Allow-Origin' missing"
Xavier Velez
@JonSnow08
if noun was dog and adj was cool return sentence would return "My dog is cool"
@ajain706 get it now?
Anshul Jain
@ajain706
yea ok @JonSnow08
Xavier Velez
@JonSnow08
@ajain706 give it a try and tell me what you get
Anshul Jain
@ajain706
yup bro thanks @JonSnow08
CamperBot
@camperbot
ajain706 sends brownie points to @jonsnow08 :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @jonsnow08 |http://www.freecodecamp.com/jonsnow08
Xavier Velez
@JonSnow08
@ajain706 don't forget to put spaces into your string or add a noun + " " + "is"
Anshul Jain
@ajain706
yes bro @JonSnow08
Xavier Velez
@JonSnow08
any problems let me know
Zeeshan Haider
@zeeshan72
I just finished the weather app.
Ben Line
@Benwebdev
Here for a while if anyone needs front end help :smile:
Rich
@richard-ball
How can I select the object I am hovering over?
this $(this.id).mouseover(function(){ $(this.id).hide(); }); doesn't work
bsandusky
@bsandusky
@richard-ball hereโ€™s an example of what you want to do: https://jsfiddle.net/zs45B/
@richard-ball You should be calling the event on โ€˜bodyโ€™ and then targeting the event target for the second function
Ben Line
@Benwebdev
@bsandusky your right ๐Ÿ˜ƒ๐Ÿ˜Ž
jadczakd
@jadczakd
This message was deleted
Ben Line
@Benwebdev
It's the url ๐Ÿ˜
readytocode123
@readytocode123
@Benwebdev i'm just playing with building creativecode.co using a template, but having trouble actually going through the process of developing a sustainable website.. like is there a good resource of what checklist of things i need to decide on and then build? what advice do you have so i can get more clarity going through building it or rebuilding it from start to finish?
Rich
@richard-ball
@bsandusky thanks
CamperBot
@camperbot
richard-ball sends brownie points to @bsandusky :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @bsandusky |http://www.freecodecamp.com/bsandusky
Damian Collier
@damianpcollier
Hi, Just having a go at the random quote generator.
Where can you pull the quotes from?
I've tried a number of places but just seem to get errors
Thanks
Darth Skywalker
@adityaparab
@damianpcollier goodreads.com has pretty good api for that
Rich
@richard-ball
How do I access an object within an array by name? e.g. [{name: bob}, {name:jeff}]
Darth Skywalker
@adityaparab

@richard-ball
by index?

like, assuming your array is called arr

var arr = [{name: bob}, {name:jeff}];

var myObj = arr[0];

console.log(myObj.name);
Additionally, you have syntax error (assuming bob and jeff are not variables declared somewhere)
it should be [{name: "bob"}, {name:"jeff"}]
RHCPsnow
@RHCPsnow
is it a bad thing if other people can see my API key
Darth Skywalker
@adityaparab
@RHCPsnow :I'd say, yes.
RHCPsnow
@RHCPsnow
Thanks
Rich
@richard-ball
@adityaparab I don't know the index.
Darth Skywalker
@adityaparab
Do you know name?
Rich
@richard-ball
yes
Darth Skywalker
@adityaparab
I see your question now..
You can iterate over array.
var myObj;
var name = "bob";
for( var i=0; i < arr.length; i++){
    if(arr[i].name === name){
        myObj = arr[i];
        break;
    }
}

console.log(myObj);
Darth Skywalker
@adityaparab
ES6 Equivalent
var arr = [{name: "bob"}, {name:"jeff"}];
var name = "bob";

var filtered = arr.filter(x=>x.name === name);

var myObj = filtered[0];
Rich
@richard-ball
thanks
How do i get the ID of the element that I am hover over?
Darth Skywalker
@adityaparab
What is the element that you're hovering?
div, span, label or something else?
you can bind an event to that type of element. like
$('div').on('mouseover', function(e){
    var t = e.currentTarget;
    console.log(t.attr('id'));
});