简体   繁体   English

Respond.js-似乎没有功能

[英]Respond.js - seems to have no function

I'm about ready to rip my hair out trying to make respond.js work. 我即将准备尝试使response.js正常工作。

We use it on all of our mobile sites, and usually there are no issues at all, but I've recently needed to make it possible to get mobile compatability going on one of our very, very old systems. 我们在所有的移动站点上都使用它,通常根本没有问题,但是最近我需要使移动兼容性在我们非常老的系统之一上得以实现。

I've tried everything I could - I've stripped out all of the extra code from the page, tried an alternative to respond, tried putting the script inline, I've even made a localhost copy. 我已经尽力了-我从页面上剥离了所有多余的代码,尝试了一种替代方法来进行响应,尝试将脚本内联,甚至制作了本地副本。 I know it's going to be something stupid but I just can't see it right now. 知道这会很愚蠢,但是我现在看不到它。

The entire code, after stripping it all back, is included below - works fine in Chrome, as always. 剥离全部代码后,下面将包含整个代码-与往常一样,在Chrome浏览器中可以正常运行。 I know respond.js isn't even being applied, because if I put the mobile styles in a media query they don't load either. 我知道甚至没有应用response.js,因为如果我将移动样式放入媒体查询中,它们也不会加载。

I've tried all this on the server too, to make sure it's not a local issue. 我也在服务器上尝试了所有这些方法,以确保这不是本地问题。

Can someone point out the silly mistake please! 有人可以指出这个愚蠢的错误!

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" id="property-results">
    <head>
        <title>Search Results</title>
        <link href="http://www.skitts.net/css/results.css" rel="stylesheet" type="text/css" />

        <script src="http://searchtest.issl.co.uk/js/respond.js"></script>
    </head>
    <body>
        <div class="property clearing">
            <div class="property-info">
                <span class="address">CROWN STREET, WOLVERHAMPTON.</span>
                <span class="price">
                    <span class="pre-price"></span>
                    <span class="price-amount">&pound;10,500 Annually</span>
                    <span class="post-price"></span>
                </span>
            </div>

            <a href="detailsLite.aspx?chainid=2047&propertyid=467168443" class="image" target="_blank" >
                <img src="http://img.issl.co.uk/2047/008/thumbs/GRB-11MH0ZQA_3559464935.jpg" alt="Address" />
                <div class="status let">Let</div>
            </a>

            <p class="description">SEPARATE STORAGE YARD To the north of the units is an adjacent fully enclosed storage yard with separate vehicular access extending to some 1,961 sq.yds. (0.4 a...</p>

            <ul>
                <li>0 Bed</li>
                <li>0 Bath</li>
                <li>0 Reception</li>
            </ul>

            <a href="detailsLite.aspx?chainid=2047&propertyid=467168443" class="more link" target="_blank">View full details and photography</a>

            <div class="ref-more">
                <span class="ref">REF: GRB-11MH0ZQA</span>

                <a href="detailsLite.aspx?chainid=2047&propertyid=467168443" class="more button" target="_blank">See more</a>
            </div>
        </div>
    </body>
</html>

Told you it would be something stupid. 告诉你这将是愚蠢的。 For obvious reasons, respond.js can't do anything with a stylesheet on another domain. 出于显而易见的原因,response.js不能对另一个域上的样式表执行任何操作。

D'oh. 天啊

Here's the compiled fiddle for your project. 这是您的项目的编译小提琴。

It works on every browser for me" 它适用于我的所有浏览器”

Fiddle 小提琴

Have you tried adding a meta viewport to your head tag? 您是否尝试过将meta视口添加到head标签?

<meta name="viewport" content="width=device-width; initial-scale=1.0;">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM