mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Fr 29.03.2024 07:52 Benutzername: Passwort: Auto-Login

Thema: Probleme bei mehreren Javascripts vom 14.01.2011


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Programmierung -> Probleme bei mehreren Javascripts
Autor Nachricht
dr88
Threadersteller

Dabei seit: 14.09.2010
Ort: -
Alter: -
Geschlecht: Männlich
Verfasst Fr 14.01.2011 18:42
Titel

Probleme bei mehreren Javascripts

Antworten mit Zitat Zum Seitenanfang

Hi,

hab ein kleines Problem bzw. hoffe ich das und es ist kein großes. Und zwar funktionieren bei mir keine zwei Javascripte parallel. Eins funktioniert und und das andere wird immer ignoriert oder fehlerhaft dargestellt. Es funktioniert immer das Script, welches im "head-Bereich" an vorderer Stelle steht, das dahinter leider nicht.
Könnt ihr mir da weiterhelfen? Das Problem hatte ich schon öfters, nur jetzt frag ich mal um Rat und würde gerne wieder etwas lernen *zwinker*

Vielen Dank schon mal
Gruß dr
  View user's profile Private Nachricht senden
medientanja89

Dabei seit: 14.01.2011
Ort: -
Alter: -
Geschlecht: Weiblich
Verfasst Fr 14.01.2011 19:32
Titel

Antworten mit Zitat Zum Seitenanfang

hmm, vielleicht könntest du den code des js mal posten?
  View user's profile Private Nachricht senden
Anzeige
Anzeige
dr88
Threadersteller

Dabei seit: 14.09.2010
Ort: -
Alter: -
Geschlecht: Männlich
Verfasst Sa 15.01.2011 10:51
Titel

Antworten mit Zitat Zum Seitenanfang

ich sehe gerade, es ist genau andersrum, sorry, also das was an erster stelle steht funktioniert nicht und das was an zweiter steht funktioniert. Sprich die Lightbox (hier: Fancybox) funktioniert nicht und die Navigation funktioniert. wenn ich die anordnung tausche ist es genau umgekehrt.

Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GSV-Bitburg e.V.</title>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css">

<!-- LIGHTBOX-->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
   <script>
      !window.jQuery && document.write('<script src="js/fancybox/jquery-1.4.3.min.js"><\/script>');
   </script>
   <script type="text/javascript" src="js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
   <script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
   <link rel="stylesheet" type="text/css" href="js/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
   <script type="text/javascript">
      $(document).ready(function() {
         /*
         *   Examples - images
         */

         $("a#example1").fancybox();

         $("a#example2").fancybox({
            'overlayShow'   : false,
            'transitionIn'   : 'elastic',
            'transitionOut'   : 'elastic'
         });

         $("a#example3").fancybox({
            'transitionIn'   : 'none',
            'transitionOut'   : 'none'   
         });

         $("a#example4").fancybox({
            'opacity'      : true,
            'overlayShow'   : false,
            'transitionIn'   : 'elastic',
            'transitionOut'   : 'none'
         });

         $("a#example5").fancybox();

         $("a#example6").fancybox({
            'titlePosition'      : 'outside',
            'overlayColor'      : '#000',
            'overlayOpacity'   : 0.9
         });

         $("a#example7").fancybox({
            'titlePosition'   : 'inside'
         });

         $("a#example8").fancybox({
            'titlePosition'   : 'over'
         });

         $("a[rel=example_group]").fancybox({
            'transitionIn'      : 'none',
            'transitionOut'      : 'none',
            'titlePosition'    : 'over',
            'titleFormat'      : function(title, currentArray, currentIndex, currentOpts) {
               return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
            }
         });

         /*
         *   Examples - various
         */

         $("#various1").fancybox({
            'titlePosition'      : 'inside',
            'transitionIn'      : 'none',
            'transitionOut'      : 'none'
         });

         $("#various2").fancybox();

         $("#various3").fancybox({
            'width'            : '75%',
            'height'         : '75%',
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'      : 'none',
            'type'            : 'iframe'
         });

         $("#various4").fancybox({
            'padding'         : 0,
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'      : 'none'
         });
      });
   </script>

<!-- NAVIGATION -->

<style type="text/css">
* {
   margin:0;
   padding:0;
   list-style:none;
}
body {
   font-family: Arial, Helvetica, sans-serif;
   font-size: 11px;
   margin:10px;
}

#basic-accordian{
   border:1px solid #dadada;
   width:378px;
   height:448px;
   position:absolute;
   z-index:2;
}

.accordion_headings{
   padding:5px;
   background-image:url(images/background_navigation_1.png);
   color:#000;
   border:1px solid #FFF;
   cursor:pointer;
   font-weight:bold;
}

.accordion_headings:hover{
   background-image:url(images/background_navigation_2.png);
   color:#fff;
}

.accordion_child{
   padding:10px;
   background-image:url(images/background_navigation_3.png);
   height:350px;
}

.header_highlight{
   background-image:url(images/background_navigation_2.png);
   color:#fff;
}

</style>
<script type="text/javascript" src="js/navigation.js"></script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

</head>


Zuletzt bearbeitet von dr88 am Sa 15.01.2011 10:54, insgesamt 2-mal bearbeitet
  View user's profile Private Nachricht senden
 
Ähnliche Themen Probleme mit SimpleViewer und mehreren Galerien
[javascripts] childnodes von listen
mehrere javascripts auf einer seite
Not-Selector mit mehreren IDs in CSS
Webite aus mehreren SWF´s?
Formular mit mehreren Beratern (PHP)
Neues Thema eröffnen   Neue Antwort erstellen
MGi Foren-Übersicht -> Programmierung


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.