mootools navigation - aufklapp geschwindigkeit anpassen

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • MPstudent
    Contao-Nutzer
    • 26.09.2009
    • 244

    #1

    mootools navigation - aufklapp geschwindigkeit anpassen

    hallo forum,

    kann ich die geschwindigkeit des accordion effects anpassen, so habe ich es versucht aber keine änderung:

    Code:
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
    window.addEvent('domready', function() {
      new Accordion($$('div.toggler'), $$('div.accordion'), {
       alwaysHide: true,
        opacity: false,
        duration: 600
    
    
      });
    });
    //--><!]]>
    </script>
    irgendwelche tipps?

    besten dank
    .christoph
  • andreas.schempp
    Contao Core-Team
    Association Vorstand
    • 15.06.2009
    • 5701

    #2
    Also bei mir funktioniert das ungefähr so...

    JSFiddle - Test your React, Tailwind, JavaScript, CSS, HTML online with JSFiddle.
    terminal42 gmbh
    Wir sind Contao Premium-Partner! Für Modulwünsche oder Programmierungen kannst du uns gerne kontaktieren.
    Hilfe für Isotope eCommerce kann man auch kaufen: Isotope Circle

    Kommentar

    • MPstudent
      Contao-Nutzer
      • 26.09.2009
      • 244

      #3
      hallo andreas,

      irgendwie will das in kombination mit der mootools navi nicht funktionieren, hast du da nen tip?

      beste grüße
      .christoph

      Kommentar

      • andreas.schempp
        Contao Core-Team
        Association Vorstand
        • 15.06.2009
        • 5701

        #4
        Kann mir das nicht erklären, bekommst du einen Fehler in der Firebug-Konsole?
        terminal42 gmbh
        Wir sind Contao Premium-Partner! Für Modulwünsche oder Programmierungen kannst du uns gerne kontaktieren.
        Hilfe für Isotope eCommerce kann man auch kaufen: Isotope Circle

        Kommentar

        • MPstudent
          Contao-Nutzer
          • 26.09.2009
          • 244

          #5
          Im moo_accordion.tpl steht bei mir folgendes:

          Code:
          <script type="text/javascript">
          <!--//--><![CDATA[//><!--
          window.addEvent('domready', function() {
            new Accordion($$('div.toggler'), $$('div.accordion'), {
              duration: 10000,
              alwaysHide: true,
              opacity: false
            });
          });
          //--><!]]>
          </script>
          aber die geschwindigkeit des menus ändert sich nicht...

          besten dank

          Kommentar

          • andreas.schempp
            Contao Core-Team
            Association Vorstand
            • 15.06.2009
            • 5701

            #6
            das moo_accordion hat doch mit der mootoolsnav nichts zu tun? Die hat ein eigenes Template...
            terminal42 gmbh
            Wir sind Contao Premium-Partner! Für Modulwünsche oder Programmierungen kannst du uns gerne kontaktieren.
            Hilfe für Isotope eCommerce kann man auch kaufen: Isotope Circle

            Kommentar

            • MPstudent
              Contao-Nutzer
              • 26.09.2009
              • 244

              #7
              das ist mir jetzt auch klar, allerdings weiß ich nicht wo ich hier die duration eintragen kann...

              Code:
              <?php if (!isset($GLOBALS['activemenuaccord'])) $GLOBALS['activemenuaccord']=-1; ?>
              <script type="text/javascript">
              <!--//--><![CDATA[//><!--
              var moomenu = { 
                  init: function(){
                      this.accordion = new Accordion($$('li.menutoggler'), $$('ul.menuaccord'), {
                          show: <?php echo $GLOBALS['activemenuaccord']; ?>
                          
                      });
                  }
              }
              window.addEvent('domready', moomenu.init.bind(moomenu));
              var activemenuaccord = <?php echo $GLOBALS['activemenuaccord']; ?>;
              
              //--><!]]>
              </script>
              
              <!-- indexer::stop -->
              <div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
              <?php if ($this->headline): ?>
              
              <<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
              <?php endif; ?>
              
              <a href="<?php echo $this->request; ?>#<?php echo $this->skipId; ?>" class="invisible" title="<?php echo $this->skipNavigation; ?>"></a>
              <?php echo $this->items; ?> 
              <a id="<?php echo $this->skipId; ?>" class="invisible" title="<?php echo $this->skipNavigation; ?>"></a>
              
              </div>
              <!-- indexer::continue -->
              wenns keine lösung gibt muß der kunde halt mit dem sehr hektischen aufklappen der navi leben...

              trotzdem vielen dank für deine hilfe! ;-)
              liebe Grüße aus Berlin
              .christoph

              Kommentar

              • andreas.schempp
                Contao Core-Team
                Association Vorstand
                • 15.06.2009
                • 5701

                #8
                Code:
                ...
                var moomenu = { 
                    init: function(){
                        this.accordion = new Accordion($$('li.menutoggler'), $$('ul.menuaccord'), {
                            show: <?php echo $GLOBALS['activemenuaccord']; ?>,
                            duration: 600
                        });
                    }
                }
                ...
                komma nach "show" nicht vergessen, und keins nach 600!
                terminal42 gmbh
                Wir sind Contao Premium-Partner! Für Modulwünsche oder Programmierungen kannst du uns gerne kontaktieren.
                Hilfe für Isotope eCommerce kann man auch kaufen: Isotope Circle

                Kommentar

                • MPstudent
                  Contao-Nutzer
                  • 26.09.2009
                  • 244

                  #9
                  spitzenmäßig!

                  hatte das komma hinter show leider vergessen... jetzt funktioniert es einwandfrei!

                  Vielen Dank Andreas!

                  lgc

                  Kommentar

                  • Voselix
                    Contao-Nutzer
                    • 03.04.2012
                    • 245

                    #10
                    moo_accordion.html5 - Geschwindigkeit anpassen

                    Hallo Leute, bei mir klappt das Accordeon viel zu schnell auf- möchte das verlangsamen.

                    Jetzt hab ich jedoch das html5 template-da steht folgendes drin:
                    Code:
                    <script>
                      (function() {
                        window.addEvent('domready', function() {
                          new Fx.Accordion($$('div.toggler'), $$('div.accordion'), {
                            opacity: false,
                            display: -1, // -1, alle Akkordions sind am Anfang eingeklappt
                            alwaysHide: true,
                            onActive: function(tog, el) {
                              el.setProperty('aria-hidden', 'false');
                              tog.addClass('active');
                              tog.getNext('div').fade('in');
                              tog.setProperty('aria-expanded', 'true');
                              return false;
                            },
                            onBackground: function(tog, el) {
                              el.setProperty('aria-hidden', 'true');
                              tog.removeClass('active');
                              tog.getNext('div').fade('out');
                              tog.setProperty('aria-expanded', 'false');
                              return false;
                            }
                          });
                          $$('div.toggler').each(function(el) {
                            el.setProperty('role', 'tab');
                            el.setProperty('tabindex', 0);
                            el.addEvents({
                              'keypress': function(event) {
                                if (event.code == 13) {
                                  this.fireEvent('click');
                                }
                              },
                              'focus': function() {
                                this.addClass('hover');
                              },
                              'blur': function() {
                                this.removeClass('hover');
                              },
                              'mouseenter': function() {
                                this.addClass('hover');
                              },
                              'mouseleave': function() {
                                this.removeClass('hover');
                              }
                            });
                          });
                          $$('div.ce_accordion').each(function(el) {
                            el.setProperty('role', 'tablist');
                          });
                          $$('div.accordion').each(function(el) {
                            el.setProperty('role', 'tabpanel');
                          });
                        });
                      })();
                    </script>
                    Wie/ was /wo trage ich denn hierbei eine duration ein? Geht das überhaupt?

                    GLG
                    Voselix

                    Kommentar

                    • werbeschmiede
                      Contao-Nutzer
                      • 01.02.2013
                      • 17

                      #11
                      Accordion Geschwindigkeit anpassen

                      Hallo!

                      Möchte dieses Thema nochmals aufgreifen - wie habt ihr das mit der Klapp-Geschwindigkeit geregelt? In welcher Datei habt ihr die duration angepasst?

                      LG

                      Kommentar

                      • joe
                        Contao-Fan
                        • 20.06.2009
                        • 687

                        #12
                        Moin,

                        Da das Accordion die Fx Options von dem FX Object erbt kannst du in den Optionen der new Accordion Instanz ganz einfach duration als property angeben mit einem alias wie Short oder Slow oder eine Zahl in Millisekunden. Siehe https://mootools.net/more/docs/1.6.0/Fx/Fx.Accordion .Welche Datei du anpassen musst hängt von deinem Contao Setup ab.
                        Trainings und Coachings zur Fort und Weiterbildung sowie Beratung in den Bereichen Contao, JavaScript, jQuery, VueJS, React, PHP, NodeJS und vielen weiteren Themen.

                        Mehr unter jgreg.dev

                        Follow me on Twitter @JoeRayGregory

                        Kommentar

                        Lädt...