Skip to content

Instantly share code, notes, and snippets.

@henrycat
Created August 23, 2015 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henrycat/6c73a0d9d811afcff14b to your computer and use it in GitHub Desktop.
Save henrycat/6c73a0d9d811afcff14b to your computer and use it in GitHub Desktop.
Button

Button

Click on the button to trigger a list. You can add links or info into this pen.

A Pen by anna on CodePen.

License.

<button>Click Here</button>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
$(document).ready(function() {
$("button").on("click", function() {
console.log($("button"));
$("ul").animate({
width: ["toggle", "easeOutBounce"],
height: ["toggle", "easeOutBounce"],
opacity: "toggle"
}, 1000, "linear", function() {
});
});
});
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
button {
background-color:red;
color:white;
padding: 20px;
}
ul {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment