Created
October 12, 2018 07:59
-
-
Save denisz/9615eb2d37a4e2dcb3db7dfed221fe30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".unreal-form-call").on("click", function() { | |
var t = $(this) | |
, e = t.data("period") ? t.data("period") : null | |
, i = ["Unreal", "Epic"] | |
, n = t.data("type"); | |
d.then(function(t) { | |
var s = t.find("#orderUnrealForm") | |
, r = s.find("#packages") | |
, o = s.find("#period") | |
, a = s.find("#period option") | |
, l = { | |
Basic: 0, | |
Standart: 1, | |
Optimal: 1, | |
Expert: 1, | |
Unreal: 2, | |
Epic: 2 | |
}[n]; | |
r.val(n), | |
i.includes(n) && a.each(function(t) { | |
t < 2 && $(this).hide() | |
}), | |
null !== e ? o.val(e) : o.val(l) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment