Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="heading">
  <h1>Nifty Feedback Dialog</h1>
  <p>Feedback modules don't have to be boring, they need <span>love <i class="fa fa-heart-o"></i></span> too.</p>
</div>
<div class="feedback-box">
  		<div class="content">
     <a class='close' href="#"><i class="fa fa-times"></i></a>
     <div class="confirm">
       <h1><i class="fa fa-thumbs-up"></i> <strong>BOOOM!</strong> <span>We'll get right on that for ya</span></h1>
     </div>
    <header><i class="fa fa-bullhorn"></i> What can we Improve here for you!</header>
    <section>
      <textarea name="feedback"></textarea>
      <button id='submit'>Send Feedback</button>
    </section>
  </div>
</div>
<button id="feedback"><i class="fa fa-bullhorn"></i> Feedback</button>
              
            
!

CSS

              
                @import "compass/reset";
@import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,600,400);

$orange: 	#F58F23;
*{
	@include box-sizing(border-box);
}
a{
	text-decoration: none;
}

body{
	font-family: 'Open Sans', sans-serif;
  background-color: #ecf0f1;
}
a.close{
  z-index:10;
  color: rgba(0,0,0,.2);
  position: absolute;
  top: 0px;
  right: 0px;
  font-weight: 600;
  padding: 20px; 
  display: inline-block;
  @include transition(color .3s ease);
  &:hover{
    color: rgba(0,0,0,.7);
  }
}
.heading{
  text-align: center;
  position: absolute;
  left:0; right:0; top:0; bottom:0;
  margin: auto;
  width: 90%;
  height: 100px;
  h1{
    color: #d35400;
    font-size: 60px;
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: .05em;
    text-shadow: 1px 1px 0 lighten($orange,30%), 2px 2px 0 $orange, 3px 3px 0 #f1c40f;
  }
  p{
    font-size: 24px;
    font-weight: 300;
    span{
      color: #e74c3c;
    }
  }
}

button{
	background-color: $orange;
	color: #fff;
	border: none;
	padding: 10px 15px; 
	cursor: pointer;
	font-weight: 300;
	font-size: 16px;
	&:active,
	&:focus{
		outline: none;
	}
	&#feedback{
		position: fixed;
		bottom: 0;
		right:-90px;
		display: inline-block;
    @include transition(right .15s ease);
		@include border-radius(4px 0 0 0 );
    .fa-bullhorn{
      margin-right:10px;
    }
    &:hover{
      right: 0;
    }
	}
	@include transition(background-color .3s ease);
	&:hover{
		background-color: darken($orange, 5%);
	}
}

.feedback-box{
	z-index: 10;
	position: fixed;
	bottom: 0;
	right: 0;
	display: inline-block;
	width: 500px;
	@include perspective(1000);
	pointer-events: none;
	.content{
    height: 335px;
    @include opacity(0);
		background: white;
		border: 1px solid #ddd;
		border-right: none;
		border-bottom: none;
		@include transform-style(preserve-3d);
		@include transform-origin(100%, 100%);
		@include rotateY(-180deg);	
		@include transition(all .4s cubic-bezier(0.685, -0.245, 0.190, 1.315));	
	}
  .confirm{
    z-index: 2;
    color: #fff;
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: #41C289;
    @include scale(0);
    @include opacity(0);
    @include border-radius(20px);
    @include transition(all .4s cubic-bezier(0.685, -0.245, 0.190, 1.315));	
    h1{
      text-align: center;
      font-weight: 600;
      Text-transform: uppercase;
      font-size: 70px;
      margin-top: 115px;
      letter-spacing: -.08em;
      line-height: 1.2;
      i{
        vertical-align: 3px;
      }
      span{
        display: block;
        font-size: 40%;
        font-weight: 300;
        text-transform: none;
        letter-spacing: .02em;
      }
    }  
  }
  &.show{
    pointer-events: auto;
    .content{
      @include rotateY(0deg);
      @include opacity(1);
    }
  }
  //Validation Success Confirmation box
  &.show-confirm .confirm{
    @include scale(1);
    @include opacity(1);
    @include border-radius(0);
  }
  //Validation Error
  &.error textarea{
    border-color: red;
  }
	header{
    z-index: 10;
		background-color: #F7F7F7;
		color: $orange;
		font-weight: 400;
		font-size: 18px;
		height: 55px;
		line-height: 55px;
		text-align: center;
    border-bottom: 1px solid #ddd;
	}
	section{
		padding: 30px;
    overflow: hidden;
    @include transition(all .3 ease);
		textarea{
      z-index: 0;
			width: 100%;
			margin-bottom: 20px;
			padding: 10px;
			font-size: 16px;
			line-height: 1.5;
			resize: none;
			color: #333;
			border: 1px solid #ddd;
			height: 150px;
			@include transition(all .3s ease);
			&:focus{
				outline: none;
				border: 1px solid #999;
			}
		}
		button{
			display: block;
			padding: 15px;
			text-align: center;
			width: 100%;
		}
	}
}
              
            
!

JS

              
                //////
//Ya, I know... this code could use some help, but i just whipped this up for proof of conecpt ^–^
/////
(function($){
  var words = ["Boom!" , "Whammy!", "Booya!" , "Holler!", "Broskee!" , "All Good!" , "Right on!"];
  var feedback = $(".feedback-box");
  
  //Feedback Toggle
	$("#feedback").on("click" , function(){
		feedback.addClass("show");
	});
  
  //Close Trigger
	$(".close").on("click" , function(){
    feedback.removeClass("show");
    setTimeout(function(){ 
      feedback.removeClass("show-confirm").find("textarea").val('');
      console.log("reset")
    }, 1000);
	});

//Submit
  $("#submit").on("click" , function(){
     if( !$("textarea").val() ) {
       feedback.addClass("error");
       setTimeout(function(){
         feedback.removeClass("error");
       }, 500)
    }else{
      feedback.addClass("show-confirm");
      var randomWord = words[Math.floor(Math.random() * words.length)];
      $(".feedback-box h1 strong").text(randomWord);
      
      setTimeout(function(){
         feedback.removeClass("show").find("textarea").val('').delay(1000);
      },2000);
      
       setTimeout(function(){
         feedback.removeClass("show-confirm");
      },2200);
    }
  })
})(jQuery);
              
            
!
999px

Console