[jQuery] Re: passings variables to callback functions

2008-06-10 Thread karlo_ubc
Thank you Michael. Exactly what I was looking for. On Jun 9, 8:17 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote: > What you're looking for is called a closure. Read up on them - they are one > of the most useful features in JavaScript. Closures aren't specific to > jQuery - you can use them in an

[jQuery] Re: passings variables to callback functions

2008-06-09 Thread Michael Geary
What you're looking for is called a closure. Read up on them - they are one of the most useful features in JavaScript. Closures aren't specific to jQuery - you can use them in any JavaScript code - but jQuery code tends to make good use of them. For your code, I assume that "photo" is an array of

[jQuery] Re: passings variables to callback functions

2008-06-09 Thread Andy Matthews
Every jquery method includes an optional callback that you can explicitly call: $('#photoholder').append(imgdiv, function(){ // do something here }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of karlo_ubc Sent: Monday, June 09, 2008 3