小编Bab*_*uro的帖子

jquery没有在特定的html文件上工作

我是jquery的新手,并且遇到了一个奇怪的问题.不知怎的,jquery不能处理我作为网站首页创建的html文件.如果我在一个空白的html文件中使用它,同样的jquery-code正在工作,所以我或者它正在尝试使用的服务器(000webhost.com)应该没有任何问题.

我一直在努力调试这几天,所以任何帮助都会受到赞赏.

这是我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>MG</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
jQuery.noConflict();
jQuery(document).ready(function($){
    $("button").click(function(){
      $("#logo").hide();
    });
});
</script>
</head>
<body>
<div id="content">
    <div id="header">
        <div id="logo"><button>test</button></div>
        <div id="sitehistory"> History:<br />Samu added [PIC] (30min ago)</div>
    </div>

    <div id="container">
        <div id="wall">
            <div id="navi"><a id="showlatest" title="Latest">Latest</a> | <a id="showmostpopular" title="MostPopular">Most Popular</a> | <a id="showsearchbox" title="Search">Search</a> </div>
            <?php include("latest.php");?>
        </div>
        <div id="profilebar"><?php include("login-form.php"); ?></div>
        </div>
    <div id="footer"> …
Run Code Online (Sandbox Code Playgroud)

html jquery

1
推荐指数
1
解决办法
453
查看次数

C#IndexOutOfRangeException错误

这里有轻微的c#问题.我目前正在使用Unity编写一个小型平台游戏,我有一些用于检查碰撞的光线投射等.

现在,我开始通过将那些光线投射的结果存储到整数数组中来清理代码,但是我得到了一个IndexOutOfRangeException.

我试图多次阅读我的代码,但似乎无法找到导致问题的原因.如果有人可以帮助我,我会很高兴.

这是我的代码:

using UnityEngine;
using System.Collections;

public class PlayerRayCaster : MonoBehaviour {

    public float playerHeight = 1;
    public enum FeetState {Air, Ground};

    public FeetState playerFeetState = FeetState.Air;
    public int feetHitRays;
    public int behindHitRay;

    //Arrays of rays. value of 1 means that ray hits a target, 0 means that it does not hit.
    public int[] sideRays; // [0-3] = Left side. [4-8] = Right side.
    public int[] depthRays; // [0] = Away from camera. [1] = Towards camera.
    public …
Run Code Online (Sandbox Code Playgroud)

c# unity-game-engine indexoutofboundsexception

-1
推荐指数
1
解决办法
703
查看次数