I have functionality that updated the input value in other way that typing into the input field (e.g. click a button and update the input to 'test value').
$('#search').val('test-value')
I need to trigger an event to update the width of the input field. I tried using jquery trigger with 'keydown', 'change' and 'input' events, but nothing happened:
$('#search').trigger('input')
I have functionality that updated the input value in other way that typing into the input field (e.g. click a button and update the input to 'test value').
$('#search').val('test-value')I need to trigger an event to update the width of the input field. I tried using jquery trigger with 'keydown', 'change' and 'input' events, but nothing happened:
$('#search').trigger('input')