-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dreaddesign
authored
Jun 9, 2017
1 parent
6ffdb99
commit 8c1c083
Showing
6 changed files
with
10,771 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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'); |
This file contains 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
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; |
Oops, something went wrong.