Author: DrDuyWin
Cách làm:
Tạo 1 javascript:
- Code:
$(function(){
$('#fa_welcome').after('
<div id="avatartbdw" class="avdw"></div>
');
});
jQuery(document).ready(function(){
jQuery.get('/profile?mode=editprofile&page_profil=avatars', function(data) {
link = jQuery('.frm dl dd img', data).attr('src');
if(link){
jQuery('#avatartbdw').html('<a href="/profile?mode=editprofile&page_profil=avatars"><img src="'+link+'" alt="" /></a>');
}else{
jQuery('#avatartbdw').html('');
}
});
});
- Code:
.avdw {
width: 25px;
height: 25px;
position: relative;
margin-top: -20px;
margin-left: -13px;
margin-bottom: -5px;
}