slide demo

In this example below you will see how to do a slide demo with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by pushpanathank, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright pushpanathank ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>slide demo</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>slide demo</title>
  <script src="//code.jquery.com/jquery-1.12.4.js"></script>

</head>
<body>
 
<div class = "dropDowndd">
    <h3>this is phone, store and hour info</h3>
</div>
<div class="selectordd">
    Information
</div>
  
</body>
</html>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/pushpanathank/slide-demo-VWYrRX */
body{
	margin:0;
	padding: 0;
}
	.dropDowndd{
		padding: 20px;
		background-color: red;
		border-bottom: 4px solid maroon;
        display:none;
        position:absolute;
    width:100%;
	}
	.selectordd{
		position: absolute;
		padding:5px;
		left: 50%;
		/*border-radius: 10px;*/
		background-color: maroon;
		border-bottom-left-radius: 10px;
		border-bottom-right-radius: 10px;
		cursor: pointer;
    top:0;
	}

/*Downloaded from https://www.codeseek.co/pushpanathank/slide-demo-VWYrRX */
	$(document).ready(function(){
		$('.selectordd').click(function () {
                $('.dropDowndd').slideToggle(300);
            });

	});

Comments