I have the following code for a normal select list:
$('.update-title')
.change(function () {
var title = $('option:selected', this).prop('title');
$("#modal_Title").val(title);
});
This seems to be getting triggered when the select is populated. Is there I can make this happen ONLY when a user goes in and manually reselects a different value?
The
changeevent is only triggered by the browser when the element gains focus, the value changes, and the element loses focus. That doesn’t happen when the element is initially populated, and I’ve never personally come across thechangeevent being triggered when the<select>is initially populated.It seems that you have some code somewhere that is programmatically triggering the change event handler on that element, because what you’re describing isn’t standard behaviour.