I have probably very simple question.
I have copied that code to my asp.net web application project but i couln't minimize the box.
Is there anything special i should do to use javascript with asp.net projects?
I tried the code tree times.
- Put script code in to head block
- Put script code to just before div starts
- Put script code to just before form tag closes
Javascript code
$("#button").click(function(){
if($(this).html() == "-"){
$(this).html("+");
}
else{
$(this).html("-");
}
$("#box").slideToggle();
});
html code
<div id="widnow">
<div id="title_bar"> Basic information
<div id="button"><img src="http://commons.wikimedia.org/wiki/File:Minus_in_circle.svg"></div>
</div>
<div id="box">
</div>
</div>
css code
#widnow{
width:400px;
border:solid 1px;
}
#title_bar{
background: #FEFEFE;
height: 25px;
width: 100%;
}
#button{
border:solid 1px;
width: 25px;
height: 23px;
float:right;
cursor:pointer;
}
#box{
height: 250px;
background: #DFDFDF;
}