Mattila: Imho safest method is to encode your data to exclude a particular character, and use that that character as the separator. only way to guarentee a user does not provide that character. even if they do, it does not matter
Lopeman: Hey, I appreciate that you are being concerned but I thought it came across very defensive like I was mean. No offense.
Fisanick: Is it possible to do something on a checkbox that is being unselected right now? I mean you have three checkboxes, one is checked, when you unselect it only then, not when you select it to for example console.log something?
Bracks: No worries, its all good
Mattila: Ifohancroft: bind a change event to the checkbox
Hamai: Mattila: won’t that execute no matter if I check it or uncheck it?
Garms: Mattila , Bracks : thanks
Mattila: Yes, but you can check the state in it if you only want to execute on one of the two
Kauffman: That is what I need then. How do I check the state of it?
Mattila: Or :selected, i forget
Clampitt: And it will return false if it’s not checked?
Bracks: That will only fire when you click on your checkbox and its already checked
Mattila: What if it started off unchecked
Bracks: He said he didn’t want anything to happen if it wan’t checked and he was clicking it
Mattila: Ok, so it wasn’t checked and they check it
Mattila: I think it’s a potential hole, though if you did something like that on a delegate, i think you’d have something
Bracks: From a css standpoint its solid. It only fires when checked and the click event occurs. But I understand your concern, I typically use conditional checking like .is’:checked’ as well. I was just giving another option
Mattila: This is what i meant http://jsfiddle.net/zLcLamkg/ has both ways
Mattila: Notice the second only works on the one that starts off checked
Bracks: Looks like the :checked selector is only looking at the initial element state when DOM loads, not the new state of each change
Mattila: Yeah, it’s filtering to know what to bind on
Mattila: Its just that for a delegate it’s evaluated every time, not for the binding
Tully: Mattila: This is what I did http://codepen.io/ifohancroft/pen/rOOWbw and it works exactly the way I want it :3 Thank you
Lonn: Wait, no it’s change hahaha.
Mattila: Or maybe even $this.is’:not:checked’
Tron: Mattila: I know about the first and I didn’t know I could use :not:checked 😀
Aguado: Also, don’t use == unless you’re comparing to null or undefined.
Mattila: That’s a guess, dunno if it is valid
Rease: Don’t do that. invert the conditional.
Lopresti: Isn’t === for bit comparison like in other programming languages and == regular comperison?
Tonrey: So it is this way in JS as well or here it is = and ==?
Dussault: Ah so you mean I should use ===?
Wiren: Except not in this case ;
Schoepfer: Sorry I thought you meant that in JS for the == comparison you use =
Mattila: No need to compare a boolean to get a boolean result
Kobs: Http://jsfiddle.net/f8x689b7/
Pauling: No need for jquery objects to see if something is checked
Adelstein: Yes I know I can do it that way but I was just testing earlier so I did it whatever way just to see if it will detect the unchecking
Roudybush: Also, invert your logic to test for the truthy case in this instance.
Mattila: Heh, i think that’s one of my biggest pet peeves. dunno how many times i’ve seen if something return true; else return false;
Atleh: Yeah don’t test if === false.
Dennington: Invert like a gangsta
Willis: Hey guys, could anyone tell me why https://dpaste.de/BbT7 doesn’t seem to work?