Okay... here it comes, 'cause Christmas is right around the corner :)
$(".message-form-content"). attr('style', ' ');
var elementos = document.querySelectorAll(".message-form-content");
for (var i = 0; i < elementos.length; i++){
elementos[i].style = '';
}
$("#load-content"). html(Success);
document.getElementById('load-content').innerHTML = success;
$("#imageForm"). reset();
document.getElementById('imageForm').reset();
$("#post9999999999"). val('');
document.getElementById('post9999999999').value = '';
$("#post9999999999"). Focus();
document.getElementById('post9999999999').focus();
$("#queued-files"). html("0");
document.getElementById('queued-files').innerHTML = "0";
// repare que assim como tinha é string, pode tamber fazer .innerHTML = "0" para ter Type Number
$(".Selected-files"). fadeOut(600);
Note: can (and should!) do this with CSS, there are already answers about it here at Sopt.
But in JS I think there is no, exmeplo live: http://jsfiddle.net/0sxqnnc0/.
var elementos = document.querySelectorAll('.selected-files');
for (var i = 0; i < elementos.length; i++) {
elementos[i].style.opacity = 1;
fade(elementos[i], 600);
}
function fade(el, duracao) {
if ((el.style.opacity -= 40 / duracao) < 0) el.style.display = "none";
else setTimeout(function () {
fade(el, duracao);
}, 40);
}
$("div.timeago"). timeago();
This one has to ask a question apart :) It has to explain better which plugin is and what function does.
In that reply, coincidentally, the script used to demonstrate the solution is jQuery Timeago, which converts a date to the notation of "X days ago" or "X minutes ago".
– Bruno Augusto
@Brunoaugusto good! I see I had already given
+1
in that reply... If anyone else reads this may go+1
just for me :)– Sergio
@Sergio Obrigado..
– Vinícius Lara
EDIT: to empty the
style
I chose to exchange the code for:document.getElementById('message-form-content').removeAttribute("style");
– Vinícius Lara