0
입력 필드를 확장하고 싶습니다. 그래서 이것은 거의 작동하지만 efect는 "blinky"입니다. 필드가 확장되고 collapses 및 intereseting 두 번째 입력을 다음 행으로 이동합니다. 어떤 방법 으로든 그것을 쓰거나 재 작성하는 방법에 대해 조언을 해줄 수 있습니까!애니메이션으로 입력 요소를 확대하십시오.
jQuery를
$('#menusearchform .s').mouseenter(function(){
var $this = $(this);
if (!$this.data('expand')) {
$this.data('expand', true);
$this.animate({width:'+=32px',left:'-=16px'});
}
$this.val("").focus();
}).mouseleave(function(){
var $this = $(this);
$this.data('expand', false);
$this.animate({width:'-=32px',left:'+=16px'});
});
HTML
<div id="divsearch">
<form method="post" action="index.php" id="menusearchform">
<input class="s" type="text" value="Search" name="felem1" />
<input class="s" type="text" value="Search" name="felem2" />
<input type="submit" value="Search" name="buttonSearch" />
<input type="reset" value="Reset" name="buttonReset" id="Reset"/>
</form>
</div>
TC : http://jsfiddle.net/fpgAn/ –
이 부분이 "intereseting이 두 번째 입력을 다음 행으로 이동하게 만듭니다"는 것을 이해하지 못합니다. 너 분명해? –
두 번째 입력 필드는 첫 번째 입력 필드 아래의 새 행으로 이동합니다. – Bakudan