如果存在查询字符串,如何让我的颜色框自动显示。到目前为止,我有以下内容:
$(document).ready(function ()
{
//if this is coming from continental
if (document.location.href.indexOf("redirect=cfs") != -1)
{
//create box
var $notice = $("<div>hello World</div>").appendTo($("body"));
console.log($notice.text());
$notice.colorbox({ inline: true, width: "965px" });
}
});
但这无济于事,因为您似乎需要以某种方式触发颜色框来显示某些内容?
编辑:
我刚刚意识到您可以使用$.colorbox
,但是如何将我的内容放入其中?
问候, 雅克