I use the jQuery UI spinner in my pages which are now required to be responsive, thus presenting the challenge of adjusting the width of my jQuery UI spinners dynamically.
Does anyone know of any way to do this?
HTML
<input type="text" id="myspinner" style="width: 50px" />
JavaScript
$(function(){
$("#myspinner").spinner();
});
SOLVED
Sorry, I was being a bit retarded and looking for a jQuery way around this problem but have since realized that I could have just adjusted the original input box's CSS width to achieve the desired effect as below
or if you'd rather use jQuery
Once this is called, the jQuery UI widget automatically resizes around the input box