From 5358e9c7993f9c91e33264fdf6f9a75463824393 Mon Sep 17 00:00:00 2001 From: Jimmy Ha Date: Sat, 2 Aug 2014 00:05:02 -0400 Subject: [PATCH] updates commenting #1 #2 #3 #4 --- bower.json | 2 +- package.json | 2 +- src/js/accordion_content.js | 7 +++++++ src/js/analytics.js | 9 ++++++++- src/js/content_tabs.js | 4 ++++ src/js/dropdown_menu.js | 4 ++++ src/js/popover.js | 6 ++++++ 7 files changed, 31 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index cae5f78..d571453 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "greeneyes", - "version": "0.1.2", + "version": "0.1.3", "authors": [ { "name": "Jimmy Ha", diff --git a/package.json b/package.json index 94ac3fc..9475ad8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greeneyes", - "version": "0.1.2", + "version": "0.1.3", "description": "AMD Javascript library of utility modules made for RequireJS", "main": "index.html", "scripts": { diff --git a/src/js/accordion_content.js b/src/js/accordion_content.js index 5c2b9da..64c1f1d 100644 --- a/src/js/accordion_content.js +++ b/src/js/accordion_content.js @@ -1,4 +1,11 @@ // Content Tabs +// +// This module will create a menu listing such that pressing any of the list +// items will expand to show more content +// https://github.com/herereadthis/greeneyes/blob/master/src/js/accordion.js +// +// You will want to use it for compressing a lot of content to only show what +// the user wants to read. (function() { define(['jquery'], function($) { diff --git a/src/js/analytics.js b/src/js/analytics.js index 829b373..639afd5 100644 --- a/src/js/analytics.js +++ b/src/js/analytics.js @@ -1,7 +1,14 @@ // Google Analytics, defined as an AMD for RequireJS +// +// This module replaces the standard Google analytics plugin. +// https://github.com/herereadthis/greeneyes/blob/master/src/js/analytics.js +// +// The main advantage here is that you will get to remove inline JavaScript on +// your page. Note: Unlike the other Greeneyes modules, this one does not need +// a [data-module=""] attribute. (function() { - define(function(require) { + define(['jquery'], function($) { var $, exports; $ = require("jquery"); exports = { diff --git a/src/js/content_tabs.js b/src/js/content_tabs.js index 1daf7db..57c1c0b 100644 --- a/src/js/content_tabs.js +++ b/src/js/content_tabs.js @@ -1,4 +1,8 @@ // Content Tabs +// +// This module creates a box with a list of tabs at the top that will switch +// out the content below +// https://github.com/herereadthis/greeneyes/blob/master/src/js/content_tabs.js (function() { define(['jquery'], function($) { diff --git a/src/js/dropdown_menu.js b/src/js/dropdown_menu.js index 6eceb86..88e25b2 100644 --- a/src/js/dropdown_menu.js +++ b/src/js/dropdown_menu.js @@ -1,4 +1,8 @@ // Drop Down Menu +// +// This module will create a nested menu where the child elements will be +// hidden by default and are toggled into view by clicking on the parent items. +// https://github.com/herereadthis/greeneyes/blob/master/src/js/dropdown_menu.js (function() { define(['jquery'], function($) { diff --git a/src/js/popover.js b/src/js/popover.js index 39cd953..e54fa73 100644 --- a/src/js/popover.js +++ b/src/js/popover.js @@ -1,4 +1,10 @@ // Content Tabs +// +// This module will create tiny modals that will appear adjacent to the item on +// which you click. +// https://github.com/herereadthis/greeneyes/blob/master/src/js/popover.js +// +// It is useful for displaying help text. (function() { define(['jquery'], function($) {