Hello Guest
No Avatar
Sign In to Remove
Posts: 
2
Reputation: 
0
Posted: February 7, 2014, 11:18 PM  -- Last Edit: February 8, 2015, 11:26 PM by MLM
  • Group: Member
Hi
I am new to SMF (I've been using phpBB3 before) and i downloaded Vertex theme and it rocks ! However i would like to edit one thing (if it is possible)

Im talking about the main navbar under the logo, the dropdown menus only drop after clicking the arrow, i would like them to drop just on mouse hover. Is it possible/easy ?
Posts: 
400
Reputation: 
20
Posted: February 8, 2014, 12:02 PM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
Very easy. Looking back on the Vertex theme, the JS could be much cleaned up as I have grown as a developer but here is the simple fix.

In jquery_bits.js find:

Code: [Select]
$("ul.topnav li span").click(function() { //When trigger is clicked...

//Following events are applied to the subnav itself (moving subnav up and down)
$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

$(this).parent().hover(function() {
}, function(){
$(this).parent().find("ul.subnav").slideUp('slow', "easeInQuint"); //When the mouse hovers out of the subnav, move it back up
});

//Following events are applied to the trigger (Hover events for the trigger)
}).hover(function() {
$(this).addClass("subhover"); //On hover over, add class "subhover"
}, function(){ //On Hover Out
$(this).removeClass("subhover"); //On hover out, remove class "subhover"
});

Replace with:

Code: [Select]
$("ul.topnav li").mouseover(function() { //When trigger is clicked...

//Following events are applied to the subnav itself (moving subnav up and down)
$(this).find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

$(this).hover(function() {
}, function(){
$(this).find("ul.subnav").slideUp('slow', "easeInQuint"); //When the mouse hovers out of the subnav, move it back up
});

//Following events are applied to the trigger (Hover events for the trigger)
}).hover(function() {
$(this).addClass("subhover"); //On hover over, add class "subhover"
}, function() { //On Hover Out
$(this).removeClass("subhover"); //On hover out, remove class "subhover"
});
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
2
Reputation: 
0
Posted: February 8, 2014, 6:38 PM  -- Last Edit: February 8, 2014, 6:57 PM by expir
  • Group: Member
Thanks, it works !

However i have another problem and i think theres no need to spam the forums.

I got a polish language pack installed on my SMF 2.0.7 forum and everything works ok, but the guest text etc is still in english. After editing the ThemeStrings.english.php file to make the text polish, and converting it to UTF-8 encoding (without it polish letters arent displayer properly) the register captcha image isnt generated thus no one can register. After converting the file back to ANSi it works, but polish characters arent displayed anymore :/

EDIT

I've fixed it by myself, all you need to do is to convert it to UTF-8 without BOM in notepad++ and not just UTF-8
Posts: 
400
Reputation: 
20
Posted: February 8, 2014, 10:42 PM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
Glad you got it working!  ;)

Just for future reference. Create a new thread for each new issue unless it highly relates to the original thread.
<3 Nerve, Sk8, Labradoodle, Austin