Solved

How to select the drop down using jquery

Posted on 2016-08-09
1
43 Views
Last Modified: 2016-08-13
HI,
In my html page i have created a drop down with the following :

<div class="form-group">
            <select id="mode" class="form-control">
              <option id="text/plain" selected>Rich Text</option>
              <option id="text/plain">Mark Down</option>
            </select>
      </div>


By default Rich Text is selected.
I want to select Mark Down using jquery. How can i do it ?
Thanks
0
Comment
Question by:Rohit Bajaj
1 Comment
 
LVL 12

Accepted Solution

by:
funwithdotnet earned 500 total points
ID: 41749480
Maybe:

$('#mode').val('Mark Down').change();

Open in new window

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now