Skip to content

Commit

Permalink
events added
Browse files Browse the repository at this point in the history
  • Loading branch information
Aamir Afridi committed Feb 22, 2013
1 parent 25eb227 commit 4b6b18c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Events:
- **beforeStarting:** Event will be fired on the element before animation starts.
- **finished:** Event will be fired on the element after the animation finishes.
- **pause:** Fire this event on the element when you want to pause the animation, for example when you click/hover a link.
- **paused:** Event will be fired on the element when the animation is paused.
- **resume:** Fire this event on the element when you want to resume, the paused animation.
- **resumed:** Event will be fired on the element when the animation is resumed.

Demo & blog post:
-----
Expand Down
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ <h2>Events</h2>
<ul>
<li><b>beforeStarting:</b> Event will be fired on the element before animation starts.</li>
<li><b>finished:</b> Event will be fired on the element after the animation finishes.</li>
<li><b>pause:</b> Fire this event on the element when you want to pause the animation, for example when you click/hover a link.</li>
<li><b>resume:</b> Fire this event on the element when you want to resume, the paused animation.</li>
<li><b>pause:</b> Fire/trigger this event on the element when you want to pause the animation, for example when you click/hover a link.</li>
<li><b>paused:</b> Event will be fired on the element when the animation is paused.</li>
<li><b>resume:</b> Fire/trigger this event on the element when you want to resume, the paused animation.</li>
<li><b>resumed:</b> Event will be fired on the element when the animation is resumed.</li>
</ul>

<h2>Options</h2>
Expand Down
4 changes: 4 additions & 0 deletions jquery.marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@
function pause() {
if($.fn.pause) {
$marqueeWrapper.pause();
//fire event
$this.trigger('paused');
}
}

function resume() {
if($.fn.resume) {
$marqueeWrapper.resume();
//fire event
$this.trigger('resumed');
}
}

Expand Down

0 comments on commit 4b6b18c

Please sign in to comment.