Skip to content

Instantly share code, notes, and snippets.

Minoru Hayakawa e-river

Block or report user

Report or block e-river

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
View checkinput.js
document.addEventListener("DOMContentLoaded", function(event) {
new ShowButton().load();
});
function ShowButton() {
this.btn = document.querySelectorAll('.class');
this.target = document.querySelectorAll('input[type="checkbox"]');
}
ShowButton.prototype.load = function() {
@e-river
e-river / form_active.js
Last active Feb 14, 2017
JavaScript for changing disabled to active button
View form_active.js
(function(){
document.addEventListener('DOMContentLoaded', function(event) {
new ActiveForm().onEvent(event.target);
}, false);
})();
function ActiveForm() {
this.submit = document.getElementById('submit');
}
View gulp_setup_memo.markdown

Install gulp

sudo npm install -g gulp

Install gulp in the project

sudo npm install --save-dev gulp
@e-river
e-river / _rollover.js
Last active Jun 8, 2016
jQuery Rollover for If there are any strings after the extension of image
View _rollover.js
/*
Usage:
HTML
<img class="js-rollover">
JS
require jQuery
http://jquery.com/download/
@e-river
e-river / _retina-sprite-background.scss
Last active Jan 4, 2016
Creating a image of CSS Sprite using compass
View _retina-sprite-background.scss
// Mixin for Creating a image of CSS Sprite using compass against Retina
// For use:
// .pdf-icon {
// @include retina-sprite-background(pdf);
// }
//
$sprite-map: sprite-map("sprite/*.png", $spacing: 100px);
$sprite-path: sprite-path($sprite-map);
$sprites-img: sprite-url($sprite-map);
@e-river
e-river / _Addingzero.scss
Created Jan 22, 2014
[Sass]Adding a 0 if only one digit serial number of the class name
View _Addingzero.scss
$num: "";
@for $i from 1 through 10 {
@if $i < 10 {
$num: "0#{$i}";
} @else {
$num: "#{$i}";
}
.classname#{$num} {
// CSS code here
}
@e-river
e-river / loader.html
Created Jan 16, 2014
Loading Animation for only CSS
View loader.html
<div id="loading-wrapper">
<span id="bounce1" class="loading-bounce"></span>
<span id="bounce2" class="loading-bounce"></span>
<span id="bounce3" class="loading-bounce"></span>
<span id="bounce4" class="loading-bounce"></span>
<span id="bounce5" class="loading-bounce"></span>
<span id="bounce6" class="loading-bounce"></span>
<span id="bounce7" class="loading-bounce"></span>
<span id="bounce8" class="loading-bounce"></span>
@e-river
e-river / Gruntfile.js
Created Jan 15, 2014
Gruntfile.js using grunt-contrib-cssmin, grunt-contrib-watch, grunt-contrib-concat, grunt-contrib-clean, grunt-contrib-compass, grunt-contrib-uglify
View Gruntfile.js
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
//Concatenate JS files
concat: {
lib: {
src: [
'public_html/dev/lib/jquery.js',
@e-river
e-river / gulpfile.js
Last active Jan 2, 2016
gulpfile.js using gulp-ruby-sass, gulp-autoprefixer, gulp.spritesmith, gulp-jade, gulp-less, gulp-minify-css, gulp-concat and gulp-uglify, gulp-watch, gulp-plumber, gulp-clean.
View gulpfile.js
var gulp = require('gulp')
, concat = require('gulp-concat')
, uglify = require('gulp-uglify')
, watch = require('gulp-watch')
, sass = require('gulp-ruby-sass')
, autoprefixer = require('gulp-autoprefixer')
, spritesmith = require("gulp.spritesmith")
, minifyCSS = require('gulp-minify-css')
, plumber = require('gulp-plumber')
, jade = require('gulp-jade')
@e-river
e-river / _flexbox.scss
Last active Dec 29, 2015
Mixin of Sass with Compass for Flexbox supported new syntax and older syntax. If you use this Mixin, Compass is necessity.
View _flexbox.scss
@mixin display-flex() {
@include display-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
// flex-direction property
// This Argument is same as W3C Flexbox.
// See below:
You can’t perform that action at this time.