Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Last active March 28, 2017 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinsmidsrod/5267a8fc00454320275591ced60c7198 to your computer and use it in GitHub Desktop.
Save robinsmidsrod/5267a8fc00454320275591ced60c7198 to your computer and use it in GitHub Desktop.
<html>
<body id="#wrapper_object_content">
<h1>test</h1>
<div><a class="audio_mpeg" href="link1">link1</a></div>
<a class="audio_mpeg" href="link2">link2</a>
<p><a class="audio_mpeg" href="link3">link3</a></p>
</body>
</html>
$(document).ready( function() {
var selector = '.audio_mpeg';
$('#wrapper_object_content').on("portfolio:finish", selector, function(ev) {
ev.preventDefault();
$(selector, ev.delegateTarget).eq(
$(selector, ev.delegateTarget).index(this) + 1
).find('.play_button').click();
return true;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment