[Tutorial] Mensagem ao clicar em obrigado a um usuário
Página 1 de 1 • Compartilhe
- Zump
- Tempo Online : 33d 4h 43m 44s
Mensagens : 52
Reputação : 53
Autor: Zump
Funcionalidade: Em todas as paginas
Crie um novo javascript com investimento nos tópicos com esse código:
- Código:
$(function() {
var thanked = $('#main-content > .post[style*="background-color"]')[0];
if (thanked) {
thanked.className += ' thanked-post';
thanked.style.backgroundColor = '';
thanked.insertAdjacentHTML(
'beforeend',
'<div class="thanked-message"><i class="fa fa-thumbs-up"></i> {USERNAME} obrigado por responder a esse tópico!</div>'
.replace('{USERNAME}', $(thanked).find('.username').text())
);
$('head').append('<style type="text/css">'+
'.thanked-post .thanked-message { color:#FFF; font-size:13px; background:#8B5; margin:10px -1px -1px -1px; padding:0px 15px; height:45px; line-height:45px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }'+
'.thanked-message .fa-thumbs-up { font-size:20px; margin-right:5px; vertical-align:-2px; }'+
'@media (min-width:0px) and (max-width:768px) {'+
'.thanked-post { padding-bottom:116px; }'+
'.thanked-post .thanked-message { position:absolute; bottom:0; left:0; right:0; }'+
'.thanked-post .postbody .profile-icons { bottom:44px; }'+
'}'+
'</style>');
}
});
Resultado pode ser visto aqui no fórum.
Tópicos semelhantes
Cria uma conta ou logue para postar uma mensagem.
Você precisa ser um membro, para poder postar uma resposta.
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|