Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Brook Riggio
    @brookr
    @mathowie: Nice project! Nicely highlights the value of keeping an eye on efficiency of algorithms.
    Stephen Fasano
    @sfasano
    I'm trying to execute a function only when a button is clicked. In this case trying to link the button with id="split" to the function "splitArr". Every time I refresh the page, my javascript is automatically executing this function even without me clicking the button. Can anyone help me out? I'm desperate at this point.
    $('#split').on('click', splitArr());
    For additional context, even if there is no other code in my js file, this will still execute the code inside splitArr() immediately upon refresh.
    Ivan Storck
    @ivanoats
    @sfasano could you put it on jsfiddle / jsbin to take alook?
    You'll notice that it autoruns the split and sort functions, even though they're only called within the .on(click) event handlers. I'm interpreting this as meaning that simply by binding the functions to a button, they're also automatically being called.
    Stephen Fasano
    @sfasano
    I may have figured this out. Instead of calling splitArr from the .on() event, I need to call an anonymous function that contains splitArr inside it. I still don't understand WHY that's the case, but trial and error has proven it to work.
    Ivan Storck
    @ivanoats
    yes… or you could pass splitArr as the parameter to the .on() method instead of invoking it like splitArr() - big difference.
    remember functions are just values in JS
    so if you look up .on() in jquery: http://devdocs.io/jquery/on the ‘handler’ is a value - either an anonymous function inline right there, or a variable that is a reference to a function
    how does that sound?
    JoeyHayden
    @JoeyHayden
    How are we supposed to submit (in Canvas) the assignment for the personalized growth plan? I've completed the survey and clicked submit with then prompted my with a save confirmation. How are we supposed to transfer that to the Canvas submission box?
    Ivan Storck
    @ivanoats
    The Canvas submission is for any extra comments
    JoeyHayden
    @JoeyHayden
    Awesome. Thanks.
    Gene Miller
    @bonyboy
    This might be something that helps others stay active during the break and maybe longer. https://deals.tuaw.com/sales/the-name-your-own-price-front-end-master-bundle
    Ivan Storck
    @ivanoats
    Interesting… thanks
    Everyone here has signed up for CodeOregon, right? ( http://codeoregon.org/ ) it’s free for any resident. Tons of stuff to keep doing on TeamTreehouse.
    Gene Miller
    @bonyboy
    @ivanoats CodeOregon is free to any resident for 2 years. After the first 60 days you must go in and register at Worksource Oregon. More information can be found here. https://teamtreehouse.com/forum/codeoregon
    Ivan Storck
    @ivanoats
    ok - what’s involved in registering for worksource?
    Do you have to be unemployed?
    Gene Miller
    @bonyboy
    I found this PDF that explains the process. You register with Worksource online and go into one of their offices to complete the registration. You do not have to be unemployed. https://s3.amazonaws.com/code-to-work/code-oregon/worksourceregtogether.pdf
    Mike (Mikey) Bedney
    @PolishZeus
    In your opinions, what would be better to continue: the Codeacademy site or treehouse?
    matt
    @mechlo
    I've been using both.
    Ivan Storck
    @ivanoats
    I think treehouse gets a bit more in depth
    Brook Riggio
    @brookr
    Codecademy has limited courses... go ahead an burn through those, then go deeper with the great variety of stuff Treehouse has.
    matt
    @mechlo
    I just signed up for the Git/Unix class on April 25th. Anyone else going to be there?