PROBLEME DE SCRIPT
2 participants
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1 • Partagez
PROBLEME DE SCRIPT
Bonjour,
J'ai essayé de mettre sur mon forum une bande passante suivant vos explications ici:
https://forum.forumactif.com/t375724-creer-une-banniere-defilante-image-ou-texte
Mais cela ne fonctionne pas je ne vois que du texte:
1. Dans le widget ceci:
class="bandef" data-direction="right" data-stop="n" data-speed="8"> src="https://2img.net/r/hpimg15/pics/187331NOEL.gif"> src="https://2img.net/r/hpimg15/pics/187331NOEL.gif "> src="https://2img.net/r/hpimg15/pics/187331NOEL.gif"> src="url de l'image 4"> scr="https://2img.net/r/hpimg15/pics/187331NOEL.gif">
2. CSS code ceci:
.bandef{
display: none;
white-space: nowrap;
overflow: hidden;
-webkit-animation: marquee 20s linear infinite; /* Chrome, Safari, Opera */
animation: marquee 20s linear infinite; /* Vitesse de défilement */
}
/* Arrêt du défilement au survol */
.bandef:hover {
-webkit-animation-play-state: paused;
animation-play-state: paused
}
3. Le script ceci:
jQuery(function($){
if(typeof _userdata.page_desktop === "undefined"){
var m = $('.bandef'), w = 0, cw = m.parent().add('<span />').width(), st = 'y';
if(navigator.userAgent.match(/MSIE/) || navigator.userAgent.match(/rv:11\.0/) || navigator.userAgent.match(/maxthon/i) || (navigator.userAgent.match(/Safari/) && !navigator.userAgent.match(/Chrome/))){ if(st == 'y'){ m.attr({'onmouseover':'this.stop();', 'onmouseout':'this.start();'}); } m.attr('direction','left').removeAttr('class').parent().html(m.parent().html().replace(/div/g, 'marquee')); }
m.css('max-width', cw+'px').fadeIn().closest('td.row1').css('padding', '2px 0');
$('.bandef img, .bandef span').each(function(){ w = w+parseInt($(this).add('<span />').width()); });
if($('.bodylinewidth').length != 0) $('.bandef').each(function(){ if($(this).parent().is('div.gensmall')) w = w+cw; });
$('head').append('<style id="marquee_style">@-webkit-keyframesVoici le lien de mon forum marquee { 0% { text-indent: '+cw+'px } 100% { text-indent: -'+w+'px } } @keyframes marquee { 0% { text-indent: '+cw+'px } 100% { text-indent: -'+w+'px } }</style>');
if(st == 'n'){$('#marquee_style').append('.bandef:hover{ -webkit-animation-play-state: initial !important; animation-play-state: initial !important }'); }
}
});
Voici le lien de mon nouveau forum:
http://club-canin-des-amis.forumactif.com/
Bien sur j’enlève tout pour le moment.
Merci de m'aider
J'ai essayé de mettre sur mon forum une bande passante suivant vos explications ici:
https://forum.forumactif.com/t375724-creer-une-banniere-defilante-image-ou-texte
Mais cela ne fonctionne pas je ne vois que du texte:
1. Dans le widget ceci:
class="bandef" data-direction="right" data-stop="n" data-speed="8"> src="https://2img.net/r/hpimg15/pics/187331NOEL.gif"> src="https://2img.net/r/hpimg15/pics/187331NOEL.gif "> src="https://2img.net/r/hpimg15/pics/187331NOEL.gif"> src="url de l'image 4"> scr="https://2img.net/r/hpimg15/pics/187331NOEL.gif">
2. CSS code ceci:
.bandef{
display: none;
white-space: nowrap;
overflow: hidden;
-webkit-animation: marquee 20s linear infinite; /* Chrome, Safari, Opera */
animation: marquee 20s linear infinite; /* Vitesse de défilement */
}
/* Arrêt du défilement au survol */
.bandef:hover {
-webkit-animation-play-state: paused;
animation-play-state: paused
}
3. Le script ceci:
jQuery(function($){
if(typeof _userdata.page_desktop === "undefined"){
var m = $('.bandef'), w = 0, cw = m.parent().add('<span />').width(), st = 'y';
if(navigator.userAgent.match(/MSIE/) || navigator.userAgent.match(/rv:11\.0/) || navigator.userAgent.match(/maxthon/i) || (navigator.userAgent.match(/Safari/) && !navigator.userAgent.match(/Chrome/))){ if(st == 'y'){ m.attr({'onmouseover':'this.stop();', 'onmouseout':'this.start();'}); } m.attr('direction','left').removeAttr('class').parent().html(m.parent().html().replace(/div/g, 'marquee')); }
m.css('max-width', cw+'px').fadeIn().closest('td.row1').css('padding', '2px 0');
$('.bandef img, .bandef span').each(function(){ w = w+parseInt($(this).add('<span />').width()); });
if($('.bodylinewidth').length != 0) $('.bandef').each(function(){ if($(this).parent().is('div.gensmall')) w = w+cw; });
$('head').append('<style id="marquee_style">@-webkit-keyframesVoici le lien de mon forum marquee { 0% { text-indent: '+cw+'px } 100% { text-indent: -'+w+'px } } @keyframes marquee { 0% { text-indent: '+cw+'px } 100% { text-indent: -'+w+'px } }</style>');
if(st == 'n'){$('#marquee_style').append('.bandef:hover{ -webkit-animation-play-state: initial !important; animation-play-state: initial !important }'); }
}
});
Voici le lien de mon nouveau forum:
http://club-canin-des-amis.forumactif.com/
Bien sur j’enlève tout pour le moment.
Merci de m'aider
Re: PROBLEME DE SCRIPT
Bonjour ^^
Votre code HTML ne correspond pas du tout à celui du tuto.
Il s'agit d'un code, il faut donc que l'éditeur soit en mode code, dernier bouton sur fond blanc et non sur fond gris.
Ensuite avez vous activé le HTML sur votre forum et sur votre profil ?
Activation du HTML : 3 points de contrôle
Votre code HTML ne correspond pas du tout à celui du tuto.
Il s'agit d'un code, il faut donc que l'éditeur soit en mode code, dernier bouton sur fond blanc et non sur fond gris.
Ensuite avez vous activé le HTML sur votre forum et sur votre profil ?
Activation du HTML : 3 points de contrôle
Sujets similaires
» Un problème de script qui avait été résolu en decembre dernier...https://forum.forumactif.com/t394372-script-image-ne-fonctionne-plus
» Problème script
» problème de script
» probleme de script
» probleme de script
» Problème script
» problème de script
» probleme de script
» probleme de script
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum