Goldberger: By that time your iframe already did load
Kardos: I thought .load fires instantly if it is attached after the load event.
Horger: Is it okay to put jquery scripts outside head?
Bohanan: In most cases it will run
Sarka: But its hard to maintain
Myerscough: Mohsen_ : it’s only by tradition you put scripts in the head
Goldberger: Nobody puts scripts in head anymore
Goldberger: Just before /body is the appropriate place
Goldberger: Unless you have something like modernizr which doesnt care about body content anyway
Calixte: It’s a wordpress website, so if I wanna put it inside head I’ve to put it inside header.php file. So if my script is just related to a single page.
Killmeyer: It will run in all pages.
Goldberger: That’s not how you do it in wordpress
Goldberger: You register and enqueue styles and scripts in your functions file
Goldberger: Prevents your plugins from double loading stuff that you already registered in your theme
Sheedy: Should I echo the script in the functions file?
Horine: SledgeDJ you still there? Got your problem sorted out or what?
Defrancesco: Trying to make load more button and append some elements. The things is when I click the button it doesn’t workno get request is send. What could be the problem? http://pastebin.com/UhetbmgL
Goldberger: It’s just .data – category
Scharmer: The event handler doesn’t react at all
Auston: ContentButton.data-category I was trying to fetch data-category attribute, that was a bug, yes
Escarcega: But that is not the root of the problem
Goldberger: Well that’s probably when the function stops
Pummell: I put console.log with some at the top
Belasco: Works now. I was get the contentButton by getElementById and not jquery. Didn’t know I can’t use them interchangeably
Ihm: You can, you just have to wrap the Element
Kluber: I see, anyway, thanks for the help
Malstrom: How do I convert my function here: https://pastee.org/q732p . to render in jquery mobile like this: http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_lists_split
Waldschmidt: What could be the problem ? when I use regular unicode letters, the response is good and no errors, but when I use something that utf8 supports, I get – http://pastebin.com/5qxke4WJ
Ihm: Akimb: maybe the has to be escaped? not sure
Dass: Hello all, I have a unique task where I need to modify content of a modal window, but the script must load before the content to be modified.
Quear: I don’t have access to the head nor can I include the script down near /body
Emano: I also am not able to use async or defer
Lacroix: Can jQuery help me accomplish this?
Ihm: You have control over the creation of the content in the modal?
Schmaling: Not exactly – there is a simple HTML editor that allows the script tag. The contents are boxed-in on the modal.
Ihm: So. your script must come first, and you don’t have control of what is generating the modal?
Cattano: Using the Chrome console I can write a function that performs what I want since the modal is fully loaded at that time.
Ihm: Then short of some sort of polling to see when it’s available to modify it, i’m not sure what you could do. You could do possibly a MutationObserver, but they don’t have widespread support yet
Ihm: Someone else may have a better idea
Golanski: I was researching an event listener
Ihm: Creation of dom elements doesn’t fire events