Script has a glitch
3 posters
Page 1 of 1
Script has a glitch
I had a script written for me a while ago, and I decided to use it in a community that has a lot of groups. The script is supposed to change the color of background of the poster, according to the user's group. It works flawlessly, but I noticed it doesn't work on multiple pages. Just the first page. When you select a different page after the first page, you'll see the default background image. Here's a link to my website that you'll see the issue. Working Fine Example Glitch Example
Here's the code
Here's the code
- Code:
window.bkg={};
bkg.copyright="Code by Wolfuryo. Use at your own risk. You can modify it, but this notice must remain here. Use my code without this notice and you'll be destroyed :D";
bkg.opacity="0.9";
bkg.init=function(){
if(!/t\d+\-/.test(location.pathname)) return;
bkg.len=$(".postprofile>dl>dt>strong>a>span[style]").length;
bkg.db();
};
bkg.db=function(){
var i=0;
for(i;i<bkg.len;i++){ $(".postprofile>dl>dt>strong>a>span[style]").eq(i).parent().parent().parent().parent().parent().parent().css({
"background":$(".postprofile>dl>dt>strong>a>span[style]").eq(i).css("color"),
"opacity":bkg.opacity
});
};
};
$(function(){
bkg.init();
})
Last edited by O'Malley Cat on Wed 18 Jul - 6:45; edited 1 time in total
O'Malley Cat- Forumember
- Posts : 25
Reputation : 1
Language : Spanish, English
Re: Script has a glitch
Hy, try this code, i tested on your forum and is fine to work.
|
Re: Script has a glitch
Problem solved & topic archived.
|
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum