Andy Matthews schreef:
> It never worked for me. IE 6+ for the PC.
>
You are right it doesn't work on IE6 or IE7. I assumed it worked because
i saw the player appear but it gets stuck loading. I have no idea how to
fix this, anyone else does?
There was a major flaw in the code but i set it straight now. the
improved code ;
$.fn.mp3player = function(play,stop){
if (typeof play == "undefined") { play = "play"; }
if (typeof stop == "undefined") { stop = "stop"; }
return this.each(function(){
$(this).prepend('<img src="http://del.icio.us/static/img/mp3/play.gif"
alt="'+play+'" class="mp3control"> ');
$(this).find("img.mp3control").click(function(){
var url = $(this).parent().attr("href");
var alt = $(this).attr("alt");
if(alt == play){
// reset all values op page
$("object#player").remove();
$("img.mp3control").attr({src :
"http://del.icio.us/static/img/mp3/play.gif", alt : play});
// adjust image and innerhtml
$(this).attr({src : "http://del.icio.us/static/img/mp3/stop.gif", alt :
stop});
$(this).after('<object width="100" height="14" align="middle"
id="player"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
style="vertical-align: bottom; margin-right: 0.2em;"><param
value="transparent" name="wmode"/><param value="sameDomain"
name="allowScriptAccess"/><param value="'+url+'&fontColor=000000"
name="flashVars"/><param
value="http://del.icio.us/static/swf/playtagger.swf"
name="movie"/><param value="high" name="quality"/><embed width="100"
height="14" align="middle"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" allowscriptaccess="sameDomain"
name="player" wmode="transparent" quality="high"
flashvars="theLink='+url+'&fontColor=000000"
src="http://del.icio.us/static/swf/playtagger.swf"
style="vertical-align: bottom; margin-right: 0.2em;"/></object>');
return false;
}else{
$(this).attr({src : "http://del.icio.us/static/img/mp3/play.gif", alt :
play});
$("object#player").remove();
return false;
}
});
});
};
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/