I mean im guessing i can.

 
Cazel: Im able to use console.log on a selector, but when i got to add on’change’. nothing happens i cant bind an event

Kettlewell: It ignores it completely

Szychowski: Gsham try to console.log$’someselector’.length;

Ferdinandsen: Its a dropdown select tag

Krystek: I guess its not avaliable yet?

Szychowski: Is your code in a do***ent ready?

Rosky: I tried htat one before.

Szychowski: Is the element dynamically created?

Kalupa: I can try again. it in function ${}jQuery

Szychowski: That’s not a do***ent ready.

Yarbro: Im attaching on to a script that already exists so i may need to make a seperate ready funciton

Szychowski: That sentence makes me worry.

Marschke: Im using WordPress customizer

Mosson: It runs the script when changes happen

Weidner: And the script is being output in the footer

Reamy: So why should it need do***ent ready

Szychowski: You didn’t give me any details about your setup, so there’s no way for me to know what to suggest.

Kirtner: What info can i give you?

Szychowski: I get the feeling the selector is wrong or your element is getting dynamically created.

Euton: Probably the latter. my script works if i put it in the console

Silleman: After the page is rendered

Szychowski: Either way, you might need to use delegation or wrap your code in a doc ready.

Greenburg: Still the length is 0 after do***ent is ready

Szychowski: Is the element made in an ajax callback or something like that?

Debella: So i guess its being updated dynamically but i cant create an event until after that

Szychowski: Actually, you can bind.

Szychowski: You just bind to an ancestor that DOES exist.

Prashad: Maybe. its done by WordPress. its beyond my knowledge

Monk: I tried select.on’change’, ‘select’

Szychowski: Try selecting parents and see which one exists on pageloda.

Szychowski: Right, just doing that doesnt’ guarantee anything.

Szychowski: I would avoid it if possible, but if you have no other option.

Pfeiffenberge: Grr body doesnt either work.

Szychowski: Then you have another problem.

Szychowski: And something is very broken :

Ekmark: Hmmm. there must be a logical explanation. body.length returns 1

Stroope: So i know htats wokring

Simons: Now im trying $’body’.on’change’, ‘#customize-control-top_layout select’, function {

Rubalcava: There are other selects on the page

Szychowski: I’m not saying leave it like that

Szychowski: Gotta troubleshoot, yo :

Turnbaugh: I understand i just didn’t want to mess with other stuff. ok yeah no nothing

Szychowski: Then you have something else fundamentally broken in your page.

Worlie: Well im not getting an errros and all other js sowkrs

Szychowski: What happens if you put a console.log before your binding?

Leinen: Console.log what? just like that? nothing

Szychowski: Just make sure you can see it.

Szychowski: Then yeah, something is fundamentally broken.

Darvile: The javascript file is output inside an iframe

Spargur: I have no way of reaching the thing i want

Szychowski: Unless it’s cross-domain

Szychowski: If the iframe and parent window are on the same domain, you can access the parent window from withinthe iframe.

Szychowski: Http://stackoverflow.com/questions/726816/how-to-access-iframe-parent-page-using-jquery

Armson: I mean im guessing i can use wp.customize objecrt whcih they create but i cant find any selector in there