Keeran: Hi all, how do I get the a child of $’#fastLeftNavCell ul li ul li’.eq3 ?
Szychowski: Siegfried check out the learning center :
Colindres: Szychowski: Okay, thank you
Szychowski: _TWG_ https://jsfiddle.net/Szychowski/hdju2tup/
Szychowski: _TWG_ are you maybe dynamically creating those anchors?
Ascher: Kopy.io is a sick pastebin
Szychowski: You can’t bind to things that don’t exist.
Artzer: Choose your color scheme ;_;
Szychowski: Try using event delegation instead.
Szychowski: Https://api.jquery.com/on/#direct-and-delegated-events and http://learn.jquery.com/events/event-delegation/ explain the idea.
Szychowski: _TWG_ the rough idea is you bind to a parent element that exists on pageload, then p*** a second argument to .on that’s the child selector for the thing you want to match on.
Steider: Szychowski: I actually had just found https://learn.jquery.com/events/event-delegation/
Freudenthal: Hi robert, hows going?
Szychowski: Good Freudenthal. How’re you?
Mcelwine: Szychowski: that worked like a charm. Thanks for the point in the right direction.
Szychowski: _TWG_ yeah definitely. delegation is a really awesome concept and will help you in a lot of future cases. I use it even when I might not be dynamically creating things purely because it helps decouple my markup from my js.
Finkley: Awesome. Good information to have robertmaxrees
Croteau: I must be doing something stupid
Szychowski: Window.location.pathname.”/can/”
Szychowski: In fact, window.location.pathname.”/can/”.$this.val, this whole line doesn’t make sense.
Pennisi: Damn. comming from php. my head is mixed
Abrell: Hi all, sorry to ask so many questions, I have a tricky one
Szychowski: Also – can isn’t defined anywhere.
Szychowski: Not sure if you intend it to be global or not.
Santaana: I’m trying to edit a select, which I can do no problem with .val However, the select is listening for an onChange which isn’t triggered when I use .val to set it
Hoffstetter: Any idea how I can fire the onChange?
Szychowski: Siegfried depends on how the event handler was bound.
Szychowski: Siegfried .trigger’change’ if it’s a jquery event listener.
Szychowski: Otherwise, https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events
Golladay: Szychowski: http://kopy.io/w5l1B
Szychowski: Then yeah, you’ll need to do some reading.
Tregre: No need, .trigger’onchange’ works 😀
Pry: Well makes sense since the html has an onchange property right?
Szychowski: Jquery events and native events exist in two different worlds, so it’s kind of a crapshoot,
Callaghan: I’ve done some JS mainly with node and react but never used jquery 😀
Szychowski: Jquery handles events on its own outside of the native DOM ones.
Uknown: This is all black magic to me
Szychowski: Hahaha, totally different – the DOM is much worse ;
Freudenthal: Is it common to be handed over a pdf with the mockups and a psd file with the ***ets and to go build a website?
Szychowski: Maybe not a pdf, but the PSD file isn’t uncommon from what I’ve seen.
Szychowski: PSDs are convenient for mocks i suppose.
Schiffmann: Must be doing something wrong again
Overbaugh: Only return object readystate1
Szychowski: That’s what you’re getting back?
Krob: Object {readyState: 1}
Thoburn: Is not doing the post
Szychowski: What does the network tab show you?
Bedingfield: I was expecting it to show the request on console