Reputation: 67
I have a tiny bit of code thats meant to show a javascript alert when a select list is changed value, but it doesnt seem to be working, could anyone give me a hand and let me know where im going wrong.
<script type="text/javascript">
$(document).ready(function(){
$("#sources").change(function(e) {
alert('This is what an alert message looks like.');
});
});
HTML for the select is as follows:
<select name="sources" id="sources" multiple="multiple">
<option value="">please select</option>
<option value="5">Seek</option>
<option value="6">friends</option>
</select>
Upvotes: 0
Views: 1368