Skip to content

Instantly share code, notes, and snippets.

@DeskWOW
Created May 4, 2015 15:59
Show Gist options
  • Save DeskWOW/4af6ce21dbe428a87220 to your computer and use it in GitHub Desktop.
Save DeskWOW/4af6ce21dbe428a87220 to your computer and use it in GitHub Desktop.
<script>
$(function() {
$(".input-block select, .input-block input, .input-block textarea").on("change keyup", function() {
$("ticket_labels_new").val("");
var labels = [];
if ($("#div-inquiry-type select").val() == "Mobile App Support" && $("#div-platform select").val() == "Apple iPad" && $("#div-app select").val() == "Big Cat Week: Quest for Survival") {
labels.push("T- Channel");
}
if ($("#div-inquiry-type select").val() == "Mobile App Support" && ($("#div-platform select").val() == "Apple iPad" || $("#div-platform select").val() == "Apple iPhone or iPod Touch" || $("#div-platform select").val() == "Android Phone (any)" || $("#div-platform select").val() == "Android Tablet (any)") && $("#div-app select").val() == "Nat Geo TV") {
labels.push("T- Channel");
}
$("#ticket_labels_new").val(labels.join(","));
console.log($("#ticket_labels_new").val());
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment