JSFiddle - React, Tailwind, and code Playground

by wookiehangover

HTML

<form>
    <select>
    <option value="try">Trying It Yourself</option>
    <option value="research">Doing Research To Learn</option>
    <option value="other">Other</option>
    </select>
    <input type="text" name="other-field">
</form>

JavaScript

var select = $("select"),
    input = $("input").hide();

select.change(function(e) {
    input[select.val() == "other" ? "show" : "hide"]();
});