jQuery .html(data here)は“ re-size”のようです応答テキスト

StackOverflow https://stackoverflow.com/questions/1404676

  •  05-07-2019
  •  | 
  •  

質問

次のコードを検討してください。

これは、 leader-module-total というIDを持つアンカータグで、押されるとPHPスクリプトを呼び出し、 leader-というID内のPHPコードで実行されたエコーを表示します。モジュール

十分な基本。

ただし、これを行うたびに、「縮小」する必要があります。このスニペットの最後のコードを使用しています。

私の質問は、どうしてですか?ここで何か間違っていますか?

$('#leader-module-total').click(function() {

   //load an image to show while processing
   $('#leader-module').html( '<div class="ajaxLoader"></div>' );

   //process the php script -- btw, is this valid i.e. calling it using / 
   //and not fully qualified with http://mydomain/page-to-be-called  
   $.get('/ajax-leader-module-response.php', { timeframe: 'total' }, 
       function(data){
          $('#leader-module').html( data );
       }
   );

   //this is my question: why is this necessary???  
   //I need to make it smaller than it was for it to display normally.
   $('#leader-module').css('font-size', '0.9333em');
   return false;
});
役に立ちましたか?

解決

親タグからスタイルを継承していると思います。フォントサイズスタイルの親要素を確認してください。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top