1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
| <head>
<script type="text/javascript" src="plugins/tagsphere/js/jquery.js"></script>
<script type="text/javascript" src="plugins/tagsphere/js/jquery-ui.js"></script>
<script language="javascript" src="plugins/tagsphere/js/jquery.tagSphere.js" type="text/javascript"></script>
<script type="text/javascript">
var sphere_active = new Boolean();
var isIE = document.all;
var mouseX = 0;
var mouseY = 0;
var facteur = 2;
var tolerance = 0.05;
var forCalcs = {
halfHeight: null,
halfWidth: null,
hwratio: null,
dtr: null,
diametr: null,
speedX: null,
speedY: null,
tLength: null,
whratio: null
}
sphere_active = false;
function diametr_transition(ratioto){
var diff = ratioto - forCalcs.hwratio;
if( !(Math.abs(diff) < tolerance))
{
forCalcs.hwratio += diff / facteur;
forCalcs.whratio = forCalcs.hwratio;
}
else
{
clearInterval(tRAnsiTIOn);
delete tRAnsiTIOn;
forCalcs.hwratio = ratioto;
forCalcs.whratio = forCalcs.hwratio;
}
}
function placement_div(e){
if (!e) e = window.event;
if (e)
{
mouseX = isIE ? (e.clientX + document.body.scrollLeft) : e.pageX;
mouseY = isIE ? (e.clientY + document.body.scrollTop) : e.pageY;
}
}
function menusphere(){
delete tRAnsiTIOn;
if (!sphere_active){
delete $('tagSphere');
document.getElementById("tagsphere").style.left = mouseX-420 +"px";
document.getElementById("tagsphere").style.top = mouseY-160 +"px";
sphere_active = true;
$('#tagsphere').tagSphere({
height: 280,
width: 280,
slower: 0.65,
radius: 120,
timer: 50
});
//$('#tagsphere').effect("scale", { percent: 200, direction: 'both' }, 1000);
//Les fonctions "effect" de scriptaculous semblaient ne pas être reconnue, alors que j'avais appelé le script.
tRAnsiTIOn = setInterval('diametr_transition(1)', 50);
}
else
{
sphere_active = false;
//$('#tagsphere').effect("scale", { percent: 0, direction: 'both' }, 1000);
tRAnsiTIOn = setInterval('diametr_transition(0)', 50);
};
return forCalcs.diametr;
return sphere_active;
}
function toucheMaintenueEnfoncee(e){
if (e.keyCode == 13) {
e = window.menusphere();
};
}
document.onkeypress = toucheMaintenueEnfoncee;
document.onmousemove = placement_div;
</script>
<INCLURE{fond=noisettes/headers/entete-meta}{skel=sommaire}{env}>
</head> |
Partager