The catch is the links are actually songs on a playlist in JPlayer (music player using JQuery), where each item in the playlist is assigned a class (.m1, .m2, etc), so it functions exactly like the ordinary <div class="m1">text1</div>.
Using this code many things mess up:
- About half of the links become unclickable, the remaining half functions normally, I have no idea what determines which ones become unclickable or why
- The moment I hover mouse over any of the unclickable links, the page freezes, this is fixed when I hover mouse over a clickable link (weird??)
- The text (text1, text2 etc) does not show up at all
I'm trying to have different sets of text fade in/out in the same div by clicking various song names in a playlist in JPlayer (JQuery based audio player). JPlayer link: http://jplayer.org/
Apparently the song names in a playlist in JPlayer are really special as they don't register as classes or identifiers, so I can't find a way to target them in a function. I've tried to register them as
Code:
title:"<span class='bold white m1' data-link='1'>Song 1</span>",
like previous written. Strangely "bold" and "white" both works (bold just has css property of making font thicker, white is just a css property to change text color to white), but "m1" is not registered, as calling it in click functions does not work, ie:
Code:
$('.m1').on('click', function(){
/*do some stuff*/
}
It can't find what ".m1" is and thus won't do anything. Basically css properties will register, but javascript won't. Very weird...
Bookmarks