Pregunta

Considere el siguiente código.

Es una etiqueta de anclaje con una identificación llamada leader-module-total que, cuando se presiona, llama a un script PHP y muestra los ecos hechos en el código PHP dentro de una identificación llamada leader- módulo .

Bastante básico.

Sin embargo, cada vez que hago esto, necesito "reducir" usando el último fragmento de código en este fragmento.

Mi pregunta es, ¿cómo es que? ¿Estoy haciendo algo mal aquí?

$('#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;
});
¿Fue útil?

Solución

Creo que está heredando estilos de la etiqueta principal. Compruebe los elementos principales para cualquier estilo de tamaño de fuente.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top