vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - vBulletin Drop Downs on Hover (no click required) (https://vborg.vbsupport.ru/showthread.php?t=295337)

Gio~Logist 02-19-2013 11:00 PM

vBulletin Drop Downs on Hover (no click required)
 
1 Attachment(s)
Brought To You By
ModernvB - Vbulletin Solutions & Services
http://www.modernvb.com


What is this mod?
The standard drop down menus in vBulletin (navbar, etc) require a click in order to view the drop down menus. With this little mod, the drop downs will expand simply by hovering.

Ran into this with a client of mine and didn't want to charge them to write a few lines of code, so figured I'd just write it and share it with you all.

Included an attachment below in case you're wondering what kind of menus this mod effects.

Step 1
Determine whether or not you are calling jquery. If you're not sure you can view the source of your website and search for jquery, or just assume you don't have it. If you don't believe you have it, simply go to the headinclude_bottom template and enter this:
Code:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

Step 2
Go to your footer template and insert this at the bottom:
Code:

<script>
$(".popupmenu").hover(
  function () {
    $(this).find( '.popupbody' ).show();
  },
  function () {
    $(this).find( '.popupbody' ).hide();
  }
);
</script>


Optional *for some styles only, which have compatibility issues *

If you're having issues with the menu showing a bit below the button, add the following at the end of the additional.css template:

HTML Code:

.navtabs ul.popupbody {
top: 21px;
}


Gio~Logist 02-20-2013 03:45 PM

Reserved.

Jeromedia603 02-20-2013 09:21 PM

Going to give this a try after I view all the menu's it effects

Hostboard 02-20-2013 10:07 PM

You can also reference jquery from the default VB install.
../clientscript/jquery

Gio~Logist 02-25-2013 05:30 PM

Quote:

Originally Posted by Jeromedia603 (Post 2405493)
Going to give this a try after I view all the menu's it effects

Cool, lmk how it goes : )

Quote:

Originally Posted by Hostboard (Post 2405495)
You can also reference jquery from the default VB install.
../clientscript/jquery

Correct! Just didn't check to see if it's the most up to date, but it should work regardless. The jquery i use is simple.

Lee Roberts 03-10-2013 10:53 PM

1 Attachment(s)
Was just about to submit something like this, thanks Gio !

However, adding this gives a space under the parent menu and this makes it hard to then hover over the popup menu, you can do it but you have to move your mouse really fast to catch it, see screen shot below.

.Me

Gio~Logist 03-12-2013 10:29 AM

Quote:

Originally Posted by Lee Roberts (Post 2409250)
However, adding this gives a space under the parent menu and this makes it hard to then hover over the popup menu, you can do it but you have to move your mouse really fast to catch it, see screen shot below.

I can't seem to reproduce this error on any of my test websites or client websites. Can you link me over so that I can have a look and see what may be up? Probably a css clash with your style. In the meantime, giving .popupbody a negative margin-top may be a quick fix!

marccap 03-12-2013 10:58 AM

Quote:

Originally Posted by Lee Roberts (Post 2409250)
Was just about to submit something like this, thanks Gio !

However, adding this gives a space under the parent menu and this makes it hard to then hover over the popup menu, you can do it but you have to move your mouse really fast to catch it, see screen shot below.

.Me

Im getting the same problem with the gap

qpurser 03-12-2013 11:12 AM

I installed this also and really don't have the issue you guys described. Kinda weird it does for some and not for others.
Yes there is a little gap but it doesn't give me problems using the mouse to select any options from the popup.

synseal 03-12-2013 12:14 PM

Quote:

Originally Posted by marccap (Post 2409464)
Im getting the same problem with the gap

Same here, there's a gap and when you try to highlight the tab menu it disappears.


All times are GMT. The time now is 02:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01385 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete