- This topic is empty.
August 21, 2013 at 9:41 am #147729
I’ve exhausted everything here and I’m hoping a fresh set of eyes can help!
I have a page that has an AJAX loader and a modal but, for whatever reason, I can’t get them BOTH to work! It seems to be the positioning of the jquery library but I’m stumped.
You’ll notice in the pages below that I simply moved the jquery call from line 20 to 42 to get either one to work.
click on the ‘save report’ button at the bottom and you’ll see the modal
the loading graphic doesn’t appear
jquery on line 42
click on the ‘job title’ in the table to sort and you’ll see the loading gif flash
the modal doesn’t work
jquery on line 20
Thanks SO much…fingers crossed :)
LenAugust 22, 2013 at 3:34 am #147793ChromawoodsParticipant
On test-modal.html: jQuery is included AFTER a bunch of other jQuery-dependent plugins, which causes a whole bunch of errors. I would start there. Include jQ before the plugins.
On test-loading.html: The dollar variable (
$) is used by some other function and is not used by jQuery, so no jQuery stuff that you do with $ will work there. If you want to use $ instead of using its alias,
jQuery, you can achive it quite easily. If all you need is to do stuff at document ready, then replace this:
Now you have passed jQuery to that scope as $ and it will not interfere with that other $ function.
I don’t know how much control you have over all the other code on that site, but one solution would be to find that weird function that has hijacked the $ variable and call it something else, but then you need to fix all calls to that function to be sure that you don’t break stuff in other places.August 22, 2013 at 1:20 pm #147888
I will give this a try…thanks so much!August 23, 2013 at 10:35 am #147960
Thanks for bailing me out Chromawoods!