轨道滑块jQuery和Google Adsense [英] Orbit Slider jQuery and Google Adsense

查看:128
本文介绍了轨道滑块jQuery和Google Adsense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下方法在首页中实现轨道滑块这段代码:

I'm trying to implement Orbit Slider in my homepage using this code:

<script type="text/javascript" src="resources/js/jquery.js"></script>
<script type="text/javascript" src="resources/js/jquery.simplemodal.js"></script>
<script type="text/javascript" src="resources/js/help_support.js"></script>
<script type="text/javascript" src="resources/js/terms_conditions.js"></script>
<script type="text/javascript" src="resources/js/privacy_policy.js"></script>
<script type="text/javascript" src="resources/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="resources/js/jquery.orbit-1.2.3.min.js"></script>

<!--[if IE]>
    <style type="text/css">
        .timer { display: none !important; }
        div.caption { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);zoom: 1; }
    </style>
<![endif]-->

<script type="text/javascript">
    $(window).load(function() {
        $('#featured').orbit();
    });
</script>

这可行,但是如果我在页面上添加以下代码以显示Google Adsense广告,则滑块会停止在Safari,Chrome和Firefox中加载图像(由于某些原因,它仍可在Opera中运行).

This works, but if I add the following code to my page, where I want to show Google Adsense ads, the slider stops loading images in Safari, Chrome and Firefox (for some reason it still works in Opera).

<div>
    <script type="text/javascript">
        <!--
        google_ad_client = ad_client;
        /* homepage_200x200_1 */
        google_ad_slot = ad_slot;
        google_ad_width = 200;
        google_ad_height = 200;
        //-->
    </script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
</div>

在这里和此有用的页面上,我发现了许多有关jQuery冲突的问题.网络,但是我是javascript新手,无法使我的实际代码正常工作.

I've found many questions about jQuery conflicts in here and this useful page on the web, but I'm new to javascript and I'm not able to make my actual code work.

您能帮我修改代码吗? 预先谢谢你...

Can you please help me fixing my code? Thank you in advance...

推荐答案

我遇到了完全相同的问题,经过研究后我发现

I had the exact same problem and after doing research I found out that the

$(window).load(function(){

$(window).load(function() {

应该是

$(function(){

$(function() {

我在这里找到了答案 http://www.codingforums.com/showthread.php ?t = 253841

这篇关于轨道滑块jQuery和Google Adsense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆