Support

Account

Home Forums Backend Issues (wp-admin) Range Values not working on back end Reply To: Range Values not working on back end

  • I’m not entirely sure why my previous code wasn’t working but it looks like that truncated version actually does the job I need.

    Old Code that was returning an empty value

    $(document).ready(function () {
    	if($('#range-id input[type=number]')){
    		$(this).change(function(){
    			$(this).val(10);
    			console.log($(this));
    			alert($(this).val());
    			;
    		});
    	}
    });

    New Code that works

    $(document).on('change', '#range-id input', function() {
    	alert($(this).val());
      });
    }