尝试调试JavaScript时,总是打开您的控制台。对于初学者,当您尝试加载一些CSS文件时出现错误:
GET http://kimmy.lareveuse.net/css/sc-player.css 404 (Not Found)
这不会解决问题,但您应该修复它。
其次,你应该设置的文件编码:
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.
同样这也解决不了问题。实际的问题是您在which .browser
is removed中使用jQuery 1.9。这就是使用自定义的SoundCloud播放器嗅探器:
TypeError: $.browser is undefined [Break On This Error] if ($.browser.msie) {
因此,无论您需要升级的SoundCloud播放器脚本(如果有新版本可用),或者你需要降级的jQuery版本。
它显示了所有浏览器上的所有内容,但只有在Chrome浏览器中,它才会在单击播放时播放该歌曲。在IE和FireFox中,点击播放什么都不做。 – user2192572 2013-03-20 20:17:55