WebSite X5Help Center

 
Michael B.
Michael B.
User

Aufklappbares Menü  de

Author: Michael B.
Visited 1753, Followers 1, Shared 0  

Hallo Andreas,

du hattest mir seinerseit einen schönen Tipp gegeben, wie ich ein aufklappbares Menue auf der Webseite, hier unter "Eigenschaften" und mit setzen eines Ankers erstellen kann, siehe Bild im Anhang. Leider funktioniert dies mit der neusten Version 17 nicht mehr.

Wäre nett, wenn du mir weiterhelfen könntest oder auch jemand anderes aus dem Forum eine weitere Idee hat.

Michael

Hier zur Erinnerung der Code:

Anker: msacc1

Code

<style>

.msaccordion div[id^='imCellStyleTitle_']{

cursor:pointer;

}

span.symbol {

 font-family:"Courier New", Tahoma, monospace;

 font-weight:bold;

}

</style>

<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

<script>

$(document).ready(function() {

  $("div[id^='msacc']").parent().addClass("msaccordion");

  $(".msaccordion div[id^='imCellStyle_'], .msaccordion div[id^='imCellStyleDescription']").css("display", "none");

  $(".msaccordion div[id^='imCellStyleTitle_']").each(function() {

    $(this).prepend("<span class='symFaq'>+ </span>");

    $(this).parent().css("min-height", $(this).outerHeight(true));

  });

  $(".msaccordion div[id^='imCellStyleTitle_']").click(function() {

    var $this = $(this);

    var $opentab = $(".msaccordion div[id^='imCellStyleTitle_']").next(':visible');

    $opentab.prev().nextAll().hide("blind", 500, function() { //effekt blind, drop, fade, slide

      $opentab.prev().css("background-color", "#FFFFFF").find("span").html("+ ")

    }); //Hintergrundfarbe für eingeklappten Tab

    if ($this.next().is(":hidden")) {

      $this.nextAll().show("blind", 500); //effekt: blind, drop, fade, slide

      $this.css("background-color", "#FFFFFF").find("span").html("– ");

    }

  });

});

</script>

Posted on the
2 ANSWERS
Andreas S.
Andreas S.
Moderator
Best User of the month DE

Hi Michael,

der Code in WSX5 hat sich geändert und deshalb funktioniert es nicht mehr. Aber versuche mal den Javaskript Code durch diesen zu ersetzen.

<script>

$(document).ready(function() {
  $("div[id^='msacc']").parent().addClass("msaccordion");
  $(".msaccordion div[id^='imCellStyleTitle_'] + div, .msaccordion div[id^='imCellStyleDescription']").css("display", "none");
  $(".msaccordion div[id^='imCellStyleTitle_']").each(function() {
    $(this).prepend("<span class='symFaq'>+ </span>"); 
    $(this).parent().css("min-height", $(this).outerHeight(true));
  });
  $(".msaccordion div[id^='imCellStyleTitle_']").click(function() {
    var $this = $(this);
    var $opentab = $(".msaccordion div[id^='imCellStyleTitle_'] + div:visible");
    $opentab.prev().nextAll().hide("blind", 500, function() { //Effekte zum einstellen: blind, drop, fade, slide
      $opentab.prev().css("background-color", "#FFFFFF").find("span").html("+ ")
    });
    if ($this.next().is(":hidden")) {
      $this.nextAll().show("blind", 500); //Effekte zum einstellen: blind, drop, fade, slide
      $this.css("background-color", "#FFFFFF").find("span").html("&#8211; "); 
    }
  });
});
</script> 

Read more
Posted on the from Andreas S.
Michael B.
Michael B.
User
Author

Super Andreas, probiere ich heute Abend, wenn ich es zeitlich, direkt mal aus.

Danke für deine, wie immer, schnelle Info.

Michael

Read more
Posted on the from Michael B.