how do I search by ID and change "data-totalReplies" value?
<div id="newReply" data-totalReplies="'.mysql_num_rows($replyQuery).'"></div>
how do I search by ID and change "data-totalReplies" value?
<div id="newReply" data-totalReplies="'.mysql_num_rows($replyQuery).'"></div>
The data attributes are also a generic attributes of the HTML tags. So it can easily be alter with the generic attr() as follows:
$('#newreply').attr('data-totalReplies','new_values');