Intoduction :-
Hii Friends...
Today I explain how to toggle a panel on click event with the help of Js. In Js there are many events like mouse-over,mouse-down,key press etc. So I explain this with the code.
Step : 1 The Code goes here :->
1) When On Click
Hii Friends...
Today I explain how to toggle a panel on click event with the help of Js. In Js there are many events like mouse-over,mouse-down,key press etc. So I explain this with the code.
Step : 1 The Code goes here :->
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#sheetal").click(function(){
$("#panel").slideToggle("slow");
});
});
</script>
<style>
#panel, #sheetal {
padding: 5px;
text-align: center;
background-color: #249FA3;
border: solid 1px #FFF;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="sheetal">Click Here</div>
<div id="panel">Welcome On DotnetModules Blog</div>
</body>
</html>
DEMO:-
1) When On Click