Jump to content

How to make WHMCS 5.0 Client Area menu tabs automatically open on hover?


Recommended Posts

Edit whmcs.js in the default/js folder.

 

Change

jQuery(".dropdown-toggle, a.menu").click(function(e) {

to

jQuery(".dropdown-toggle, a.menu").mouseover(function(e) {

 

That works until they login. For some reason clients who are logged in have to click on the menu items to get them to expand.

Link to comment
Share on other sites

Clear your template cache. The code doesn't change just because you are logged in!

 

Yea that was the first thing I did, and then scanned the code trying to find another call to the 'loggedin' menus but for the life of me couldn't see one. Will try again. Hmmm :roll:

Link to comment
Share on other sites

It has nothing to do with SSL. All you're doing is changing the event trigger from a click to mouseover. If you make that change, it will just work.

 

I don't think it's that simple. And I believe it has something to do with SSL.

 

If I go to the GENERAL tab in WHMCS and remove my SSL url from the part:

 

WHMCS SSL System URL

 

it works. As soon as I put the ssl url back in, it stops working. It works in non-SSL, and stops working in SSL.

 

Weird I know.:roll:

Link to comment
Share on other sites

I have just made this change.

 

I'd like to ask how you guys handle your custom file changes when it is time to upgrade? Do you have to keep your own changelog to keep up with your customizations?

 

I created a module that compares your files to the same version of WHMCS so you can make a list of what files were modified. I take that info and then compare the files to apply the changes to the new files in the latest version.

Link to comment
Share on other sites

  • 1 year later...
  • 9 years later...

This worked for me. I'm on V.8.6.

I added this to the header.tpl right before the </head> Got it from this article

<style>
    .dropdown:hover .dropdown-menu{
        display: block;
    }
    .dropdown-menu{
        margin-top: 0;
    }
</style>
<script>
$(document).ready(function(){
    $(".dropdown").hover(function(){
        var dropdownMenu = $(this).children(".dropdown-menu");
        if(dropdownMenu.is(":visible")){
            dropdownMenu.parent().toggleClass("open");
        }
    });
});     
</script>

 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated