Skip to content

Instantly share code, notes, and snippets.

View gseilheimer's full-sized avatar

Gilbert Seilheimer gseilheimer

View GitHub Profile
@gseilheimer
gseilheimer / snippet gs_bootstrap nav scolling
Created October 9, 2015 18:28
snippet gs_bootstrap nav scolling
$(function(){
var $navbar = $('nav');
$(window).scroll(function() {
$navbar.toggleClass('scrolled', $(window).scrollTop() > 40);
});
$('.nav-toggle').click(function(){
$navbar.toggleClass('expanded');
@gseilheimer
gseilheimer / snippet php for js fnc saveRating()
Last active October 5, 2015 18:03
snippet php for js fnc saveRating()
<?php
/**
* Created by IntelliJ IDEA.
* User: GS
* Date: 13.05.15
* Time: 13:13
*/
// settings for filenames
@gseilheimer
gseilheimer / snippet js fnc saveRating()
Last active October 5, 2015 15:10
snippet js localstorage ajax
// LocalStorage
function saveRating() {
localStorage.clear();
if( window.localStorage!==undefined ) {
var fields = $( "form :input" ).serialize();
localStorage.setItem( "form-rating-fields", JSON.stringify( fields ) );
console.log( fields );
// NAVI
function bs_navigation() {
/* affix the navbar after scroll below header */
$('nav').affix({
offset: {
top: $('header').height()-$('nav').height()
}
});
@gseilheimer
gseilheimer / config.json
Last active September 13, 2015 12:13 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",