This definitely should work. Here’s a demo. Make sure you have placed your code into a $(document).ready
:
$(function() {
$("#gate").val('gateway_2');
});
More Related Contents:
- Set select option ‘selected’, by value
- How can I show and hide elements based on selected option with jQuery?
- Select elements without any class [duplicate]
- JQuery data selector not updating with .data
- jQuery get selected option value (not the text, but the attribute ‘value’)
- Setting the selected attribute on a select list using jQuery
- How do I select an element with special characters in the ID?
- Can jQuery selectors be used with DOM mutation observers?
- jQuery Adding new option to select element doesn't pick up the string [closed]
- Use jQuery to change a second select list based on the first select list option
- jquery find versus context selection
- How to select last child element in jQuery?
- Number input type that takes only integers?
- How to use jQuery to select a dropdown option?
- How to get a cookie from an AJAX response?
- Making radio buttons look like buttons instead
- Cannot modify content of iframe, what is wrong?
- Difference between :hidden and :not(:visible) in jQuery
- How can I get the corresponding table header (th) from a table cell (td)?
- How to display an IFRAME inside a jQuery UI dialog
- Can I fade in a background image (CSS: background-image) with jQuery?
- Dynamic Facebook Open Graph tags possible?
- jQuery attribute selector for multiple values
- jQuery: selector (classname with space)
- How can I find the closest previous sibling with class using jQuery?
- How to preview selected image in input type=”file” in popup using jQuery? [duplicate]
- CSS for the “down arrow” on a element?
- jQuery – draggable images on iPad / iPhone – how to integrate event.preventDefault();?
- How to get form html() via jQuery including updated value attributes?
- How can I change text after time using jQuery?