Skip to content

Instantly share code, notes, and snippets.

@burners77
burners77 / Floatong Menu CSS
Created March 14, 2013 23:38
Floatong Menu CSS
@charset "UTF-8";
/* CSS Document */
#floatMenu {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.2em;
position: absolute;
left: 0;
top: 0px;
width: 260px;
@burners77
burners77 / Floating Menu JS
Created March 14, 2013 23:38
Floating Menu JS
// JavaScript Document
$(function(){
$(function() {
function moveFloatMenu() {
var menuOffset = menuYloc.top + $(this).scrollTop() + "px";
$('#floatMenu').animate({
top: menuOffset
}, {
duration: 700,
queue: false,
@burners77
burners77 / Detect mobile devices script
Last active April 2, 2024 15:13
Detect mobile devices script
<script type="text/javascript">
var mobile = (/iphone|ipod|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
if (mobile) {
do something;
}
</script>
<script type="text/javascript">
var isAndroid = (/android/i.test(navigator.userAgent.toLowerCase()));
if (isAndroid) {
@burners77
burners77 / CSS Reset
Last active December 14, 2015 22:29
CSS Reset to put at the beginning of CSS files.
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,