Usually you see jQuery pulled in to manipulate the DOM. This is a Proof of Concept, drawing the grid exclusively by dynamically adding DOM elements on page load with JavaScript (using plain JS, no jQuery or other "helpers"). Clicking on a grid element will cause it to disappear, this is accomplished via a click handler which toggles the element's background style off onclick.
This file contains hidden or 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
| def multiply(a, b): | |
| return a*b |
This file contains hidden or 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
| Slide 1 | |
| Jeff’s Blog | |
| Part2: Header CSS | |
| Slide 2 | |
| Our Mission: | |
| In this less, we’ll cover 3 main things | |
| Add a CSS reset external CSS file | |
| Style the navigation lins | |
| Style the rest of the header |
This file contains hidden or 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
| Slide 1: | |
| Jeff's blog | |
| Part 3: Responsive design & Javascript | |
| Slide 2: | |
| Our Mission: | |
| In this lesson, we'll cover three main things: | |
| 1. Give the content a responsive design | |
| 2. Learn about advance colors |
This file contains hidden or 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
| Slide 1: | |
| Build your own blog theme | |
| Slide 2: | |
| Now tat you've made an awesome theme for Jeff's blog, | |
| let's see if you can make one on your own, | |
| without any guidance! | |
| Slide 3: | |
| It'll be hard to remember how to do some things, |
This file contains hidden or 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
| extends layout | |
| block content | |
| h1= title |
This file contains hidden or 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
| /** | |
| * diff two arrays - return the elements that occur in one but not both input arrays | |
| * note to self: This works but there has to be a better (more performant) solution | |
| * Revisit this and look into removing items from both arrays as they're discovered | |
| **/ | |
| function diff(arr1, arr2) { | |
| // get the items from arr1 that aren't in arr2 | |
| var filteredArr1 = arr1.filter( function( el ) { | |
| return arr2.indexOf( el ) < 0; | |
| } ); |
This file contains hidden or 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
| // Bonfire: Exact Change | |
| // Author: @p1xt | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-exact-change | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function drawer(price, cash, cid) { | |
| var change = []; | |
| var types = ['PENNY', | |
| 'NICKEL', | |
| 'DIME', |
This file contains hidden or 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
| import { Pipe, PipeTransform } from '@angular/core'; | |
| var marked = require('marked'); | |
| @Pipe({ | |
| name: 'mark' | |
| }) | |
| export class MarkPipe implements PipeTransform { | |
| transform(value: any, args?: any): any { | |
| marked.setOptions({ sanitize: true}); |