Skip to main content

Rasmus Schultz

Member since Aug 3, 2011

Recent Blog Comments By Rasmus Schultz

  • Using State Change To Bind And Unbind Event Handlers vs. Handler Branching

    Posted on Aug 6, 2011 at 7:00 PM

    @bemson, "There is always a state, and it must always be managed" - of course, I just happen to find that the DOM, since it's there anyway, might as well be in charge of managing the state of the view, to the extend that this is possible or practical. You cite a lot of theory, but you ha... read more »

  • Using State Change To Bind And Unbind Event Handlers vs. Handler Branching

    Posted on Aug 5, 2011 at 3:15 PM

    @bemson, But your functions also fire when the element is accessible - which is all the time. You're just switching out the event handlers - you're not performing any checking to see if the function should execute. In fact, as stated, if you were to add a third function, you would need to make sur... read more »

  • Using State Change To Bind And Unbind Event Handlers vs. Handler Branching

    Posted on Aug 3, 2011 at 8:54 AM

    Another approach to maintaining form state, is using class-names - I posted a fiddle based on your example here: http://jsfiddle.net/Ps5ng/ This relies on the DOM for state, and jQuery live event handlers for the binding. There are two things I like about this approach: 1. You can easily inclu... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel