Announcement

Collapse
No announcement yet.

Can Scriptcase Menus behave themselves??!!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by scriptcaser View Post
    Spoke too soon: the code becomes part of the page if echoed in onApplicationInit. Still does not work though: menu looks the same. My best guess would be because this code is not part of the document.ready function of JS. Please see attached. Any ideas?
    Update: I've manually edited the index.php file generated by SC to have this logic in the document.ready but still no difference. Must be the CSS selector then?

    Comment


    • #17
      Wich theme are you using? to do some testing
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #18
        Originally posted by Giu View Post
        Wich theme are you using? to do some testing
        Sc8_Saphir.

        Comment


        • #19
          Originally posted by scriptcaser View Post
          Sc8_Saphir.

          onApplicationInit:

          PHP Code:
          echo "
          <script>

          function resizeMenu(){
              var h = 100/$(\"li.topmenu\").length; 
              $(\"table\").eq(1).width(\"100%\"); 
              $(\"ul.topmenu\").width(\"100%\"); 
              $(\"li.topmenu\").width(h + \"%\");
          };

          window.onload = resizeMenu;
          </script>"

          Enjoy!
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


          • #20
            Originally posted by Giu View Post
            onApplicationInit:

            PHP Code:
            echo "
            <script>

            function resizeMenu(){
                var h = 100/$(\"li.topmenu\").length; 
                $(\"table\").eq(1).width(\"100%\"); 
                $(\"ul.topmenu\").width(\"100%\"); 
                $(\"li.topmenu\").width(h + \"%\");
            };

            window.onload = resizeMenu;
            </script>"

            Enjoy!
            Awesome! Works like a charm on a desktop, though on smaller screens there's menu item overlap. I appreciate, its an eye opener!

            Comment


            • #21
              Sorry, didn't tried on mobile. Just got 10free minutes and did this.
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment


              • #22
                Hey man I think you are overdoing this...

                try this out in the oninit event of your menu

                PHP Code:
                echo '
                <style>
                    #idDivMenu{
                        width:100%;
                    }
                    .topmenu { width:12.5%; }
                      #css3menu1 { width:100%; } 
                    ul li { width: 100%; }
                </style>
                '

                Comment


                • #23
                  Originally posted by kafecadm View Post
                  Hey man I think you are overdoing this...

                  try this out in the oninit event of your menu

                  PHP Code:
                  echo '
                  <style>
                      #idDivMenu{
                          width:100%;
                      }
                      .topmenu { width:12.5%; }
                        #css3menu1 { width:100%; } 
                      ul li { width: 100%; }
                  </style>
                  '

                  Interesting results...see screenshot.
                  Attached Files

                  Comment


                  • #24
                    I think you have to take a look at the CSS and understand it... if that's happening is because you are not modifying the width property of the .topmenu class as you should..

                    if you have 9 options you should divide the entire menu in 9 segments which means every option should have a width of.... 100/9 = 11.1% round it to 11% and try again.

                    oh and one more thing... this CSS is not for mobile... you should do another CSS accordingly.

                    Regards

                    Comment

                    Working...
                    X