2017-02-18 2 views
0

タイトルと同じように、jQuery UIアコーディオンのコンテンツdiv内に単一の入力とボタンを持つフォームがあり、テキストを入力できません私はそれをテストするときにそれに。ボタンをクリックすることもできません。ここでjQuery UIのアコーディオン内にあるフォームにテキストを入力できません

はHTMLである:ここでは

<button type="button" id="ic-open-report"><i class="fa fa-envelope"></i><p>Export Savings Report</p></buttOn> 
        <div id="ic-savings-report"> 
         <h4>Export a PDF Savings Report</h4> 
          <div> 
          <form method="POST" class="savings-report"> 

             <input style="user-select: text;" type="email" id="ic-email" placeholder="Email"> 
             <button type="submit" >Export</button> 
          </form> 
          </div> 
        </div> 

はjQueryのです:

$('#ic-savings-report').accordion({ 
    collapsible: true, 
    active: false, 
    animate: 400 
}); 
$('#ic-savings-report').hide(); 

$('#ic-open-report').click(function(){ 
    $('#ic-savings-report').toggle(700); 
    setTimeout("$('#ic-savings-report').accordion('option', 'active', 0  );", 1000); 
}); 

私はこれが起こる理由さえわかりません。なぜ入力を編集できないのですか?ここで

は、実際のプロジェクトへのリンクです: http://lcstuff.000webhostapp.com/intellifrost-calculator/

答えて

0

私が来ましたこの問題とjquery全体で、この要素のfont-size: 1em.ui-widget inputに設定していたため、何らかの理由でこれがテキストを見えなくしました。だから私は入力したときにテキストが表示されないので、テキストを入力できないという印象を与えました。

私はちょうどそれを修正するために、次に設定します。

font-size: 14px; 
0

は、限り、あなたは適切にjQueryとjQueryのUIを参照するとうまく動作するようです:

$('#ic-savings-report').accordion({ 
 
    collapsible: true, 
 
    active: false, 
 
    animate: 400 
 
}); 
 
$('#ic-savings-report').hide(); 
 

 
$('#ic-open-report').click(function() { 
 
    $('#ic-savings-report').toggle(700); 
 
    setTimeout("$('#ic-savings-report').accordion('option', 'active', 0  );", 1000); 
 
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<script src="http://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script> 
 
<button type="button" id="ic-open-report"> 
 
    <i class="fa fa-envelope"></i> 
 
    <p>Export Savings Report</p> 
 
</button> 
 
<div id="ic-savings-report"> 
 
    <h4>Export a PDF Savings Report</h4> 
 
    <div> 
 
     <form method="POST" class="savings-report"> 
 
    
 
      <input style="user-select: text;" type="email" id="ic-email" placeholder="Email"> 
 
      <button type="submit">Export</button> 
 
     </form> 
 
    </div> 
 
</div>

+0

私はあなたの参照をしようとすると、それはまだ私のために動作しません。これはプロジェクトへのリンクです:http://lcstuff.000webhostapp.com/intellifrost-calculator/。 2つの緑色の浮動ボタンの「輸出貯蓄レポート」と表示されている最上部のボタンは、フォーム付きのボタンです。 –

+0

私はあなたの問題がこのコードにあるとは思わない。私は電子メールのフィールドとボタンが要素の背後にレイヤーがあるので、問題を見る* "あなた自身の冷凍システムの値を入力してIntellFrostが解凍コストをどのくらい節約できるかを計算します。その要素の背後にあるアコーディオンを明らかにするには、その要素を非表示にする必要があります。 –

+0

これは、私が行っているjoyrideプラグインです。それらのボタンをクリックするだけで、それらは消えます。要素が表示されないようにスクリプトを無効にしても、テキストフィールドに何も入力することはできません。 –

関連する問題