Skip to content

Instantly share code, notes, and snippets.

@swapnilshrikhande
swapnilshrikhande / stickyFooter.css
Created November 15, 2016 11:26
Sticky footer styles
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
/*
http://stackoverflow.com/questions/28948383/how-to-implement-debounce-fn-into-jquery-keyup-event
*/
$('input').keyup(debounce(function(){
var $this=$(this);
//alert( $this.val() );
var n1 = $this.val();
var n2 = $('#n2').val();
var n3 = $('#n3').val();
class Node{
Id value;
List<Node> children;
{
children = new List<Node>();
}
}
parseTree( Map<String,List<Id>> treeMap,String parentId){
<html>
<header>
<style>
body{color:#333;padding:1.5em}
.responsive-new {border-collapse:collapse;width:100%}
.responsive-new th{background-color:#eee;font-weight:700; }
.responsive-new th,td{border-bottom: 1px solid #ddd; padding:5px; text-align:left}
.fname{width:15%}
.lname{width:15%}
@swapnilshrikhande
swapnilshrikhande / index.css
Last active August 5, 2016 15:34
How event bubbling works ?
.parent{
min-height: 400px;
min-width : 400px;
background-color:yellow;
}
.parent .son{
min-height: 100px;
min-width : 100px;
background-color:red;
@swapnilshrikhande
swapnilshrikhande / deferred_chain.js
Created August 5, 2016 15:21
How deferred chaining works ?
var performParent = function(){
//perform 1st async
var promise1 = performAsync('func1',5);
// We want to chain two async operations
promise1.then(function(data){
console.log('data from 1st async operation',data);
//perform second async operation
<apex:page id="pageId" controller="AccountGeoLocationDemo">
<head>
<style type="text/css">
#map-canvas {
height : 512px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBMFdqVZd9idw-0pYEsWQ9xxM9mNz7f9E4">
@swapnilshrikhande
swapnilshrikhande / SearchNearby_PlacesGoogle.html
Created July 26, 2016 12:24
Search Nearby Places Google
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#map-canvas {
height : 500px;
}
</style>
<title></title>
@swapnilshrikhande
swapnilshrikhande / event_bubble_demo.html
Last active July 26, 2016 10:35
JQuery Demo Snippets
<!DOCTYPE html>
<html>
<head>
<title></title>
<!--<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>-->
<script src="./jquery-1.11.3.js"></script>
</head>
<style type="text/css">
.target{
@swapnilshrikhande
swapnilshrikhande / responsiveTable.css
Last active July 19, 2016 10:40
Responsive Table
/*
Generic Styling, for Desktops/Laptops
Reference : https://css-tricks.com/responsive-data-tables/
*/
table {
width: 100%;
border-collapse: collapse;
}
/* Zebra striping */
tr:nth-of-type(odd) {