Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquery中的mouseenter正在导致异常行为_Javascript_Jquery_Html_Asp.net_Css - Fatal编程技术网

Javascript jquery中的mouseenter正在导致异常行为

Javascript jquery中的mouseenter正在导致异常行为,javascript,jquery,html,asp.net,css,Javascript,Jquery,Html,Asp.net,Css,我试图使mouseenter和leave事件在jquery中工作,但似乎没有任何效果。如果我在图像上拖动鼠标而不遍历浏览器上的其他区域,mouseenter就会工作。整个页面如下所示。我必须使mouseenter和mouseleave事件正常工作 <%@ Page Language="C#" MasterPageFile="~/UserProfile/MasterPageProfile.master" AutoEventWireup="true" CodeFile="Photos.asp

我试图使mouseenter和leave事件在jquery中工作,但似乎没有任何效果。如果我在图像上拖动鼠标而不遍历浏览器上的其他区域,mouseenter就会工作。整个页面如下所示。我必须使
mouseenter
mouseleave
事件正常工作

 <%@ Page Language="C#" MasterPageFile="~/UserProfile/MasterPageProfile.master" AutoEventWireup="true" CodeFile="Photos.aspx.cs" Inherits="Photos" Title="Untitled Page" %>

<%-- Add content controls here --%>
<asp:Content runat="server" ID="Content2" ContentPlaceHolderID="head">

<script src="http://www.google.com/jsapi" type="text/javascript"></script>

<script type="text/javascript">google.load("jquery", "1.3.2");</script>

<link href="../.Jsfiles/Default.css" rel="stylesheet" type="text/css" />

<style type="text/css">
    .Images
    {
        padding: 10px;
        border: 1px solid gray;
    }
    #largeImage
    {
        position: absolute;
        border: 5px solid #DDDDDD;
    }
    .SelectionAnimate
    {
        top: 8px;
        left: 8px;
        position: absolute;
        display: none;
        background-color: #EEEEEE;
    }
    .gallery
    {
    }
    .imaginary
    {
    }
    .real
    {
    }




</style>

而不是现场使用

$(document).on('mouseenter', '.wrapper', function() {
        ...
});

试试我修改过的这个JSFIDLE:鼠标指针工作正常,css修改正确。这是行
$(This).find('.real img').css({'display':'block','top':'30px')

为什么要使用
live
?它已被弃用。我已尝试对
执行
,但似乎没有任何效果。。如果你说使用direct
mouseenter
,那么你认为我必须在页面上使用updatepanel..你试过“mouseover”和“mouseout”吗?但现在我也必须理解这种行为。。为什么会出现这种意外行为..为什么要使用jQuery 1.3.2?你试过使用一个更新的版本吗?“on”在他的jquery Paul的旧版本中不存在这是我更新的小提琴,这是我在鼠标上想要的东西哦,好的,我明白了,那么它被排序了吗?这很奇怪,你把它改成使用jquery 1.8.1了吗?我在JSFIDLE上看到您发布的JSFIDLE在1.8.3上运行良好感谢帮助。。。我第一次被困已经30个小时了,被困这么久真不酷,伙计。很高兴你成功了:)
<div style="width:780px;">
    <asp:ListView ID="ListViewThumbs" runat="server"  GroupItemCount="4"
        OnSelectedIndexChanged="ListViewThumbs_SelectedIndexChanged" DataKeyNames="Id"
        OnItemDataBound="ListViewThumbs_ItemDataBound">
        <LayoutTemplate>
            <div id="groupPlaceholder" runat="server" style="">
            </div>
        </LayoutTemplate>
        <GroupTemplate>
            <div id="itemPlaceholder" runat="server" style="">
            </div>
        </GroupTemplate>
        <SelectedItemTemplate>
            <div>
                <asp:Button ID="Button2" runat="server" Text="Select" CommandName="Select" />
                <asp:Image ID="Image1" runat="server" ImageUrl='<%#"~/UserProfile/ImageHandler.ashx?ImID="+ Eval("Id") %>' />
            </div>
        </SelectedItemTemplate>
        <ItemTemplate>
            <div style="float: left; position: relative; margin: 10px;" >
                <div  class="wrapper">
                    <a class="real" href='<%#"/ProfileTenModified/UserProfile/PhotoCross.aspx?in="+ Eval("Full_Image_Name") +"&mi=" + Eval("User_Id") +"&fd="+ Eval("Album")%>'>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%#"/ProfileTenModified/setP/"+ Eval("Slide_Thumb_Name") +".JPEG" %>'
                            BorderStyle="Solid" BorderWidth="1px" Width="172px" Height="172px" />
                    </a>
                    <asp:LinkButton CssClass="SelectionAnimate" ID="Selection" runat="server" Text="Set as Display"
                        OnCommand="ListViewThums_Selection_Command" CommandName="selection"></asp:LinkButton>
                    <asp:LinkButton CssClass="SelectionAnimate" ID="Deletion" runat="server" Text="Remove"
                        OnCommand="ListViewThumbs_Command"></asp:LinkButton>
                </div>
                <asp:HiddenField ID="HiddenFieldImageId" runat="server" Value='<%#Eval("Id") %>' />
            </div>
        </ItemTemplate>
    </asp:ListView>
</div>
$(document).on('mouseenter', '.wrapper', function() {
        ...
});