View clone_increment.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="input_fields_wrap"> | |
<div> | |
<input type="text" name="fields[contact][new1][fields][contactName]" /><br /> | |
<input type="text" name="fields[contact][new1][fields][contactSurname]" /><br /> | |
<input type="text" name="fields[contact][new1][fields][contactEmail]" /> | |
</div> | |
<button class="add_field_button">Add More Fields</button> | |
</div> |
View clearfix-mixin.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin clearfix { | |
&:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
} | |
.wrap { | |
@include clearfix; |
View vertical-align.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.parent-element { | |
-webkit-transform-style: preserve-3d; | |
-moz-transform-style: preserve-3d; | |
transform-style: preserve-3d; | |
} | |
.element { | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); |
View show-hide-search.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Header Search | |
$('.search a').on('click', function(event){ | |
event.preventDefault(); | |
var search = $(this).attr('href'); | |
$(search).css('right', '0'); | |
}); | |
// Hide search on document click | |
$(document).mouseup(function(e){ |
View .htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ifModule mod_headers.c> | |
# Turn on Expires and set default expires to 3 days | |
ExpiresActive On | |
ExpiresDefault A259200 | |
# Set up caching on media files for 1 month | |
<filesMatch ".(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$"> | |
ExpiresDefault A2419200 | |
Header append Cache-Control "public" | |
</filesMatch> |
View Redirect a single page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html | |
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/ |
View scroll-up-bar.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
padding-top: 40px; | |
} | |
header { | |
background: #f5b335; | |
height: 40px; | |
position: fixed; | |
top: 0; | |
transition: top 0.2s ease-in-out; |
View character-limiter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.extend( { | |
limiter: function(limit, elem) { | |
$(this).on("keyup focus", function() { | |
setCount(this, elem); | |
}); | |
function setCount(src, elem) { | |
var chars = src.value.length; | |
if (chars > limit) { | |
src.value = src.value.substr(0, limit); |
View equal-height-rows.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
article { | |
float: left; | |
width: 23%; | |
background: #ccc; | |
margin: 10px 1%; | |
padding: 1%; | |
} | |
@media all and (max-width: 900px) { | |
article { |
NewerOlder