Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dreaddesign authored Jun 9, 2017
1 parent 6ffdb99 commit 8c1c083
Show file tree
Hide file tree
Showing 6 changed files with 10,771 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//break out seperate pieces of your javascript into the components and import them into the "main" js file in this case app.js
import busyButtons from './components/busy-buttons';

//you can then call the functions imported
busyButtons('.js-onscreen-activity');
16 changes: 16 additions & 0 deletions components/busy-buttons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import $ from 'jquery';

/* Implement an ES6 Module that handles click on `.js-busy-button` elements
* using jQuery as usual. Busy buttons should say "busy, busy busy" as the
* busy button is clicked. */

const busyButtonClick = (activitySelector) => {
activitySelector.click(function(event) {
console.log('js busy button was clicked');
$('.js-onscreen-activity').append('<h1>Busy</h1>');
});
}

busyButtonClick($('.js-busy-button'));

export default busyButtonClick;
Loading

0 comments on commit 8c1c083

Please sign in to comment.