Updating dynamicly alterd class structures with dynamic content(help)
Hi i'm using
http://github.com/soundcloud/soundcloud-custom-player to load and preview music on my page.
It all works really well, when you write pure static html code with just
- <div class="sc-player">
- <a href="http://soundcloud.com/matas/on-the-bridge">Oxxo</a>
- </div>
And it will automaticly transform that url into a working custom-player. Done with the soundcloud api.
But when i use $.getJSON and dynamicly get down a list of urls that i try to insert with:
$('#addbtn').live('click', function(event)
{
$('sc-player').append('<a href="http://soundcloud.com/iamnevyn/paint-your-life">Paint your life</a>');
});
});
*side-note(it's the same result with $('#addbtn').click, just wanted to try live as i hoped it would update the elements upon being added. But did not work out.)
The url gets inserted into sc-player class div, but the rest never gets transformed into the custom-player with the sc-player.js script.It just remains an ordinary a href. It is as if the sc-player.js never is being "loaded" which i can understand why it won't.
Question is how do i get it to successfully transform my urls that are being dynamicly added with javascript into the custom-player instead of just the url to the song?
If i'm unclear, i can try write up abit more code to explain what i'm after
Kind Regards
Nevyn