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

jQuery Discussion :

Deux scripts fonctionnent sur trois


Sujet :

jQuery

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2011
    Messages
    32
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Novembre 2011
    Messages : 32
    Par défaut Deux scripts fonctionnent sur trois
    Bonjour à toutes et à tous,

    J'ai un problème de script. J'ai plusieurs script que je charge sur ma page, pour pouvoir bénéficier de la puissance de jQuery. Un menu, une scrollbar ainsi qu'une modal. Mais voilà, mon menu est fonctionnel tout comme ma modal mais la scrollbar ne fonctionne pas. Cela fait un paquet d'heures et je remercie d'avance l'âme charitable qui me donnera un petit coup de main....

    Voici le code de mon head ...

    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
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    	<!-- mousewheel plugin -->
     
    <script src="js/jquery.mousewheel.min.js"></script>
    	<!-- custom scrollbars plugin -->
    <script src="js/jquery.mCustomScrollbar.js"></script>
    <script type="text/javascript" src="js/interface.js"></script>
    <script type="text/javascript" src="js/modal.popup.js"></script>
    <!--[if lt IE 7]>
     <style type="text/css">
     div, img { behavior: url(iepngfix.htc) }
     </style>
    <![endif]-->
    <script>
     
    (function($){
            $(document).ready(function(){
                $("#contentText").mCustomScrollbar();
            });
        })(jQuery);
    </script>
    <script language="javascript">
     
        $(document).ready(function() {
     
    		//Change these values to style your modal popup
    		var align = 'center';									//Valid values; left, right, center
    		var top = 200; 											//Use an integer (in pixels)
    		var width = 650; 										//Use an integer (in pixels)
    		var padding = 0;										//Use an integer (in pixels)
    		var backgroundColor = '#FFFFFF'; 						//Use any hex code
    		var source = 'content/map.php'; 						//Refer to any page on your server, external pages are not valid e.g. http://www.google.co.uk
    		var borderColor = '#333333'; 							//Use any hex code
    		var borderWeight = 0; 									//Use an integer (in pixels)
    		var borderRadius = 5; 									//Use an integer (in pixels)
    		var fadeOutTime = 300; 									//Use any integer, 0 = no fade
    		var disableColor = '#666666'; 							//Use any hex code
    		var disableOpacity = 40; 								//Valid range 0-100
    		var loadingImage = 'lib/release-0.0.1/loading.gif';		//Use relative path from this page
     
    		//This method initialises the modal popup
            $(".modal").click(function() {
                modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
            });
     
    		//This method hides the popup when the escape key is pressed
    		$(document).keyup(function(e) {
    			if (e.keyCode == 27) {
    				closePopup(fadeOutTime);
    			}
    		});
     
    		});
     
    		$(document).ready(function() {
    		$('#dock').Fisheye(
    				{
    					maxWidth: 50,
    					items: 'a',
    					itemsText: 'span',
    					container: '.dock-container',
    					itemWidth: 40,
    					proximity: 90,
    					halign : 'center'
     
    					}
     
     
    			)
     
     
        });
     
     
     
    </script>

  2. #2
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2011
    Messages
    32
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Novembre 2011
    Messages : 32
    Par défaut Suite
    J'ai regardé dans la doc JQuery, j'a trouvé un truc sur noconflict(), je l'ai implémenté. Maintenant ma scrollbar apparaît, le modal et le menu fonctionne, mais la scrollbar ne scroll pas...

    Voici le code mis à jour.

    Merci d'avance !
    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
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    	<!-- mousewheel plugin -->
    <script src="js/jquery.mousewheel.min.js"></script>
    	<!-- custom scrollbars plugin -->
    <script src="js/jquery.mCustomScrollbar.js"></script>
    <script type="text/javascript" src="js/interface.js"></script>
    <script type="text/javascript" src="js/modal.popup.js"></script>
     
    <!--[if lt IE 7]>
     <style type="text/css">
     div, img { behavior: url(iepngfix.htc) }
     </style>
    <![endif]-->
    <script>
    jQuery.noConflict();
     
       jQuery(document).ready(function($){
     
     
     
    	//Change these values to style your modal popup
    		var align = 'center';									//Valid values; left, right, center
    		var top = 200; 											//Use an integer (in pixels)
    		var width = 650; 										//Use an integer (in pixels)
    		var padding = 0;										//Use an integer (in pixels)
    		var backgroundColor = '#FFFFFF'; 						//Use any hex code
    		var source = 'content/map.php'; 						//Refer to any page on your server, external pages are not valid e.g. http://www.google.co.uk
    		var borderColor = '#333333'; 							//Use any hex code
    		var borderWeight = 0; 									//Use an integer (in pixels)
    		var borderRadius = 5; 									//Use an integer (in pixels)
    		var fadeOutTime = 300; 									//Use any integer, 0 = no fade
    		var disableColor = '#666666'; 							//Use any hex code
    		var disableOpacity = 40; 								//Valid range 0-100
    		var loadingImage = 'lib/release-0.0.1/loading.gif';		//Use relative path from this page
     
    		//This method initialises the modal popup
            $(".modal").click(function() {
                modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
            });
     
    		//This method hides the popup when the escape key is pressed
    		$(document).keyup(function(e) {
    			if (e.keyCode == 27) {
    				closePopup(fadeOutTime);
    			}
    		});
     
     
     
    	 $('#dock').Fisheye(
    				{
    					maxWidth: 50,
    					items: 'a',
    					itemsText: 'span',
    					container: '.dock-container',
    					itemWidth: 40,
    					proximity: 90,
    					halign : 'center'
     
    					}
     
     
    		  );
     
     
    	$("#contentText").mCustomScrollbar();
     
     
     
     
    	})(jQuery);
     
     
     
     
    </script>

Discussions similaires

  1. Erreur 404 : script fonctionne sur IE8 et pas sur firefox
    Par patmaba dans le forum Général JavaScript
    Réponses: 6
    Dernier message: 08/06/2014, 18h46
  2. Script fonctionne sur firefox mais pas IE
    Par johndu81 dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 17/01/2013, 01h29
  3. Deux scripts jquery sur la même page ?
    Par beegees dans le forum jQuery
    Réponses: 1
    Dernier message: 01/03/2011, 23h34
  4. Script fonctionnant sur Mozilla mais pas sur IE !!!
    Par guigui48 dans le forum Mise en page CSS
    Réponses: 3
    Dernier message: 19/02/2010, 11h43
  5. Réponses: 1
    Dernier message: 26/03/2009, 15h48

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