CopyPastor

Detecting plagiarism made easy.

Score: 0.8700770580324539; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-08-17
by AvaniSomaiya

Original Post

Original - Posted on 2012-05-18
by Elliot Bonneville



            
Present in both answers; Present only in the new answer; Present only in the old answer;

For dropdown options you probably want something like this:
var selectedVal = $('#id_material').find(":selected").text();
The reason val() doesn't do the trick is because clicking an option doesn't change the value of the dropdown--it just adds the :selected property to the selected option which is a child of the dropdown.
For dropdown options you probably want something like this:
var conceptName = $('#aioConceptName').find(":selected").text();
The reason `val()` doesn't do the trick is because clicking an option doesn't change the value of the dropdown--it just adds the `:selected` property to the selected option which is a *child* of the dropdown.

        
Present in both answers; Present only in the new answer; Present only in the old answer;