Skip to content

Instantly share code, notes, and snippets.

View amitabhaghosh197's full-sized avatar

amitabha ghosh amitabhaghosh197

View GitHub Profile
@amitabhaghosh197
amitabhaghosh197 / gulpfile.js
Last active September 9, 2017 15:26
Gulp File #gulp #javascript #important
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var order = require("gulp-order");
var cleanCSS = require('gulp-clean-css');
var strip = require('gulp-strip-comments');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
@amitabhaghosh197
amitabhaghosh197 / isotope.html
Last active September 9, 2017 15:27
isotopeHTMLandJs #isotope #javascript #jquery
<div id="" class="portfolio-container">
<div class="portfolio-filter clearfix">
<ul id="portfolioFilters">
<li><a href="javascript:void(0);" data-filter="*">Show All</a></li>
<li><a href="javascript:void(0);" data-filter=".web-design">Web Design</a></li>
<li><a href="javascript:void(0);" data-filter=".web-development">Web Development</a></li>
</ul>
</div>
@amitabhaghosh197
amitabhaghosh197 / csshtmlimportant.md
Last active September 9, 2017 15:27
css&HTML importants #css #center-image
Position images to center always

Always add a helper class and .helper{ display:inline-block; height:100%;}



<div class="col_featured-image">
 <span class="helper"></span><img src="assets/img/features_tie.png">
@amitabhaghosh197
amitabhaghosh197 / customdatepicker.html
Last active September 9, 2017 15:28
Custom DatePicker #javascript #jquery
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<script type="text/javascript" src="//code.jquery.com/jquery-1.8.3.js"></script>
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
@amitabhaghosh197
amitabhaghosh197 / jss-script.js
Last active September 9, 2017 15:39 — forked from anandkumar/jss-script.js
Add 100px offset to jQuery smooth scroll Plugin #jquery #smooth-scroll
/* Smooth Back to Top, Get This functionality from: http://wordpress.org/extend/plugins/cudazi-scroll-to-top/ */
jQuery.noConflict();
jQuery(function($) {
// When to show the scroll link
// higher number = scroll link appears further down the page
var upperLimit = 100;
// Our scroll link element
@amitabhaghosh197
amitabhaghosh197 / jquery-image-resize.js
Last active September 9, 2017 15:41 — forked from ericjuden/jquery-image-resize.js
JQuery Image Resize #jquery #image-resize
$(document).ready(function() {
$('.story-small img').each(function() {
var maxWidth = 100; // Max width for the image
var maxHeight = 100; // Max height for the image
var ratio = 0; // Used for aspect ratio
var width = $(this).width(); // Current image width
var height = $(this).height(); // Current image height
// Check if the current width is larger than the max
if(width > maxWidth){
@amitabhaghosh197
amitabhaghosh197 / jQuery-importants.md
Last active March 13, 2018 06:17
jQuery importants #jquery #important

Instantiate Bootstrap selectpicker for Ajax HTML

function getstatenext(cId, controllerName)
    {
       $.ajaxSetup({cache: false});
        var loadUrl = js_site_url + "getstatenew/" + cId;
        $.ajax({
            type: "POST",
 url: loadUrl,