I have the following html part:
<div onClick="javascript:getComments(this);" store-id="143568" class="CountryRow" style="padding: 4px;"><div class="flag flag_az"></div> Azerbaijan</div>
and I would like to create a jquery function to get store-id value. I have the following, but it does not work:
getComments = function(input) { fValue = $(input).val( $(input).attr("store-id") ); alert('the ID :'+fValue); }
can someone be kind enough to tell me what it is that i'm doing wrong.
source share