问题描述:

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';
相关阅读:
Top