gpt4 book ai didi

javascript - 无法让动画正常工作

转载 作者:行者123 更新时间:2023-11-28 10:24:33 24 4
gpt4 key购买 nike

我有一个 Jquery 动画,它应该采用一个覆盖文本框的 div,并在单击时将其弹回边框。但是我似乎无法在重制后让动画跳起来。有什么想法吗?

Java 脚本

function moveup(title,text){
$(title).animate{
if (text).value==""){
$(title).animate({
top: '-18px'}, '300');
$('text').focus();
}

{
$('.inputborder').css({
border: 'solid 2px #49acc7'}, '300');
}

{
$('.inputtitle').css({
color: '#49acc7'}, '300');
}

}
}

        function movedown(t){
if (t.value==""){
$('.inputtitle').animate({
top: '0px'}, '300');
}

{
$('.inputborder').css({
border: 'solid 2px #bec3c8'}, '300');
}

{
$('.inputtitle').css({
color: '#bec3c8'}, '300');
}

}

内联代码

<div id="custnumbertitle" class="inputtitle" style="z-index:2;position:absolute;width:300px;height:35px;text-align:left;left:23px;top:0px;vertical-align:middle;line-height:35px;" onclick="moveup('custnumbertitle,custnumber')"><span style="background-color:white;"> CUSTOMER NUMBER </span> </div>

<Input Type="text" id="custnumber" onblur="movedown(this)" width="150px" style="z-index:1;position:relative;top:3px;right:0px;width:320px;height:30px;border-radius:20px;border: solid 0px #bec3c8;"><a href="#" class="tooltip">

最佳答案

您的代码看起来需要大量清理。首先 (text).value=="") 需要是 ((text).value=="") 还有很多括号似乎有没有理由在那里。当你说你想要一个覆盖文本输入的盒子弹跳时,你的意思是像 this here 这样的东西吗? ?

关于javascript - 无法让动画正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23793153/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com