I have a custom select menu which updates the value of its corresponding actual select menu when you click an option.
$listItems.click(function(e) {
e.stopPropagation();
$styledSelect.text($(this).text()).removeClass('active');
$this.val($(this).attr('rel'));
$list.hide();
});
The problem is, I have change events hooked onto the select menu which are not firing because the value is updated programmatically as opposed to onblur
or onkeydown
.
$(document).on('change', '.js-PropertyPaddingTop', function() {
const value = $(this).val();
$('.UIObject.is-selected').css('paddingTop', value + 'px');
});
I've also tried using the input
event but that doesn't work either.
$(document).on('input', '.js-PropertyPaddingTop', function() {
const value = $(this).val();
$('.UIObject.is-selected').css('paddingTop', value + 'px');
});
Any suggestions?