Kuder: Quick question, is it faster for me to so removeAttr’disabled’; directly or check if it has the attr?
Takenaka: Shouldn’t be an issue either way
Sipper: Correction, ABM_Dan Quick question, is it faster for me to do removeAttr’disabled’; directly or check if it has the attr?
Takenaka: But checking first is probably faster.
Takenaka: But the performance difference will be negligible.
Schreur: The question is, is the check done internally?
Gangler: Would prop setting to false be faster?
Takenaka: The performance difference will be negligible either way.
Slusar: I haven’t gotten used to using prop, the few times I tried, it ended up being too inconsistent for me.
Takenaka: It’s just accessing the properties on the underlying DOM object.
Takenaka: So it’s generally what you want.
Catts: Do you guys know if you can use .on for custom events?
Leather: Gangler any reason why this wouldn’t work though? I don’t see the console.log http://hastebin.com/kizaviceri.js
Gangler: Ok, i have to share this with the room, cause this is the weirdest series of texts i’ve ever gotten
Gangler: Roommate: So are you purposely keeping a bird trapped in your toilet?
Gangler: Roommate: I let the bird outside and flushed the toilet which stank horribly.
Gangler: Roommate: Yeah that was what I thought. That is a true story though and just happened.
Gangler: To which he sends me a pic of it recovering outside
Gangler: I mean that’s crazy even for arkansas, 😀
Rupard: Can you remove an event handler with the callback function of the event?
Gangler: Yeah, with offevent, handler
Gangler: Provided it was attached with on
Thoene: OK, here it is https://jsfiddle.net/0rcey3vo/3/
Kulish: Line 16 does not turn the event off. Line 17 does not remove/add cl***es.
Ballard: OK, there is no .center lemme fix
Gangler: And fwiw i’d use delegates for what it looks like your trying
Zingale: Https://jsfiddle.net/0rcey3vo/4/ OK now there is a center but the .off still doesn’t work, nor does the cl*** replacement.
Gendreau: Folks; I completely forget my jsFiddle username: does anyone know how I can get it? The p***word reset uses email address, but the emails sent back/forth don’t include my username :/
Gyurko: It’s been a while since I’ve used it so I forget it, but I need a saved Fiddle under that profile
Gangler: Seaoftea: take a look at this and see if it gives you any ideas https://jsfiddle.net/0rcey3vo/5/
Gangler: Monk3y: i believe there is a jsfiddle room on this server. check the /list
Surrey: Yeah I did and there wasn’t- . urgh. /list jdfiddle. My bad.
Cerutti: How might I trigger a function when enter is pressed, but if and only if a certain thing is focused?
Gangler: Be specific, what do you mean by ‘pressed’?
Gangler: Bind on the element, or delegate bind on a parent of the element, on the keyup event and then check if it was the enter key
Bart: Thanks, Gangler that does give me a better idea. I still don’t get why the cl*** replacement wasn’t working in my earlier example, that was driving me nuts more than anything.
Gangler: Seaoftea: this approach is better as your not juggling bindings
Jubinville: Can you explain why when the .full-menu has a click event handler rather than just the divs of the full-menu? If you click the edge of the menu it it returns all of the innerhtml : https://jsfiddle.net/0rcey3vo/6/
Takenaka: Ah, so if I click on the darker-green area it gets the all that text?
Peckens: I meant, why is the event handler applied to the whole element, instead of just the divs