Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBulletin Drop Downs on Hover (no click required) Details »»
vBulletin Drop Downs on Hover (no click required)
Version: 1.00, by Gio~Logist Gio~Logist is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.2.0 Rating:
Released: 02-19-2013 Last Update: Never Installs: 26
Template Edits
 
No support by the author.

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;
}

Screenshots

File Type: jpg hoverdrop.jpg (52.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-13-2013, 06:36 PM
FTG LIQUID CL FTG LIQUID CL is offline
 
Join Date: Jan 2012
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works with 4.1.12!
Reply With Quote
  #23  
Old 03-19-2013, 11:15 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FTG LIQUID CL View Post
Works with 4.1.12!
:up::up:
Reply With Quote
  #24  
Old 04-21-2013, 05:26 AM
thang28101993 thang28101993 is offline
 
Join Date: Feb 2010
Location: fdsaf
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much for great mod!
It use well on Frirefox and Chrome! But I try on IE 7, it is wrong! When hover the mouse to menu, child menu didn't place on below parent menu, it has moved to another place.

Any one has good idea for this issue? Thanks so much!

P.s: I want to fix this, because some people still use old IE version!
Reply With Quote
  #25  
Old 04-21-2013, 06:19 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thang28101993 View Post
P.s: I want to fix this, because some people still use old IE version!
I do not use this mod but if it was me: For the 1% of users that use IE7 -- just use an html conditional comment. This will just allow a fallback to the normal vbulletin code for users that use IE7 or less. Just an idea.

Code:
<!--[if lte IE 7]>
  <script>
     $(".popupmenu").hover(
         function () {
            $(this).find( '.popupbody' ).show();
         },
         function () {
           $(this).find( '.popupbody' ).hide();
        }
     );
  </script>
<![endif]-->
Reply With Quote
Благодарность от:
thang28101993
  #26  
Old 04-22-2013, 12:32 AM
thang28101993 thang28101993 is offline
 
Join Date: Feb 2010
Location: fdsaf
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tbworld View Post
I do not use this mod but if it was me: For the 1% of users that use IE7 -- just use an html conditional comment. This will just allow a fallback to the normal vbulletin code for users that use IE7 or less. Just an idea.

Code:
<!--[if lte IE 7]>
  <script>
     $(".popupmenu").hover(
         function () {
            $(this).find( '.popupbody' ).show();
         },
         function () {
           $(this).find( '.popupbody' ).hide();
        }
     );
  </script>
<![endif]-->
Thanks so much for your idea! I added that script to footer but the issue still appaer!


another idea? Please!

Thanks!
Reply With Quote
  #27  
Old 04-22-2013, 05:49 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your site URL?
Reply With Quote
  #28  
Old 04-22-2013, 08:13 AM
thang28101993 thang28101993 is offline
 
Join Date: Feb 2010
Location: fdsaf
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tbworld View Post
Your site URL?
My site is buliding in local! Would you mind if you use TeamViewer to support for me?
TeamViewer ID:

I'm online now!

Thanks
Reply With Quote
  #29  
Old 04-22-2013, 07:48 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I answer questions in the forum to give back to the community. Assisting you privately does not accomplish that goal. Post your code fragments online, I will be happy to assist you here for "free" and others will be able to learn from the experience.
Reply With Quote
  #30  
Old 04-22-2013, 08:31 PM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a conflict with this mod and another custom mod I had which also uses jQuery. This may help some others that may have similar conflicts.

In order to get the two to both work I had to make a couple changes.

I needed to add this line below the current script in Step 1:
Code:
<script type="text/javascript"> jQuery.noConflict() </script>

Then replace all "$" with "jQuery" in Step 2 code to this:
Code:
<script type="text/javascript">
jQuery(".popupmenu").hover(
  function () {
    jQuery(this).find( '.popupbody' ).show();
  },
  function () {
    jQuery(this).find( '.popupbody' ).hide();
  }
);
</script>
Reply With Quote
Благодарность от:
tbworld
  #31  
Old 04-22-2013, 08:58 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bzcomputers View Post
I had a conflict with this mod and another custom mod I had which also uses jQuery. This may help some others that may have similar conflicts.
Great, simple explanation as the official Jquery link http://api.jquery.com/jQuery.noConflict/ is a bit difficult for beginners to understand.

I use the encapsulation method all the time in inline jquery and misbehaving JavaScript, it adds a small amount of overhead, but I sleep well.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04907 seconds
  • Memory Usage 2,340KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_html
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete