Jquery没有显示预期的结果 [英] Jquery not showing expected result

查看:65
本文介绍了Jquery没有显示预期的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的代码中,我有一个面板ID Panel7'和div id为'Amla'。我尝试了我的水平最好使文本'amla'放大并向用户显示。这不是hapenning。任何人都可以指出错误所在。这是在内容页面。



 <   asp:内容    ID   =  Content2    ContentPlaceHolderID   =  ContentPlaceHolder1   < span class =code-attribute> Runat   = 服务器 >  
< head >
< script src = http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js >
< / script >
< script >
$(document).ready(function(){
$(#Panel7)。mouseover(function(){
var div = $(#Amla);
Amla.animate({left:'1px'},slow);
Amla.animate({fontSize:'3em'},slow);
});
$(#Panel7)。mouseleave(function(){
var div = $(#Amla);
Amla.animate({left:'1px'},慢);
Amla.animate({fontSize:'1em'},慢);
});
});
< / script >
< / head >
< div > ;
< asp:Panel ID = Panel7 runat = server 宽度 = 158 高度 = 550 BorderWidth = 1 BorderColor = GhostWhite BorderStyle = Groove < span class =code-attribute> style = margin-top:1px;保证金左:264px;边境顶式:无;左边框风格:无; border-right-color:InfoBackground >
< table class = style = margin-left:0px; width = 157 >
< tr >
< td >
< asp:图像 ID = Image4 runat = server DescriptionUrl = 〜/ ImagesForHomeAspx / amla.jpg

高度 = 149px ImageUrl = 〜/ ImagesForHomeAspx / amla.jpg 宽度 = 157px / >
&l t; / td >
< / tr >
< / table >
< div id = Amla 样式 = 背景:#98bf21;身高: 100px;宽度:200px;位置:绝对; > Amla < / div >

解决方案

(document).ready(function(){


(#Panel7)。mouseover(function(){
var div =

( #阿姆拉);
Amla.animate({left:'1px'},slow);
Amla.animate({fontSize:'3em'},slow);
});


In the following code I have a panel id Panel7' and div id as 'Amla'. I tried my level best make the text 'amla' to enlarge and show to the user. It is not hapenning. Can any one point out where the mistake lies. This is in content page.

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
</script>
<script>
  $(document).ready(function() {
  $("#Panel7").mouseover(function(){
  var div = $("#Amla");
  Amla.animate({ left: '1px' }, "slow");
  Amla.animate({ fontSize: '3em' }, "slow");
  });
 $("#Panel7").mouseleave(function(){
 var div = $("#Amla");
 Amla.animate({ left: '1px' }, "slow");
 Amla.animate({ fontSize: '1em' }, "slow");
  });
});
</script>
</head>
<div>
   <asp:Panel ID="Panel7" runat="server" Width="158" Height="550"  BorderWidth="1" BorderColor="GhostWhite"  BorderStyle="Groove"  style=" margin-top:1px; margin-left:264px; border-top-style:none; border-left-style:none; border-right-color:InfoBackground ">
                <table class="" style=" margin-left:0px;  " width="157">
       <tr>
       <td>
       <asp:Image ID="Image4" runat="server" DescriptionUrl="~/ImagesForHomeAspx/amla.jpg"

       Height="149px" ImageUrl="~/ImagesForHomeAspx/amla.jpg" Width="157px" />
       </td>
       </tr>
       </table>
       <div id="Amla" style="background:#98bf21;height:100px;width:200px;position:absolute;">Amla</div>

解决方案

(document).ready(function() {


("#Panel7").mouseover(function(){ var div =


("#Amla"); Amla.animate({ left: '1px' }, "slow"); Amla.animate({ fontSize: '3em' }, "slow"); });


这篇关于Jquery没有显示预期的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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