[Solved] Search box placehoder text should change when an option is selected from a drop down list
You need to attach a change event to the select box. In it you grab the text from the selected option and set the placeholder attribute on the search box. var select_designatfirst = $(‘#select_designatfirst’), empSearch = $(‘#empSearch’); select_designatfirst.on(‘change’, function () { empSearch.attr(‘placeholder’, ‘Search ‘ + select_designatfirst.find(‘:selected’).text()); }); jsFiddle example That said, unless the search box … Read more