$(function(){....}) not firing when logged in

Permalink
I'm using a script (slider.js) that includes a function that is supposed to fire when the DOM is loaded. This works fine when I'm not logged in. However, when logged in the script loads but the
$(function(){....})
doesn't fire. Any idea what could be causing this? Firebug console shows no errors.

[Site location deleted]

 
martijnR replied on at Permalink Reply
I resolved this after reading:http://api.jquery.com/ready/. It was some kind of jQuery namespace conflict.

Changing the function call to:
jQuery(document).ready(function($){..}
avoids the conflict.
jordanlev replied on at Permalink Reply
jordanlev
This problem may have been caused by you including the jquery files on your own -- these are already included by C5 so if you also include them yourself it creates namespace issues like you've described.
martijnR replied on at Permalink Reply
Thanks for this.

I'm using a function that is not available in the standard jQuery files so I had disabled the loading of jquery.js and loaded jquery.1.4.2.js. Maybe it would have been better to just extend the old jquery script with the function of 1.4.2 I needed.
jordanlev replied on at Permalink Best Answer Reply
jordanlev
What do you mean by "a function that's not available in the standard jQuery library"? Like it's in a newer version of jQuery or a plugin? If it's a plugin you can just include that as a separate file -- no need to roll it into core jQuery. If it's something in 1.4.2, you could upgrade to Concrete 5.4.1 which now includes that version of jQuery.
martijnR replied on at Permalink Reply
I meant the function I needed was only available in a newer version of the jQuery ('core').

I noticed the new version of Concrete includes it and I no longer have to load the jQuery 'core' library manually.

Great!

Thanks,