I have a the following html piece :
&l
This works perfectly:
getComments = function(input) { fValue = $(input).attr("store-id"); alert('the ID :'+fValue); }
http://jsfiddle.net/mHBuE/