2
I have the following Java Script code:
status.text('Enviando...');
How do I format this information that will be written on the screen with CSS?
Complete code:
<script type="text/javascript" src="js/jquery-1.6.1.min.js" ></script>
<script type="text/javascript" src="js/ajaxupload.3.5.js" ></script>
<link rel="stylesheet" type="text/css" href="./styles.css" />
<script type="text/javascript" >
$(function(){
var btnUpload=$('#upload');
var status=$('#status');
new AjaxUpload(btnUpload, {
// Arquivo que fará o upload
action: 'upload-file.php?cliente=<?php echo $cliente; ?>&cod=<?php echo $cod; ?>',
//Nome da caixa de entrada do arquivo
name: 'uploadfile',
onSubmit: function(file, ext){
if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){
// verificar a extensão de arquivo válido
status.text('Somente JPG, PNG ou GIF são permitidas');
return false;
}
status.text('Enviando...');
status.
},
onComplete: function(file, response){
//Limpamos o status
status.text('');
//Adicionar arquivo carregado na lista
if(response==="success"){
$('<li></li>').appendTo('#files').html('<strong>Foto inserida com sucesso!').addClass('success');
} else{
$('<li></li>').appendTo('#files').html('<strong>Foto inserida com sucesso!').addClass('success');
}
}
});
});
</script>
It didn’t work. I used the same code you gave me. There is no STYLE object.
– Gladison Neuza Perosini
You are using jQuery framework?
– Filipe
See the complete code I posted
– Gladison Neuza Perosini
Perfect, using jQuery. See my edition.
– Filipe
To increase the font? Because I put status.css("size", "30px"); and it didn’t work.
– Gladison Neuza Perosini
Use
status.css("font-size","30px")
– Filipe
Let’s go continue this discussion in chat.
– Gladison Neuza Perosini