-
Notifications
You must be signed in to change notification settings - Fork 3
Added audio, play/pause button and audio switch, image and audio file… #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,4 +27,4 @@ body { | |
| height: 27px; | ||
|
|
||
| text-align: right; | ||
| } | ||
| } | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zseiman I think you accidentally removed this. haha
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoops! Sorry about that. Have to work on my code cleanliness. This is my first attempt at contribution and I'm pretty nervous about it.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Relax. You're doing fine! 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| $(function(){ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zseiman can you fix the indentations here? thanks! |
||
|
|
||
| var audio = document.getElementById('sound'); | ||
|
|
||
| function musicSwitch(){ | ||
| if(audio.paused){ | ||
| audio.play(); | ||
| } | ||
| else{ | ||
| audio.pause() | ||
| } | ||
| } | ||
| document.getElementById('mute').addEventListener('click', musicSwitch); | ||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zseiman add a newline.