我正在使用打开单个 div 的多个按钮(动态):
<div class="dialog" title="Player">
<p>YouTube Player here</p>
</div>
在我使用的标题中:
<script>
$(function() {
$(".dialog").dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "blind",
duration: 1000
}
});
$(".opener").click(function() {
$(".dialog").dialog("open");
});
});
</script>
我得到这样的按钮使用:
foreach ($ytObject->RKT_requestResult->entry as $video) {
return = $ytObject->parseVideoRow($video);
$delimiter = "**";
$VideoContent = explode($delimiter, $return);
if ($count % 2 == 0) {
echo "<div class=\"ResultEven\">";
echo "<button class=\"opener btn\" class=\"btn\">Play</button> ";
echo "<a href = \"" . $VideoContent['0'] . "\" class=\"btn\">Download</a> ";
echo $VideoContent['6'];
echo "</div>";
} else {
echo "<div class=\"ResultOdd\">";
echo "<button class=\"opener btn\" class=\"btn\">Play</button> ";
echo "<a href = \"" . $VideoContent['0'] . "\" class=\"btn\">Download</a> ";
echo $VideoContent['6'];
echo "</div>";
}
$count++;
}
我想将 的值$VideoContent['0']
作为弹出内容,<div class="dialog" title="player">
以便我可以将 YouTube 视频直接放在模态框上。