Skip to content

Instantly share code, notes, and snippets.

@wilornel
Created May 4, 2012 05:45
Show Gist options
  • Select an option

  • Save wilornel/2592366 to your computer and use it in GitHub Desktop.

Select an option

Save wilornel/2592366 to your computer and use it in GitHub Desktop.
<!--
Description: This is just a testing file...
-->
<html>
<head>
<script src='jquery.js'></script>
<script>
$(document).ready(function(){
$('#input').click(function(){
console.log('a');
$('#asd').animate({
marginLeft: parseInt($('#asd').css('marginLeft'),10) == 0 ?
$('#asd').outerWidth() :
0
});
});
});
</script>
</head>
<body id='body'>
<div style='border: 1px solid #000;height:100px;position:relative;overflow:hidden'> // The box
<input type='submit' value='hohohoho' id='input'/> // THe button
<div id='asd' style='left:0;bottom:0;display:none;position:absolute'>HAHAHAHAH</div> // The thing that slides
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment