jQuery Sliding Methods:-
With jQuery you can create a sliding effect on elements.
jQuery has the following slide methods:
slideDown()
slideUp()
slideToggle()
(1)slideDown() example:-
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideDown("slow");
});
});
</script>
<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="flip">Click to slide down panel</div>
<div id="panel">Hello world!</div>
</body>
</html>
(3)SlideToggle() example:-
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideToggle("slow");
});
});
</script>
<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="flip">Click to slide down panel</div>
<div id="panel">Hello world!</div>
</body>
</html>
With jQuery you can create a sliding effect on elements.
jQuery has the following slide methods:
slideDown()
slideUp()
slideToggle()
(1)slideDown() example:-
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideDown("slow");
});
});
</script>
<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="flip">Click to slide down panel</div>
<div id="panel">Hello world!</div>
</body>
</html>
(2)sldeUP() example:-
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideUp("slow");
});
});
</script>
<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
}
</style>
</head>
<body>
<div id="flip">Click to slide up panel</div>
<div id="panel">Hello world!</div>
</body>
</html>
(3)SlideToggle() example:-
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideToggle("slow");
});
});
</script>
<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="flip">Click to slide down panel</div>
<div id="panel">Hello world!</div>
</body>
</html>
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDeleteWe Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.
ReplyDelete