[jQuery] Re: declare variable

2009-05-14 Thread Peter Warnock
No. $thisCell is initialized with a null value in the current scope. - pw On May 13, 11:12 pm, runrunforest wrote: > Hi, > > I see this line in a plugin > > var $thisCell, $tgt = $(event.target); > > does that mean: > > var $thisCell = $(event.target); > var $tgt = $(event.target);

[jQuery] Re: dealing with a post (json) callback

2009-05-13 Thread Peter Warnock
[ ] is an array literal, like { } is an object literal. var obj = json[0]; You shouldn't use eval on JSON. If you specify 'json' as your return type, jQuery will safely eval valid JSON. - pw On May 12, 9:05 pm, sneaks wrote: > hi, in firebug my callback data(object) is like so: > > [{"produc

[jQuery] Re: How to parse?

2009-05-12 Thread Peter Warnock
$.get('/endpoint/', '', function (html) { $(html).find('.selector').appendTo('.target'); }), 'html'); On May 11, 3:23 pm, "cstolwor...@gmail.com" wrote: > I have an ajax call that will be returning a large chunk of HTML.  The > thing is that this HTML needs to go to several different places on