{literal}
<script type="text/javascript">{var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({ publisher: "123456789-91211-121314-121617-181920212223242526", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
<span class='st_sharethis_large' displayText='ShareThis'></span>
{/literal}
In the image in attach i give an example, in the right i have a list of playlists i want to load on the left side, if i click on the button the left side will be populated by the songs of it.
The jquery i use to do that is this:
$(document).on('click','#addplaylisttolist',function(){
myPlaylist.pause();
myPlaylist.remove();
$("#playlist_selected_songs").empty();
$.each($(this).find("span"),function(){
$("#playlist_individual_li").load('listen_playlist_section_content_item_add',{musicId:$(this).attr('data-id-music'),musicTitle:$(this).attr('data-title'),musicArtist:$(this).attr('data-artist'),musicFile:$(this).attr('data-mp3'),musicPoster:$(this).attr('data-poster'),musicTime:$(this).attr('data-time-music')},function(){
$("#playlist_selected_songs").append($("#playlist_individual_li").html());
});
});
myPlaylist.play();
});
<li class="list-group-item">
<div class="pull-right m-l">
<span class="addtolistbutton">
{jrCore_module_function function='jrPlaylist_button' playlist_for='jrAudio' item_id=$musicId class='circleplus_icon_playlist' title='Add To Playlist'}
</span>
{if jrUser_is_logged_in()}
<a href="" id="listen_playlist_delete_item" title="delete music"><i class="icon-close"></i></a>
{/if}
{literal}
<script type="text/javascript">$(function() {var switchTo5x=true;});</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">$(function() {stLight.options({ publisher: "123456789-91211-121314-121617-181920212223242526", doNotHash: false, doNotCopy: false, hashAddressBar: false});});</script>
<span class='st_sharethis_large' displayText='ShareThis'></span>
{/literal}
</div>
<a href="" class="addplaylistmusic jp-play-me m-r-sm pull-left" data-title="{$musicTitle}" data-artist="{$musicArtist}" data-mp3="{$musicFile}" data-m4a="{$musicFile}" data-poster="{$musicPoster}">
<i class="icon-control-play text"></i>
<i class="icon-control-pause text-active"></i>
</a>
<div class="clear text-ellipsis">
<a href="$(this).attr('data-path')"><span>
{$musicTitle}
</span></a>
<span class="text-muted"> --
{$musicTime}
</span>
</div></li>
updated by @nmaster88: 08/01/16 04:35:48AM