Skip to content

Instantly share code, notes, and snippets.

#callout02, #callout03, #callout05 {
left: 22%;
@media screen and (max-width: $break-lg) {
left: 15%;
}
@media screen and (max-width: $break-md) {
left: 10%;
}
}
@tjstalcup
tjstalcup / gist:10406226
Created April 10, 2014 17:48
Finding Guidebar's left
if($('#guideBarFake').length){
var pos = $('#guideBarFake').position();
$('#guideBar').css('left',pos.left);
}
$(window).resize(function(){
if($('#guideBarFake').length){
var pos = $('#guideBarFake').position();
$('#guideBar').css('left',pos.left);
}
@tjstalcup
tjstalcup / gist:10406880
Created April 10, 2014 17:55
Controlling the GuideBar's top property
$(window).scroll(function() {
if ($(document).scrollTop() > 627) {
$('#guideBar').css('top','40px');
} else {
var scroll = 667 - $(document).scrollTop();
$('#guideBar').css('top',scroll+'px');
}
});
@tjstalcup
tjstalcup / showQuestion.js
Created June 11, 2015 19:10
Example of moving the showQuestion code into the Object itself
// store questions and answers
var allQuestions = {
"what year was the first star wars movie released?",
"what type of species is Chewbacca?",
"on what planet does jabba the hutt live on?",
"what is the name of boba fett's ship",
"who is luke skywalker's father?"
};
var allChoices = {
@tjstalcup
tjstalcup / ooquiz.js
Created June 11, 2015 19:32
starting block for OO approach to Quiz
$(document).ready(function(){
/*
TODO: create a Quiz Object that the global variables will be a property of
var quiz = function(questions){
this.numCorrect = 0;
this.qCount = 0;
$(document).ready(function(){
var questions = [
{
title: 'What color is the sky?',
answers: ['Blue','Red','Green','Orange'],
correct: 0
},
{
title: 'What color is the grass?',
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Stripe Test</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="css/styles.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Quiz App</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="css/styles.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
$(document).on('click', '.fa-edit', function () {
var $el = $(this).parent().parent().parent().parent().children('.left');
var value = $el.text();
$el.html('<input type="text" id="edit" value="'+value+'"/>');
$('#edit').focus();
});
$(document).on('keyup', '#edit', function(e){
// enter
if(e.which==13){
@media screen and (max-width: 1200px){
.headerSection {
width: 90%;
margin: 20px 5% 10px 5%;
background-position: center center;
float: none;
background-size: cover;
height: 300px;
}
.quizSection {