$(".head-unreal-form-call").on("click", function() { var $this = $(this), type = $this.data('type') promise.then(function(content){ var $form = content.find('#orderUnrealForm'), $selectPackages = $form.find('#packages'); $selectPackages.val(type).change(); }) })