Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. function itemHandler(obj) {
  2. var item = obj['index'];
  3. var playlist = $("#"+obj['id']).next();
  4. var currentItem = 0;
  5. playlist.children().each(function(){
  6. if (currentItem == item) {
  7. $(this).addClass("playing");
  8. } else {
  9. $(this).removeClass("playing");
  10. }
  11. currentItem++;
  12. });
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement