Show and Hide a Div with Drop-down List selected text using JQuery

Below i show you how to set Div show and Hide with drop-down list selected text changed condition

$(function () {
$("#DropDownList").change(function () {

var SelectedText = $("#DropDownList option:selected").text();

//if you want to set condition with selected value, you use like this,
var SelectedValue = $("#DropDownList option:selected").val();

if (SelectedText == "Show Div") {

else (SelectedText == "Hide Div") {




Author: eshan1604

Hi Guys, I'm Udara Eshan Ariyarathne from Sri Lanka. Currently i'm working as a Software Engineer (Microsoft Technologies). I'm sharing some IT related articles such as Development ,Configuration and Designing things what i have learn from day to day works. Hope it useful all of us. "Enjoying IT" Thanks & Regards, Udara Eshan Ariyarthne

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s