Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Menus are great, but don't work. Are these only for use with a certain product?

Home Forums Latest release 1.1.x Menus are great, but don't work. Are these only for use with a certain product?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8341
    Scinty
    Participant

    For sm-blue, I pasted the HTML, CSS and JavaScript code. The resulting menu is adaptive (it changes to hamburger/mobile view on small screens), but in either view it doesn’t collapse. Instead of a menu, I get a huge outline showing all the menu links.

    I’ve even tried the menu in a plain HTML page, with no other content, same (non-)results.

    I see references here to JQuery. My site is a plain-vanilla site on a shared hosting plan. I write code using Notepad and Notepad++. Are these scripts only for use with a certain hosting service or something?

    I’m not expecting debugging, but it will help to know if I’m chasing down a blind alley.

    #8342
    Scinty
    Participant

    UPDATE: When in doubt read the instructions. (What I had thought was this site’s main page turned out not to be.) I have downloaded and expanded the smartmenus-1.1.0 file, but have NO idea what do do with it. Do I simply upload the files and folders to my server and then the code works? Or do I have to use them in combination with a site design program?

    I’ve uploaded the files (probably more of them than needed) to my server’s root folder, and I see results, but the menu is still broken. Sorry, although I’ve written in HTML, CSS and PHP for many years, and I understand about including files and libraries, I’m not a professional programmer, and the very concept of this JSCRIPT stuff is new to me. I suspect the problem is in what code I’m using (or not using) to access the external files.

    #8343
    Scinty
    Participant

    FURTHER UPDATE: I discovered that some files didn’t get moved from my SmartMenus download folder to the project folder, or not from there to the server. Partly that was because they had varying dates, so FileZilla buried them among my other files, but mainly it’s because of confusion as to what files are needed. In addition to having to correctly install the jquery file(s), the two files mentioned in the code need to be installed, of course. I’ll try installing every file I can find, into the site’s root folder and report back. After installing some of them, the menu has improved. It’s now a proper menu, except that the dropdowns do not appear on hover.

    Further complicating my understanding is that the demo (which works fine) has bootstrap… files in its root folder, but I see no such files in the distribution file I downloaded (except in the demo folder).

    While I’m at it, although I realize that your core readers are experienced programmers so probably won’t be confused, it would help us novices a lot if your quickstart instructons were a bit more explicit. For example,

    “The script is initialized like any other jQuery plugin:”

    I’ve never initialized a jQuery plugin before. So I had to search other how-to sites to figure out that it goes before my closing HTML tag, inside a “<script type=text/javascript”>” set. Is that correct? It appears to be, judging from the source code of your download’s demo page, except the demo includes subMenusSubOffset references.

    Most helpful would be a specific list, in one place of which files must be on the server, and where to find them. My inclination, if I were you, would be to put them all in one download folder, in whatever tree structure will be needed, and include a Readme.txt file that explains this. I’m afraid your “quick setup” page does not explain it all, and if the Options must be understood, it is hardly “quick.”

    Pressing on. Will let you know when it works. Hopefully I will remember how.

    #8345
    Scinty
    Participant

    Success! First, I resorted to using the code from your demo page, replacing your content with mine. That worked, except that your demo page had a different version of the menu, and my further adaptation didn’t work — no drop downs.

    And, as expected by even me, the final mystery came down to a stupid typo: I had forgotten to put the <script> tags around your javascript. Another mystery was equally simple once I found it: a missing # before a color spec.

    Suggestion: I realize your site is aimed at experienced developers, but this error was one I knew to avoid from day one of using Javascript, 20 years ago. So, as far as that goes, even I am an “expert” and even then I overlooked it. I suggest you provide your templates with the full folder tree structure already in place, including all files in the proper places, and in your examples include ALL the code to be added. Don’t assume the user will notice what is missing, however elementary. Usability 101.

    Thanks. Now for the tweaking.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘1.1.x’ is closed to new topics and replies.