I have a the following html piece :
&l
all you have to do is :
fValue = $(input).attr("store-id");
your snippet is trying to add to the 'value' attribute of a div (which does not exist)