The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

Message Background Javascript Not working as Well

View previous topic View next topic Go down

Message Background Javascript Not working as Well

Post by SpyroDragon on May 25th 2015, 12:18 am

As well as the name color, my background javascript has seemed to stop working, unless iv screwd the script up somehow

$(function() {
 customBg('Spyro ▀█▀ Dragon', 'Spyro-background', '');
  function customBg(name, classname, image) {
    var ua = window.navigator.userAgent, td = 'td', pos = '';
    if (ua.match(/Chrome/)) td = 'td:last-child', pos = '140% 0';
    if (ua.indexOf('MSIE ') > 0 || ua.match(/Trident/) || ua.match(/Chrome/)) $('head').append('<style type="text/css">.post.'+classname+' > '+td+' { background:none }.post.'+classname+' {background: url('+image+') no-repeat '+pos+' transparent }</style>');
    else $('head').append('<style type="text/css">.post.'+classname+' td { background:none }.post.'+classname+' {background: url('+image+') no-repeat center center / 100% 100% transparent }</style>');

Posts : 364
Reputation : 2
Language : English

Back to top Go down

Re: Message Background Javascript Not working as Well

Post by Niko on May 25th 2015, 4:31 pm

Hello @SpyroDragon

it seems that the code works correctly and that there are no errors in de syntax Wink

Have you installed other javascripts before this one?

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum