Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2 つの画像があり、ボタンをクリックしてこれらをアニメーション化したいと考えています。ボタンをクリックすると、両方の画像が互いに近づきます。どのようにそれを行うことができますか?誰かが私がそれをするのを手伝ってくれませんか。
何かのようなもの:
$('input[type=button]').click(function() { $('#pic1').animate({left:+=50}); $('#pic2').animate({left:-=50}); });
ボタンをクリックすると、jquery または java で両方の要素を取得し、それらの位置を変更します。コードの作成をお手伝いできるよう、HTML を書き留めておいてください。