1.0-beta will return jQuery extended nodes in all callbacks. But until
then - DOM nodes are always returned. So to use .children you need to:
On 21 Окт, 12:59, Brendon Muir <
bren...@spikeinsights.co.nz> wrote:
> Hi Ivan, yep I have tried that code (though thank you for pointing out the
> attribute thing. I'm a prototype boy so I'm still getting used to what's
> different in jquery, I had a feeling there was a 'good' way to set
> attributes.
> The ajax call returns some json:
> {"href":"4-spike/eportfolios/8-new-eportfolio","id":112}
>
> and this code is executed on a successful return:
>
> success : function (data, textStatus) {
> NODE.id =
data.id;
> NODE.children("a:eq(0)").attr("href", data.href);
> TREE_OBJ.rename(NODE);
>
> }
>
> I call the rename because I custom-set the name of the node when it's
> created. When the href line is there the rename function never gets called.
>
> Actually I keep forgetting Safari doesn't tell me the JS errors, I tried in
> Firefox and got:
>
> NODE.children is not a function
>
> also TREE_OBJ.rollback is not a function
>
> That's for the rollback problem. I thought that perhaps it's because I use
> the prototype libraries too so I disabled those and it makes no difference.
>
> Anyway, I hope i've given you enough information :) Please let me know if
> you require any more :D
>
> Cheers,
>
> Brendon
>