2014-12-20, 00:41
- Description:
Hello! I have this JavaScript to thank the topic starter and for some reason it's not functionalanymore may i have some help to sort this issue?
Here is the code:
$(function () {
var x = $('.post').get();
for (i = 0; i < x.length; i++) {
if (x[i].getAttribute('style') == "background-color:#ddebca;") {
x[i].style.backgroundColor = '';
x[i].firstChild.nextSibling.style.backgroundColor = '';
x[i].firstChild.nextSibling.firstChild.style.backgroundColor = '';
x[i].firstChild.nextSibling.firstChild.nextSibling.style.backgroundColor = '';
var stars = document.createElement('div');
stars.setAttribute('style', 'text-align: center;');
stars.innerHTML = '<hr><div style="padding-top:2px;height:32px;line-height:36px;color:#0000FF;font-size:16px;font-weight:bold;text-align:center"><img style="vertical-align:top" src="https://i.servimg.com/u/f59/18/83/30/50/imagee14.png"> The Topic Starter Thanks You! <img style="vertical-align:top" src="https://i.servimg.com/u/f59/18/83/30/50/imagee14.png"></div>';
x[i].firstChild.nextSibling.firstChild.nextSibling.appendChild(stars);
}
}
});
Thank you for any help.
Regards
FrOsTyXi
- Information:
Forum: | http://www.team-psn.net/ | Version: | PUNBB |
Type: | Errors in code | Tags: | Thank,Topic,Starter |