JSFiddle在localhost上无法正常工作 [英] JSFiddle does not work properly on localhost

查看:99
本文介绍了JSFiddle在localhost上无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试让我的JSFiddle在本地显示和正常工作时遇到了一些麻烦。下面是小提琴:http://jsfiddle.net/kelseyhisek/8vku6pta/



当我从JSFiddle保存页面源时,列的间距似乎关闭了,JQuery根本不起作用。



如果有人能帮助我,我会非常感激!非常感谢!

I'm having a bit of trouble trying to get my JSFiddle to display and work properly locally. Heres the fiddle: http://jsfiddle.net/kelseyhisek/8vku6pta/

When I save the page source from JSFiddle, the spacing of columns seems off and the JQuery does not work at all.

If anyone could help me out I would HUGELY appreciate it! Thanks so much!

推荐答案

可能是你正在使用外部JS和CSS文件并在根页面中给出了错误的路径。

你可以使用下面的代码。



May be you are using External JS and CSS file and giving wrong path in the root page.
You can use below code.

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        @import url("http://fonts.googleapis.com/css?family=Roboto:400,300,100,400italic,700italic,700");

        .delete {
            position: absolute;
            left: 0px;
            top: 0px;
            padding-top: 20px;
            padding-left: 10px;
            height: 50px;
            margin-right: 10px;
            width: 1%;
        }

            .delete:hover {
                -webkit-transition: width .2s ease-in-out;
                -moz-transition: width .2s ease-in-out;
                -o-transition: width .2s ease-in-out;
                transition: width .2s ease-in-out;
                width: 20%;
            }

        .days {
            display: inline-block;
            text-align: center;
            width: 166px;
            margin-top: 30px;
            font-family: "Roboto";
            font-weight: 400;
            font-size: 15px;
        }

        ul {
            float: left;
            list-style: none;
            margin-right: 10px;
            margin-left: 10px;
        }

        .colcontent {
            width: 1000px;
            top: 100px;
            height: 800px;
            position: absolute;
        }

        .connectable_list1 {
            /* background:blue;*/
            width: 166px;
            margin-bottom: 50px;
        }

        .connectable_list2 {
            /*background:red;*/
            width: 800px;
            margin-bottom: 50px;
        }

        .todo {
            clear: both;
        }

        .asgn {
            font-family: "Roboto";
            font-weight: 300;
            font-size: 13px;
            position: relative;
            float: left;
            width: 146px;
            height: 60px;
            margin-bottom: 2px;
            margin-right: 20px;
            padding-left: 30px;
            padding-top: 10px;
            background-color: #E8E8E8;
        }

        .td {
            position: relative;
            float: left;
            width: 146px;
            height: 60px;
            margin-bottom: 10px;
            padding-top: 10px;
            margin-right: 10px;
            padding-left: 30px;
            background-color: #E8E8E8;
        }
    </style>
</head>
<body>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
    <div class="headings">
        <ul>
            <li class="days">MONDAY</li>
            <li class="days">TUESDAY</li>
            <li class="days">Wednesday</li>
        </ul>
    </div>
    <div class="colcontent">
        <ul class="connectable_list1 connectedSortable">
            <li class="asgn"><span class='delete' style="background-color: blue;"><a href='#'>x</a></span>
                Assignment1</li>
            <li class="asgn"><span class='delete' style="background-color: red;"><a href='#'>x</a></span>Assignment2</li>
            <li class="asgn"><span class='delete' style="background-color: green;"><a href='#'>x</a></span>Assignment3</li>
            <li class="asgn"><span class='delete' style="background-color: green;"><a href='#'>x</a></span>Assignment4</li>
        </ul>
        <ul class="connectable_list1 connectedSortable">
            <li class="asgn"><span class='delete'><a href='#'>x</a></span>Assignment1</li>
            <li class="asgn"><span class='delete'><a href='#'>x</a></span>Assignment2</li>
            <li class="asgn"><span class='delete'><a href='#'>x</a></span>Assignment3</li>
            <li class="asgn"><span class='delete'><a href='#'>x</a></span>Assignment4</li>
        </ul>
        <div>
            <div class="todo">
                <ul class="connectable_list2 connectedSortable">
                    <li class="td"><span class='delete'>x</span>Todo1</li>
                    <li class="td"><span class='delete'>x</span>Todo2</li>
                    <li class="td"><span class='delete'>x</span>Todo3</li>
                    <li class="td"><span class='delete'>x</span>Todo4</li>
                </ul>
            </div>
        </div>
    </div>
    <script>


function (){


' a')。hide();
('a').hide();


这篇关于JSFiddle在localhost上无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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