Linked Questions
18 questions linked to/from jQuery select change event get selected option
1055 votes
17 answers
2.4m views
How can I get the data-id attribute?
I'm using the jQuery Quicksand plugin. I need to get the data-id of the clicked item and pass it to a webservice. How do I get the data-id attribute? I'm using the .on() method to re-bind the click ...
50 votes
4 answers
16k views
jquery find versus context selection
Having the following html snippet <div class="something"> <p>Some text</p> </div> <div class="somethingElse"> <p>some other text</p> </div> I ...
1 vote
3 answers
20k views
How to add onchange event on ajax?
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btn")....
2 votes
6 answers
3k views
Jquery change event not fired when using selected attribute on select item
I have a HTML code generated dynamically from a model using .NET MVC. Between the field there is a select with selected option (based on the data from the model). <select class="myClass" data-val="...
3 votes
4 answers
2k views
Create options onClick attribute
This is the idea: When I click on "word1" (or "word2") the select tag shows me the options. Once I click on one of the options, my script change "word1" (or "word2") whit the option. I can update the ...
1 vote
2 answers
6k views
jQuery val() not working properly on dynamic <select> with Aloha Editor
I am creating a dynamic <select> element through jQuery append() function, but I cant seem to get the correct selected value. I always get the first option, which is 1. I am trying to configure ...
0 votes
1 answer
6k views
auto populate values for text fields in jsp from sql server database
i have a table called Members in sql server like this: MemberId MemberName MemberAddress City Pin OpeningDate ClosingDate InstallmentAmount Status 100 Abilash Hebbal Mysore ...
-1 votes
2 answers
3k views
Jquery change the variable value if select field change
oke i have select field <select id="select" required name="bank" > <option value="cash">Cash</option> <option value="debit">Debit Card</option> <option value="...
0 votes
5 answers
207 views
How do I remove a select option from identical select lists 'b' and 'c' if it's chosen in select list 'a'? [closed]
I know the title isn't very descriptive but I hope i can clarify my problem here: I have multiple identical select dropdowns. Now, what I wan't to do is to remove an option from all other dropdowns if ...
0 votes
1 answer
651 views
Using $this keyword to add/remove class on onChange using jquery
Here I am trying to add a few classes in this ".ingradient" class element when ".tt-select" select changes. So, I was almost there. But when I select the option, there is a list of ...
0 votes
5 answers
328 views
How to make one of the selected options in a drop-down list of an HTML form add a text input?
I have the following code: <label for="city">City</label> <select id="city" name="city" required> <option value="">Select city</option> <option value="city1">...
0 votes
1 answer
388 views
JQuery Mobile: when an option is selected: do something. (show/hide element)
i have been struggling with this for the past 6 hours but i can't find a solution. I'm using jquery mobile 1.4.5. I have a select with 5 options. They are all selected and when one is deselected i ...
-2 votes
1 answer
266 views
Add a list item by click a list in Laravel
How can I make input modal box or another way by Laravel Blade? My goal is that if I click to insert new list item in the list, then modal input box show. <div class="form-group col-sm-4 col-lg-4"...
5 votes
2 answers
100 views
Event trigger on <option> doesn't work on webkit
I want to add an event trigger on a drop-down <select> list. Example (jsFiddle): $( document ).ready(function() { $('.lorem').click(function() { alert('ipsum'); }); }); ...
-1 votes
2 answers
130 views
JavaScript not picking values up in select with options
Searched on Stack overflow (jquery select change event get selected option) and trying use the code but not getting any where. When options are changed the value put together make a var which points ...