javascript - JQuery to put select option text into an input -
i using code here, pulls out selected option value drop-down box named "attribute[466]" puts value input field id of text_qty_
jquery(function($){ var $idval = $('#text_qty_'); $('select[name="attribute[466]"]').change(function(){ $idval.val($(this).val()) }).triggerhandler('change') });
what can't figure out how text option selected rather value.
as added challenge select element contains drop-down box has randomly generated id attribute.
Comments
Post a Comment