IdentifiantMot de passe
Loading...
Mot de passe oubli� ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les r�ponses en temps r�el, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

$('#ID').show().css({"display": "-webkit-flex", "display": "flex"}) avec Timeline.js


Sujet :

JavaScript

  1. #1
    Membre actif
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Janvier 2013
    Messages
    18
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 40
    Localisation : France, Puy de D�me (Auvergne)

    Informations professionnelles :
    Activit� : Technicien maintenance

    Informations forums :
    Inscription : Janvier 2013
    Messages : 18
    Par d�faut $('#ID').show().css({"display": "-webkit-flex", "display": "flex"}) avec Timeline.js
    Bonjour !

    Voili j'ai un petit souci avec JQuery et flexbox (� moins que �a vienne de Timeline.js) sous Firefox 52.0.1 (� jour ce jeudi 23 mars 2017)

    Le code:

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    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
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    <html>
     
    <head>
        <title>The Oracle Projects</title>
     
    	<link rel="stylesheet" href="style.css" />
    	<link rel="icon" href="http://www.oracle-projects.org/pythie.png" type="image/png">
    	<link title="timeline-styles" rel="stylesheet" href="timeline.css">
    </head>
     
    <body>
        <div id="HomePage">
    		<div class="conteneur">
    			<div id="WebGLCanvas"></div>
    			<div id="title">The Oracle Projects</div>
    		</div>
    		<div class="img"><img src="tiresias.jpg" title="Tiresias, blind greek Oracle" alt="Tiresias, Oracle grec aveugle"/></div>
    		<div class="soustitre"><a>Technological & Scientific Monitoring</a></div>
    	</div>
     
    	<div id="MainPage">
    		<div id="wheelDiv"></div>
    	</div>
     
    	<div id="Robotic">
    		<div id="ReturnFromRobotic"><h1>BACK</h1></div>
    		<div id="timeline-robotic"></div>
    	</div>
     
    	<div id="Space">
    		<div id="ReturnFromSpace"><h1>BACK</h1></div>
    		<div id="timeline-space"></div>
    	</div>
     
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r83/three.min.js"></script>
    	<!--<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>-->
    	<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
    	<script src="https://cdn.knightlab.com/libs/timeline3/latest/js/timeline.js"></script>
    	<script type="text/javascript" src="raphael.min.js"></script>
    	<script type="text/javascript" src="raphael.icons.min.js"></script>
    	<script src="raphael.icons.min.js.map"></script>
    	<script type="text/javascript" src="wheelnav.js"></script>
     
        <script type="text/javascript">
            var scene = new THREE.Scene();
     
            camera = new THREE.OrthographicCamera(250 / -2, 250 / 2, 250 / 2, 250 / -2, 0, 1600);
            scene.add(camera);
            camera.position.z = 1500;
     
            var renderer = new THREE.WebGLRenderer();
            renderer.setSize(200, 200);
            document.getElementById("WebGLCanvas").appendChild(renderer.domElement);
     
            // add hemisphere light
            var hemiLight = new THREE.HemisphereLight(0xffffff, 0xffffff, 0.6);
            hemiLight.color.setHSL(0.6, 1, 0.6);
            hemiLight.groundColor.setHSL(0.095, 1, 0.75);
            hemiLight.position.set(200, 400, -200);
            this.scene.add(hemiLight);
     
            //
     
            dirLight = new THREE.DirectionalLight(0xffffff, 1);
            dirLight.color.setHSL(0.1, 1, 0.95);
            dirLight.position.set(-1, 1.75, 1);
            dirLight.position.multiplyScalar(50);
            scene.add(dirLight);
     
            dirLight.castShadow = true;
     
            dirLight.shadowMapWidth = 2048;
            dirLight.shadowMapHeight = 2048;
     
            var d = 50;
     
            dirLight.shadowCameraLeft = -d;
            dirLight.shadowCameraRight = d;
            dirLight.shadowCameraTop = d;
            dirLight.shadowCameraBottom = -d;
     
            dirLight.shadowCameraFar = 3500;
            dirLight.shadowBias = -0.0001;
            dirLight.shadowDarkness = 0.35;
            //dirLight.shadowCameraVisible = true;
     
     
            var geometry = new THREE.BoxGeometry(150, 150, 150, 10, 10, 10);
     
            // material
            var material = new THREE.MeshLambertMaterial({
                map: THREE.ImageUtils.loadTexture('pythie.png')
            });
     
            //window.addEventListener('resize', onWindowResize, false);
     
            var cube = new THREE.Mesh(geometry, material);
            scene.add(cube);
     
    			function getRandomInt(min, max) {
     
    				min = Math.ceil(min);
    				max = Math.floor(max);
    				return Math.floor(Math.random() * (max - min)) + min;
     
    			}
     
    			cube.rotation.x = getRandomInt(300, 600);
    			cube.rotation.y = getRandomInt(300, 600);
    			fakeEvPageX = getRandomInt(0, 1000);
    			fakeEvPageY = getRandomInt(0, 1000);
     
            function render() {
                requestAnimationFrame(render);
     
    			renderer.render(scene, camera);
     
                window.onmousemove = function (event) {
                    ev = event || window.event;
                }
     
    			ooffsetWidth = document.getElementById("WebGLCanvas").offsetWidth /2;
    			ooffsetHeight = document.getElementById("WebGLCanvas").offsetHeight /2;
     
    			try {
    				cube.rotation.x -= ( ooffsetWidth - ev.pageX ) / 4000;
    				cube.rotation.y -= ( ooffsetHeight - ev.pageY ) / 3000;
    			}
    			catch(err) {
     
    				cube.rotation.x -= ( ooffsetWidth - fakeEvPageX ) / 4000;
    				cube.rotation.y -= ( ooffsetHeight - fakeEvPageY ) / 3000;
    			}
     
                renderer.render(scene, camera);
            };
            render();
     
            /*function onWindowResize() {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize(200, 200);
                render();
            }*/
        </script>
    	<script type="text/javascript">
     
    		function doWheel() {
     
    			wheel = new wheelnav('wheelDiv');
    			wheel.wheelRadius = 200;
    			wheel.hoverPercent = 1.08;
    			wheel.maxPercent = 1.6;
    			wheel.markerEnable = true;
    			wheel.markerAttr = { fill: '#0000ff', stroke: 'none' };
    			wheel.spreaderEnable = true;
    			wheel.spreaderPathFunction = spreaderPath().HolderSpreader;
    			wheel.titleFont = '16px aeroliteregular';
    			wheel.colors = ['#0000ff','#1919ff','#3333ff','#4d4dff'];
    			wheel.slicePathFunction = slicePath().MenuSlice;
    			wheel.initWheel(["Homepage","Robotic", "Space Odyssey", "Medicine", "Exobiology", "Computing"]);
    			wheel.navItems[0].navigateFunction = function () {
    				setTimeout( function() {
    					$('#MainPage').fadeOut(500);
    					wheel.removeWheel();
    					$('#HomePage').fadeIn(500);
    				}, 1400);
    			};
    			wheel.navItems[1].navigateFunction = function () { 
    				setTimeout( function() {
    					$('#MainPage').fadeOut(500);
    					wheel.removeWheel();
    					$('#Robotic').show().css({"display": "-webkit-flex", "display": "-ms-flexbox", "display": "flex", "-webkit-flex-direction": "row", "-ms-flex-direction": "row", "flex-direction": "row"});
    					timeline = new TL.Timeline('timeline-robotic', 'https://docs.google.com/spreadsheets/d/1OIY5pjfJXKKNp4L1Z7qurGLnpThbfC7igMhRxNVwKwY/pubhtml');
    				}, 1500);
    			};
    			wheel.navItems[2].navigateFunction = function () { 
    			setTimeout( function() {
    					$('#MainPage').fadeOut(500);
    					wheel.removeWheel();
    					$('#Space').show().css({"display": "-webkit-flex", "display": "-ms-flexbox", "display": "flex", "-webkit-flex-direction": "row", "-ms-flex-direction": "row", "flex-direction": "row"});
    					timeline = new TL.Timeline('timeline-space', 'https://docs.google.com/spreadsheets/d/1ClJczjXKxUUvYP1X_b9v4qEeAgOShKDSfakm6dEN_rM/pubhtml');
    				}, 1500);
    			};
    			wheel.navItems[3].navigateFunction = function () { };
    			wheel.navItems[4].navigateFunction = function () { };
     
    		};
     
    		$('#MainPage').hide();
    		$('#Robotic').hide();
    		$('#Space').hide();
     
    		$('.soustitre').click(function () {
    			$('#HomePage').fadeOut(500);
    			$('#MainPage').fadeIn(500);
    			doWheel();
    			wheel.createWheel();
    		});
     
    		$('#ReturnFromRobotic').click(function () {
    			$('#Robotic').fadeOut(500);
    			$('#MainPage').fadeIn(500);
    			doWheel();
    			wheel.createWheel();
    		});
     
    		$('#ReturnFromSpace').click(function () {
    			$('#Space').fadeOut(500);
    			$('#MainPage').fadeIn(500);
    			doWheel();
    			wheel.createWheel();
    		});
     
     
    	</script>
     
    </body>
    </html>

    Lien vers le site en cours de conception:


    Les Projets Oracle
    (pas m�galo du tout )


    Outils utilis�s:

    three.js/r83/three.min.js
    jquery-2.2.4.min.js
    Timeline.js
    Timeline.js Github
    Wheelnav.js
    Wheelnav.js Github


    Le Bl�me:

    Alors voil�, je ne comprends pas le comportement JQuery/CSS Fexbox Firefox et de ma timeline.js. En effet lorsque je regarde dans Firebug (voir le comportement de la timeline qu'elle soit 'Robotic' ou 'Space'), <div id= 'Robotic' style="display: flex; flex-direction: row;/*! height: 100%; */"></div>.

    Lorsque je met un height=100% � l'id 'Robotic' il ne m'affiche que la class="tl-storyslider". Sinon il ne m'affiche que la class="tl-timenav" (la timeline). Bref �a fonctionne � merveille sous Safari, Android ou Chrome mais pas sous Firefox... Je suis perdu lol. . Pleeeeeease heeeeelp !

  2. #2
    Membre actif
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Janvier 2013
    Messages
    18
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 40
    Localisation : France, Puy de D�me (Auvergne)

    Informations professionnelles :
    Activit� : Technicien maintenance

    Informations forums :
    Inscription : Janvier 2013
    Messages : 18
    Par d�faut Il fallait bien mettre un "height= 100%" � l'id="Robotic" pour que �a fonctionne aussi sous Firefox.
    Probl�me r�solu.

    The Oracle Projects

+ R�pondre � la discussion
Cette discussion est r�solue.

Discussions similaires

  1. Flex et Bison avec Visual
    Par kiroukou dans le forum MFC
    R�ponses: 16
    Dernier message: 16/05/2006, 14h47
  2. [CSS][Firefox] prob de display:block sur un TR
    Par cyberzoide dans le forum Mise en page CSS
    R�ponses: 4
    Dernier message: 04/05/2006, 11h37
  3. [VBA]�quivalent de display(wait, Titre) & display(end)
    Par Paul1804 dans le forum G�n�ral VBA
    R�ponses: 6
    Dernier message: 07/02/2006, 08h33
  4. [Flex & Bison] Probl�me avec yyFlexLexer
    Par kiroukou dans le forum Autres �diteurs
    R�ponses: 15
    Dernier message: 26/05/2005, 13h05

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo