Adding "step" attribute to input field
Hi,
I'm trying to add the "step" attribute to a already generated html number input field.
- jQuery(document).ready(function($){
- $( "#fieldname" ).attr( "step", "0.1" );
- });
But for some reason its not working.
This is what the fields looks like on page load
- <input id="fieldname" name="fieldname" class="class" type="number" value="">
And i would like to change it to:
- <input id="fieldname" name="fieldname" class="class" type="number" step="0.1" value="">
I'm also using Wordpress.