<tr>
<td>
Vendor
</td>
<td>
<select name="vendor" style="width:600px;" id="vendor">
<option></option>
<option name="third_party">Third Party</option>
<option name="cart">Cart</option>
</select>
</td>
</tr>
<tr style="display:none;" id="url_row">
<td>
URL
</td>
<td style="width:550px;">
<input type="text" style="width:590px;" name="third_party_url" placeholder="Third Party URL">
</td>
</tr>
Here's my JQuery:<script>
$(document).ready(function() {
$("#vendor").change(function(e) {
var value = $("#vendor option:selected").val();
if(value=="Cart") {
e.preventDefault();
$("#url_row").css("visibility", "visible");
}
else {
$("#url_row").css("visibility", "hidden");
}
});
});
</script>
What I want to do is create the JQuery that will reveal the "url_row" when the user chooses, "Third Party." And if they don't, "url_row" is either hidden on the select change or it merely remains hidden.Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.