Original design from dribbble: http://drbl.in/jGgT
Uses weather API to grab weather info. Nav buttons are also functional.
Forked from Andre Madarang's Pen City Widget.
A Pen by Pankaj Patel on CodePen.
| angular | |
| .module('toDoApp', []) | |
| .factory('storage', ['$window', function( $window ){ | |
| return { | |
| memorize: function( value ){ | |
| try{ | |
| if( $window.Storage ){ | |
| $window.sessionStorage.setItem( 'tasks', $window.JSON.stringify( value ) ); | |
| return true; | |
| } else { |
| angular | |
| .module('sampleModule', []) | |
| .factory('sampleFactory',[function(){ | |
| return { | |
| /* | |
| * define Factory functions here | |
| */ | |
| } | |
| }]); |
Original design from dribbble: http://drbl.in/jGgT
Uses weather API to grab weather info. Nav buttons are also functional.
Forked from Andre Madarang's Pen City Widget.
A Pen by Pankaj Patel on CodePen.
| <ul class="list"> | |
| <li data-bullet="-">Lorem ipsum dolor sit amet, consectetur adipisicing</li> | |
| <li>tempor incididunt ut labore et dolore magna aliqua</li> | |
| <li data-bullet="#">quis nostrud exercitation ullamco laboris nisi ut</li> | |
| <li>consequat. Duis aute irure dolor in reprehenderit</li> | |
| <li data-bullet="-">cillum dolore eu fugiat nulla pariatur. Excepteur</li> | |
| <li>proident, sunt in culpa qui officia deserunt mollit</li> | |
| <li data-bullet="#">quis nostrud exercitation ullamco laboris nisi ut</li> | |
| <li>consequat. Duis aute irure dolor in reprehenderit</li> | |
| <li data-bullet="-">cillum dolore eu fugiat nulla pariatur. Excepteur</li> |
| <ul class="list-fallback"> | |
| <li><span>-</span>Lorem ipsum dolor sit amet, consectetur adipisicing</li> | |
| <li><span>+</span>tempor incididunt ut labore et dolore magna aliqua</li> | |
| <li><span>#</span>quis nostrud exercitation ullamco laboris nisi ut</li> | |
| <li><span>+</span>consequat. Duis aute irure dolor in reprehenderit</li> | |
| <li><span>-</span>cillum dolore eu fugiat nulla pariatur. Excepteur</li> | |
| <li><span>+</span>proident, sunt in culpa qui officia deserunt mollit</li> | |
| <li><span>#</span>quis nostrud exercitation ullamco laboris nisi ut</li> | |
| <li><span>+</span>consequat. Duis aute irure dolor in reprehenderit</li> | |
| <li><span>-</span>cillum dolore eu fugiat nulla pariatur. Excepteur</li> |
| <!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"> | |
| <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
| <title>Time to Hack: Firebase with JavaScript and jQuery</title> | |
| <!-- Latest compiled and minified CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> |
| //create firebase reference | |
| var dbRef = new Firebase("https://contactb.firebaseio.com/"); | |
| var contactsRef = dbRef.child('contacts') | |
| //load older conatcts as well as any newly added one... | |
| contactsRef.on("child_added", function(snap) { | |
| console.log("added", snap.key(), snap.val()); | |
| document | |
| .querySelector('#contacts') | |
| .innerHTML += contactHtmlFromObject(snap.val()); |
| //create firebase reference | |
| var dbRef = new Firebase("https://contactb.firebaseio.com/"); | |
| var contactsRef = dbRef.child('contacts') | |
| //load older conatcts as well as any newly added one... | |
| contactsRef.on("child_added", function(snap) { | |
| console.log("added", snap.key(), snap.val()); | |
| $('#contacts').append(contactHtmlFromObject(snap.val())); | |
| }); |
| $(document).ready(function(e){ | |
| $('.item').click(function (e){ | |
| if($(this).next('.item-data').css('display') != 'block'){ | |
| $(this).next('.item-data').addClass('active').slideDown('slow'); | |
| } else { | |
| $(this).slideUp('fast').removeClass('active'); | |
| } | |
| }); | |
| }); |