Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="feedback">
- <div id="feedback_slide">Feedback</div>
- <div id="contents">
- content here
- </div>
- </div>
- $(document).ready(function() {
- $('#feedback').click(function(){
- $(this).stop().animate({ bottom: 0 }, 350);
- });
- //change 'feedback' to 'close'
- $('#feedback_slide').click(function(){
- $('#feedback').stop().animate({ bottom: -280 }, 350);
- });
- });
- $(document).ready(function() {
- $('#feedback').click(function(){
- $(this).toggleClass("open");
- });
- });
- #feedback {
- position: fixed;
- bottom: -280px;
- width: 400px;
- height: 300px;
- background-color: #eee;
- -webkit-transition-duration: 0.35s;
- -moz-transition-duration: 0.35s;
- -ms-transition-duration: 0.35s;
- -o-transition-duration: 0.35s;
- transition-duration: 0.35s;
- }
- #feedback.open
- {
- bottom: 0px;
- }
- $(this).html(($(this).parent("#feedback").hasClass("open") ? "Feedback" : "Close")).parent("#feedback").toggleClass("open");
- $(this).html(
- ($(this).parent("#feedback").hasClass("open") ? "Feedback" : "Close")
- ).parent("#feedback").toggleClass("open");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement