Skip to content

Instantly share code, notes, and snippets.

View NetanelBasal's full-sized avatar
🎯
Focusing

Netanel Basal NetanelBasal

🎯
Focusing
View GitHub Profile
@NetanelBasal
NetanelBasal / index.html
Created March 4, 2015 14:59
Radio button
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
label {
display: inline-block;
cursor: pointer;
position: relative;
@NetanelBasal
NetanelBasal / gist:450a9d2ff3a1193e9b89
Created March 16, 2015 06:57
window post message
var params = $window.location.search.substring(1);
if(params && $window.opener) {
var pair = params.split('=');
$window.opener.postMessage(pair[1], $window.location.origin);
}
var popup = this.$window.open('auth/facebook', '', 'width=500, height=500');
this.$window.focus();
this.$window.addEventListener('message', (e) => {
@NetanelBasal
NetanelBasal / js
Created March 19, 2015 15:08
costume drop down
<div class="nb-drop-down">
<button class="nb-main-item">Main Item</button>
<ul class="nb-list">
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ul>
</div>
<div style="margin-top:100px;">
@NetanelBasal
NetanelBasal / SassMeister-input-HTML.jade
Created March 23, 2015 07:56
Generated by SassMeister.com.
.row
.c-6
h1 hello world
.row
.c-4
h1 inside
.c-6.c-last
h1 right
.c-6.c-last
h1 second hello
@NetanelBasal
NetanelBasal / index
Created April 2, 2015 09:22
angular slide in out effect
<section ui-view class="view"></section>
@NetanelBasal
NetanelBasal / susy grid system.css
Last active August 29, 2015 14:18
susy grid system
.row {
*zoom: 1;
}
.row:before, .row:after {
display: table;
content: '';
line-height: 0;
}
.row:after {
clear: both;
@NetanelBasal
NetanelBasal / index.html
Created April 8, 2015 12:47
loop children dom
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div>
<ul>
<li><a href="" class='first'>1</a></li>
@NetanelBasal
NetanelBasal / index.html
Created April 8, 2015 13:03
siblings dom
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div>
<ul>
<li><a href="" class='first'>1</a></li>
let p = document.querySelector('p');
let pHeight = parseInt(window.getComputedStyle(p).height) * -1;
// console.log(p.clientHeight )
document.addEventListener('scroll', (e) => {
if(p.getBoundingClientRect().top === 0) {
console.log('arrive to this ele');
}
if(p.getBoundingClientRect().top === pHeight) {
body {
margin: 50px;
}
table {
width: 100%;
border-spacing: 0px;
}
th, td {
text-align: left;