KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a select menu that triggers an AJAX request once one of the options has been clicked. I need to trigger a click event on the relevant option from a link. So I have code similar to the below, and although it changes the value of the select, it doesn't simulate a click: $('#click').click(function(){ var value = $(this).attr("rel"); $('#select').val(value); return false; }); <select id="select" name="select"> <option>Select...</option> <option value="1">Option 1</option> <option value="2">Option 2</option> </select> <a href="#" rel="1" id="click">Click for option 1</a>
Tags (comma-separated)
Save Edits
Cancel