Skip to content

Instantly share code, notes, and snippets.

View the-affy's full-sized avatar

Affy Kumar the-affy

  • Javra software
  • Kathmandu, Nepal
View GitHub Profile
@the-affy
the-affy / 0_reuse_code.js
Created July 2, 2014 06:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@the-affy
the-affy / hover dropdown.js
Created July 2, 2014 06:28
bootstrap3 on hover dropdown with link supported in parent
<script>
jQuery(function($) {
$('.navbar .dropdown').hover(function() {
$(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown();
}, function() {
$(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp();
});
@the-affy
the-affy / smooth-scroll-mouse.js
Created July 2, 2014 06:38
on mouse smooth scroll
<script>
//final script scroll
if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false);
window.onmousewheel = document.onmousewheel = wheel;
var time = 1300;
var distance = 270;
function wheel(event) {
if (event.wheelDelta) delta = event.wheelDelta / 120;
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@the-affy
the-affy / carsoul fallback ie 8.js
Created July 15, 2014 05:04
bootstrap3 caroul ie 8 fallback
/* ========================================================================
* Bootstrap: carousel.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#carousel
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@the-affy
the-affy / paralex bg css.css
Created July 23, 2014 07:13
paralex background
/* background setup */
.background {
background-repeat:no-repeat;
/* custom background-position */
background-position:50% 50%;
/* ie8- graceful degradation */
background-position:50% 50%9 !important;
}
/* fullscreen setup */
@the-affy
the-affy / youtube.html
Created August 22, 2014 05:47
youtube player without control and frame
<iframe id="videoPlayer" type="text/html" width="100%" height="100%"
src="https://www.youtube.com/embed/OEP7MolxPKY?enablejsapi=1&html5=1&controls=0&rel=0&showinfo=0"
frameborder="0" allowfullscreen>
</iframe>