Hi all,
I have a newbie question. You know how you can pass a variable to a
JavaScript function like this:
onload=getStuff(data)
Which is done via the BODY tag. Now, jQuery uses $(document).ready
(function() });
My problem is simple: I want to pass in a variable to the ready
(function(). When
Do you have some function inside of the ready() block that you could
pass the data to instead? Could you post some of your code?
On Sat, Jan 16, 2010 at 11:57 PM, Patrick kenned...@gmail.com wrote:
Hi all,
I have a newbie question. You know how you can pass a variable to a
JavaScript function
If your current code in the body tag is literally:
onload=getStuff(data)
then 'data' must be a global variable. You can reference this global
variable directly in any of your JavaScript code. For example:
$(document).ready( function() {
getStuff( data );
});
If that's not exactly what your
3 matches
Mail list logo