Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to set option size to select in html css

$('select').change(function(){
  var text = $(this).find('option:selected').text()
  var $aux = $('<select/>').append($('<option/>').text(text))
  $(this).after($aux)
  $(this).width($aux.width())
  $aux.remove()
}).change()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #option #size #select #html #css
ADD COMMENT
Topic
Name
3+1 =