Jquery data function remove null from start of string
I have something like this:
<input id="zip_code" type="text" value="" data-existing-value="09458" name="zip_code"/>
I am trying to get the existing zip code value from a data parameter using:
$("#zip_code).val($('#zip_code').data('existing-value'));
And for some reason the null is removed ... and all I get for the textbox value is "9458" with no leading zero ...
How can I store zero?
+3
source to share