2017-10-12 14 views
-8

私はjavascriptを使い慣れていません。サインアップとログイン画面の設定をしています。ユーザがサインアップやログインをクリックしたときにスライドしたいのですが、index.jsは、私はそれを間違って実装していますか? Login screenJavascriptエラー画面

my error

+2

最初に素手で試してみてください.2回目にあなたのエラーを投稿してください**いくつかのコード化を試してください –

答えて

-1

あなたはjQueryのを使用しているなら、あなたは(クラス/ ID.slideToggleを追加することができます)、これはトリックを行います

が基準以下のURLを入力して試してください:w3schools.com/jquery/tryit.asp?filename=tryjquery_animation1

<!DOCTYPE html> 
<html> 
    <head> 
    <script src="ajax.googleapis.com/ajax/libs/jquery/3.2.1/…; 
    <script> 
     $(document).ready(function(){ 
     $("button").click(function(){ 
      $("div").animate({left: '250px'}); 
     }); 
     }); 
    </script> 
    </head> 

    <body> 
    <button>Start Animation</button> 
    <div style="background:#98bf21;height:100px;width:100px;position:‌​absolute;"></div> 
    </body> 
</html> 
+0

どのようにJQueryを追加しますか? –

+0

下記参照URLを入力して試してください:https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_animation1 <スクリプトSRC = "httpsの: //ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js ">

vic

+1

。 – haindl

0

<!DOCTYPE html> 
 
<html> 
 

 
<head> 
 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 
 
    <script> 
 
    $(document).ready(function() { 
 
     $("button").click(function() { 
 
     $("div").animate({ 
 
      left: '250px' 
 
     }); 
 
     }); 
 
    }); 
 
    </script> 
 
</head> 
 

 
<body> 
 

 
    <button>Start Animation</button> 
 

 
    <p>By default, all HTML elements have a static position, and cannot be moved. To manipulate the position, remember to first set the CSS position property of the element to relative, fixed, or absolute!</p> 
 

 
    <div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div> 
 

 
</body> 
 

 
</html>

関連する問題