I am trying to dynamically change the actual HTML value attribute of an input using jQuery. Although using input.attr(\'value\', \'myNewVal\'); wor
This may be slightly off topic, but I have found that when I use the .data() function in jQuery, the value is set correctly, but the change isn't reflected in developer tools.
So,
$('#element').data('to-update', 'newValue')
In the developer tools (Elements view) still shows the old value.
But
$('#element').data('to-update')
returns 'newValue'