0

I am working in an ASP.Net MVC 4 application. In a view, i have multiple html select controls with different class name in a form tag. Currently, i'm getting those as follows-

 $('select', form).each(function () {

});

But, i would like to catch select element with their class name also. Here is a pseudocode-

 $(select which has classA in form).each(function () {

});

What is the way to do it?

1 Answer 1

1

try something like this

         $(#form_id select.myclass).each(function () {

         });

HTML CODE

<form id="form_id">
    <select class="myclass">
        <option>A</option>
        ....
    </select>
</form>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.