I'm trying to update a data object with a new value. I have
开发者_如何学运维 if($("#ArticlesHolder").data(event.data.id) != null)
{
$("#ArticlesHolder").data(event.data.id, {name:event.data.name, nr:newNr, price:event.data.price, articlenr:event.data.articlenr});
}
Now I want to update a existing data object on $("#ArticlesHolder")
but I only want to update one value not all values. How do I, for example, only update the nr
to nr +1
?
I think it's possible to change a data value simply but somehting like:
$("#ArticlesHolder").data(event.data.id).nr = '52';
精彩评论