JSFiddle - React, Tailwind, and code Playground

by Share Knowledge

HTML

<dl>
     <dt>Q-1 What is your favorite scripting language ?</dt>
     <dd style="display: none">Ans - PHP, C++ </dd>      
</dl>
    
<dl>
    <dt>Q-2 What is your favorite IDE software ?</dt>
    <dd style="display: none">Ans - Aptana Studio 3, Dreamweaver</dd></dl>  
<dl>
    <dt>Q-3 Where are you from ?</dt>
     <dd style="display: none">Ans - I am from Russia</dd>  
</dl>
    
<dl>
    <dt>Q-4 Can you build small scripts - complex scripts ?</dt>
    <dd style="display: none">Ans - Yes, i can build small - complex scripts and from scratch</dd>
</dl>

CSS

dt {
	cursor: pointer;
    color :#ff3d03;
}
dd{
    color: green;
    text-align: left;
    margin-top: 5px;

}

JavaScript

$(document).ready(function(){

    $("dt").click(function(){

				var qst = $(this).parent().find('dd');
				
				$(qst).slideToggle();
		})


})