Welcome to WebmasterWorld Guest from 54.166.172.33
Forum Moderators: open
Unfortunately, the defs must go in (doc).ready because they contain jQuery calls
Also, all func defs & calls in external files run in ready() functions
I thought declaring it outside makes it global, and therefore available in the function
There's no MooTools or script.aculo.us or anything
but '$' is "undefined"
Do a [jsfiddle.net...] just with:
is this still the correct ready() syntax to use without noConflict():
jQuery(document).ready(function($) {...});
how does the script now know that $ = jQuery w/o that statement in there?
in the js block, and with jQuery library loaded, I get an alert with the following:
function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context, rootjQuery );
}
function(a,b){return new e.fn.init(a,b,h)}
Is there a preference for the ready() syntax?
func calls usually return 'undefined' unless the function is defined BEFORE the call
It gets tricky if I have one series of text effect functions in one file, and a series of different functions in another file, and the script alternates between the two types of text effect. Then there's a chicken & egg setup where each must go before the other at different times.