如何在其他页面上使用jQuery动画而不是site.master? [英] How to have jQuery animation on Other pages instead of site.master?

查看:84
本文介绍了如何在其他页面上使用jQuery动画而不是site.master?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个网站......这是我的第一个项目......下面的代码动画在Site.Master的< Head>上运行良好。内容...



 <   script     type   =   text / javascript >  
$(document).ready(function (){
$(#Label1)。animate({fontSize:'76px'},slow);
});
< / script >





但是当我试图把它放在Site.Master的WebForms上时,比如MyHome.aspx它没有用......
那么我应该在哪里使用这个动画......我找到了



 <   asp:内容    ID   =  HeaderContent   < span class =code-attribute> runat   =  server    ContentPlaceHolderID   =  HeadContent >  
我在此处插入代码... i不工作......?
< / asp:Content

>



这是错误..感谢正确的方向......?



谢谢&问候 - Paramu

解决方案

(document).ready(function(){


(#Label1)。animate( {fontSize:'76px'},慢);
});
< / script >





但是当我试图把它放在Site.Master的WebForms上时,比如MyHome.aspx它没有用......
那么我应该在哪里使用这个动画......我找到了



 <   asp:内容    ID   =  HeaderContent   < span class =code-attribute> runat   =  server    ContentPlaceHolderID   =  HeadContent >  
我在此处插入代码... i不工作......?
< / asp:Content

>



这是错误..感谢正确的方向......?



谢谢&问候 - Paramu


您需要通过 ClientID 选择标签。

 

Hi, Iam developing a website...It's my first project...The below code animation is working good on Site.Master's <Head> content...

<script type="text/javascript">
           $(document).ready(function () {
               $("#Label1").animate({ fontSize: '76px' }, "slow");
           });
</script>



but when I try to put is on Site.Master's WebForms like MyHome.aspx it's not working...
So where should I use this animation...I found

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
I inserted the code here...its not working....?
</asp:Content

>

Is that mistake..thanks for the right directions...?

Thanks & Regards - Paramu

解决方案

(document).ready(function () {


("#Label1").animate({ fontSize: '76px' }, "slow"); }); </script>



but when I try to put is on Site.Master's WebForms like MyHome.aspx it's not working...
So where should I use this animation...I found

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
I inserted the code here...its not working....?
</asp:Content

>

Is that mistake..thanks for the right directions...?

Thanks & Regards - Paramu


You need to select the label by its ClientID.


这篇关于如何在其他页面上使用jQuery动画而不是site.master?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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