Solved

How to select the drop down using jquery

Posted on 2016-08-09
1
36 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

747 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

9 Experts available now in Live!

Get 1:1 Help Now