This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shows an element, and hides it on clicking anywhere in the <body> | |
function toggleOnClick(target) { | |
// Show | |
$(target).fadeIn("fast", function() { | |
$('body').on('click', function() { | |
// Hide on click outside | |
$(target).fadeOut("fast"); | |
}); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SCAFFOLDING | |
// Define gutter width | |
@gutter: 20px; | |
// Some mixins | |
// For clearing floats like a boss h5bp.com/q | |
.clearfix { | |
*zoom: 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var element_start_offset = 0; | |
var element_sticks = false; | |
function stickToTop(element) { | |
// You may need to insert a placeholder to prevent other content from "jumping" | |
// Make sure it has the same height as "element" | |
placeholder = element.substr(1)+'_placeholder'; | |
if ($(document).scrollTop() >= element_start_offset.top && !element_sticks) { | |
$('<div id="'+placeholder+'"> </div>').insertAfter(element); // Insert placeholder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#php_flag display_startup_errors on | |
#php_flag display_errors on | |
#php_flag html_errors on | |
# Just in case... | |
Options +FollowSymlinks | |
RewriteEngine on | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Image popover | |
// http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ | |
jQuery(document).ready(function($) { | |
$('.lightbox_trigger').click(function(e) { | |
//prevent default action (hyperlink) | |
e.preventDefault(); | |
//Get clicked link href | |
var image_href = $(this).attr("href"); | |
var flickr_link = $(this).data("flickr"); | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sameHeight(target) { | |
// Reset | |
$(target).each(function() { | |
$(this).parent().data('height', 0); | |
}); | |
// Get highest element of each containing parent element | |
$(target).each(function() { | |
if ($(this).parent().data('height') < $(this).height()) { | |
$(this).parent().data('height', $(this).height()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setupCarousel() { | |
$('.carousel').each(function() { | |
// Add active class to first item | |
$(this).find('.carousel-inner .item').first().addClass('active'); | |
// Add indicators to carousel | |
for (var i = 0; i < $(this).find('.carousel-inner .item').length; i++) { | |
$(this).find('.carousel-indicators').append('<li data-target="#your-carousel-id" data-slide-to="'+i+'" class="text-shadow"></li>'); | |
} | |
// Add active class to first indicator | |
$(this).find('.carousel-indicators li').first().addClass('active'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Some hosts may require you to use the `RewriteBase` directive. | |
# If you need to use the `RewriteBase` directive, it should be the | |
# absolute physical path to the directory that contains this htaccess file. | |
# | |
# RewriteBase / | |
# Force www | |
# - Exclude urls starting with loaclhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>X-editable and List.js Datagrid</title> | |
<!-- Bootstrap --> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> |
OlderNewer