I have a dropdownlist and set of listitems how can I show the div based on selected item.text not using value ?If I use value it is working but when I use text its not working...
if ($("#cntnLeftSidebar_cntnAddProduct_ddlProductCategory").text() == "Select Category") {
///alert(x);
$(".hideDiv").hide();
$(".post-prodcucts").hide();
}
else if ($("#cntnLeftSidebar_cntnAddProduct_ddlProductCategory").text() == "Hotels, Lodges, Resorts, Cottages") {
alert(x);
$(".hideDiv").hide();
$(".addHotelProducts").show();
$(".post-prodcucts").show();
}
else if (x == "Tours and travels, Transport Services") {
$(".hideDiv").hide();
$(".post-prodcucts").show();
$(".addRealEstates").show();
}
else if (x == "Real Estate, Builders, Developers, Dealers") {
$(".hideDiv").hide();
$(".post-prodcucts").show();
$(".addRealEstates").show();
}