Last edited by SNooPy89 on December 6th 2021, 1:06 am; edited 1 time in total
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
skouliki, Ape, TonnyKamper and tikky like this post
TonnyKamper likes this post
Niko likes this post
Niko likes this post
$(function() {
var d = new Date();
var month = d.getMonth()+1;
var day = d.getDate();
var currentDate = (day<10 ? '0' : '') + day + '.' + (month<10 ? '0' : '') + month + '.' + d.getFullYear();
$(".postprofile").each(function() {
var element = $(this);
var profile = $(this).find('.postprofile-name a');
var username = profile.html();
var href = profile.attr('href');
$.ajax({
url:href,
type:'GET',
success: function(data){
var birthday = $(data).find('dl#field_id-12 dd div font font').html();
if(birthday == currentDate) {
$(element).parent().find('.postbody').append('<div class="birthdayBox">Today is '+username+'\'s birthday</div>');
}
}
});
});
});
|
|
|
|
.birthdayBox {
background: #6c2f00;
color: white;
padding: 8px;
border-radius: 4px;
margin-top: 10px;
clear: both;
}
skouliki, SNooPy89, TonnyKamper, tikky and Winging like this post
Niko likes this post
Problem solved & topic archived.
|