Zayas: Slereah: maybe replace click with something like: $do***ent.on”click”,”#elem”,function {.
Cordy: Im sorry, meant try $’.upload_url_list_button’.clickfunction {
Pariente: Oh, I already tried that
Gallup: And place it inside windows.ready?
Colarossi: Yes just wrap with $ do***ent .readyfunction {}
Ihm: Or shorthand $function{};
Dastoli: Http://pastebin.com/HcDPN0Ex
Ihm: Https://jsfiddle.net/rbxt2moe/
Derocher: Still not working with it, though
Paskow: Well the console just doesn’t display anything upon clicking the button
Ihm: Does the button exist at the time of binding?
Ihm: And have you confirmed that by console logging the selector?
Parsi: No, the script is binded when the wordpress starts up
Carosella: The button appears only when opening an iframe
Ihm: Console.log$’.upload_url_list_button’.length; at the start of that closure
Ihm: In relation to the iframe, where is this code, and where is the button?
Filipski: Http://i.imgur.com/d9SXVtr.png
Ihm: So the button is in the iframe
Ihm: Because selectors do not work across doms
Crousore: That logging just gives 0
Ihm: You need to put your logic on that page in the iframe
Ihm: Would be the easiest approach
Racedo: Any tutorial to be doing that in mind?
Chachere: Not that great at Jquery I’m afraid
Ihm: It’s just another page in the iframe. treat it as a normal page
Vieux: I tried to bind the script in the iframe itself, but it didn’t work unfortunately
Donath: Not sure it’s too easy to do in wordpress
Ihm: What did you do when you tried to bind in the iframe?
Bazemore: Wp_enqueue_script’upload_file_list’, get_template_directory_uri.’/js/upload_file_list.js’, array’jquery’, ‘1.0’, true ;
Bua: When loading the page within the iframe
Resse: Since that is the wordpress way
Ihm: Ok, so are you saying that wordpress is generating the contents of that iframe and you don’t have a way of putting a script on that included source page?
Bittick: Well the iframe is the one of the media manager window
Manweiler: I can add things to it but I don’t have quite direct control of it
Ihm: Ok, so we’ll go with the second approach
Ihm: I’m ***uming these are all on the same domain, yes?
Pizzolato: Currently everything on localhost
Ihm: Ok, so try this. after the iframe has loaded try running this
Selbe: I am working on a jquery-ui dialog, but the dialog messages gets attached to the body everytime I close it: https://gist.github.com/maasha/a7609fd91f34cc10c057427eba46efd7
Lush: If I’ve got an unknown number of images, I suspect I have to do an $.each. after doing this, how can I place them onto specific divs?
Dhosane: Hey all, I’m looking for information on when a specific feature in jQuery was updated. I’m talking about the ability to modify the type attribute of an input field with the attr method. Does anyone have any idea of what version that changed in?
Englander: Https://jsfiddle.net/Hosoi/t1ehvx3q/
Rosiak: Errr how can I run this?
Kine: Can I use a script tag to add it?
Ihm: For now try just sticking it in the console
Ihm: When the iframe is visible
Besares: ReferenceError: selectorForTheIframe is not defined
Ihm: Right, you have to change that
Ihm: That was pseudocode, 😛
Ihm: Maasha: when does that method get called?
Precythe: Quite sad that I have to do this for a living :p