使用JQuery的动画 [英] Animation using JQuery

查看:73
本文介绍了使用JQuery的动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,
我在隐藏",显示表单"和一个超链接(JQuery)上有两个按钮.
单击隐藏"时,应隐藏JQuery,单击显示"时,应显示JQuery.
以下是我的代码,谁能告诉我代码出了什么问题.

Hi friends,
I have two buttons on Hide, Show form and a hyperlink(JQuery).
On click of hide the JQuery should hide and on click of show JQuery should be displayed.
Following is my code, can anyone tell where code is going wrong..??


<html>
<head>
   <script type="text/javascript" src="JQuery.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <button id="btnHide">Hide</button>&nbsp;
        <button id="btnShow">Show</button><br /><br />
        <a href="#">JQuery</a>
    </div>
    <script type="text/javascript" language="javascript">
        $("#btnHide").click(function(){
        $("a").hide("slow");
        });
   
        $("#btnShow").click(function () {
        $("a").show(2000);
        });
    </script>
    </form>
</body>
</html>

推荐答案

(" span>).click(函数(){
("#btnHide").click(function(){


(" a").hide( 慢" span>); });
("a").hide("slow"); });


(" ).click (功能(){
("#btnShow").click(function () {


这篇关于使用JQuery的动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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