Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Nicole Lambon Takaya213

🎯
Focusing
Block or report user

Report or block Takaya213

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Takaya213
Takaya213 / clone_increment.html
Last active Sep 22, 2016
Clone a section of form code and increment the name/is of the inputs.
View clone_increment.html
<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
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
.wrap {
@include clearfix;
@Takaya213
Takaya213 / vertical-align.css
Created Oct 1, 2015
Vertical Align Anything
View vertical-align.css
.parent-element {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
@Takaya213
Takaya213 / flex-full-width-nav-css2.css
Created Aug 19, 2015
Equally Spaced, Variable-Width Navigation Links
View flex-full-width-nav-css2.css
ul {
display: table;
width: 100%;
}
li {
display: table-cell;
}
a {
@Takaya213
Takaya213 / show-hide-search.js
Created Mar 13, 2015
Display Search and Hide it on anywhere click
View show-hide-search.js
// 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
<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
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/
View scroll-up-bar.css
body {
padding-top: 40px;
}
header {
background: #f5b335;
height: 40px;
position: fixed;
top: 0;
transition: top 0.2s ease-in-out;
View character-limiter.js
(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);
@Takaya213
Takaya213 / equal-height-rows.css
Created Apr 9, 2014
Responsive Equal Height Rows
View equal-height-rows.css
article {
float: left;
width: 23%;
background: #ccc;
margin: 10px 1%;
padding: 1%;
}
@media all and (max-width: 900px) {
article {
You can’t perform that action at this time.