Jquery Wordpress中Colorbox中的Google Adsense

Jquery Wordpress中Colorbox中的Google Adsense,jquery,wordpress,colorbox,adsense,Jquery,Wordpress,Colorbox,Adsense,我正在尝试将一些Adsense广告放在一个彩盒中,并做了以下工作: jQuery(document).bind('cbox_load', function(){ var $ads = jQuery('<div style="width:728px; height:90px; background:#fff; position:absolute; top:0; left:0;" id="adsenseColorbox"><script type="text/javascr

我正在尝试将一些Adsense广告放在一个彩盒中,并做了以下工作:

jQuery(document).bind('cbox_load', function(){
    var $ads = jQuery('<div style="width:728px; height:90px; background:#fff; position:absolute; top:0; left:0;" id="adsenseColorbox"><script type="text/javascript"><!--google_ad_client = "ca-pub-5435441464221407";/* APRO_728x90_textonly */google_ad_slot = "0595008022";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>'); 
    jQuery('#cboxContent').prepend($ads); 
});
jQuery(document).bind('cbox\u load',function(){
var$ads=jQuery(“”);
jQuery(“#cboxContent”).prepend($ads);
});
结果是:

<div id="cboxContent"...>
<div style="width:728px; height:90px; background:#fff; position:absolute; top:0; left:0;" id="adsenseColorbox"></div>
...
</div>

...

有人能帮我把谷歌Adsense的作品放在Colorbox里吗?谢谢。

试着把
$ads
做成一个字符串。删除jQuery()周围的
code
位。

code
jQuery(document.bind('cbox_load',function(){var$ads=“pagead2.googlesyndication.com/pagead/show_ads.js”>“jQuery('cboxContent')。prepend($ads););
code
@Oldskool但它不起作用。不,它不适用于该语法,因为您在内容中使用双引号作为边界。尝试使用单引号。这只会给我一个空div#adsenseColorboxSolved!使用此解决方案:Solved!使用此解决方案回答您的问题吗?