我在一家在线音乐商店工作。有诸如 等按钮myplaylists...mydownloads单击这些按钮后,歌曲列表会相应地出现在网格视图中。
问题是,当我快速单击按钮两次时,列表会出现两次,例如 1..4..8 1..4..8,如果我快速单击三次,则会出现三次。显示列表的功能使用append()
将歌曲添加到列表中。
这些事情只发生在 Firefox 上
我无法弄清楚问题所在。
function fillMyMusicSongGrid
{
// code to fetch data from the database
embedSongGrid(.....);//displays the grid
}
embedSongGrid(.....)
{
//displays the grid
tableContent = '...............'
$(tableCont).appendTo('table#songList');
}