Closed (won't fix)
Project:
Menu Minipanels
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2011 at 21:08 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent
Comments
Comment #1
digibeetle commentedI have also posted my question on the qtip forum as i'm thinking that it might be more qtip related than module code related: http://craigsworks.com/projects/forums/thread-how-to-leave-parent-s-css-...
If i find the answer over there i will also post it here!
Comment #2
kaynen commentedHey,
Let me know if this works for you all. Add it immediately following the "settings['content'] = html;" line. You can change the class to whatever you want it to be by changing the word "on".
Comment #3
digibeetle commentedHi kaynenh,
Thank you very much for your reply - it totally works!!!
By reading the code i think i also understand what's happening: the api of qtip is called to add two functions: one which is called before the tip shows which will set an extra class on the parent item. The second does the opposite: when the tip is hidden it also removes the extra class from the parent. By using this class in your CSS file you have total control of the hover looks of the parent item when the qtip is used!
Pretty easy to understand, but if you have no javascript/php knowledge it can be quite a task ;-)
For completeness: you have to add this after line 47 of the menu_minipanels.js file in the js directory.
If you would ask me i would say this can be added to the codebase of menu_minipanels :-)
Comment #4
bmx269 commentedThanks for this, and I think this should be default.
Comment #5
Anonymous (not verified) commentedHello,
This code seems to be really interesting but could you be more specific about the css part please ? I changed the word "on" to "bubble" to make a test but I don't see this class anywhere...
In my css, I use
.menu-minipanel-2285:hover ul.primary-links li a.bubble {But nothing happens.
Thank you.
Comment #6
Adam Wood commentedHi,
Can I second bumanthan's request for more details about the CSS part of this?
I need this to be working otherwise it just doesn't look right.
I use the following CSS for my 'hover' function on my mega-menu;
.menu li a:hover {
...
}
I've tried replacing 'on' with '.menu li a:hover', 'menu li a:hover', 'menu' and 'hover' and none of them do anything.
What do I need to do to get this to work? And do I need to do anything else other than add this snippet to the .js file?
Thanks in advance.
Comment #7
bmx269 commentedIt's the li that has the class. So your CSS would look like this: li.on a{}
So for mine I added that to the active / hover state of the menu item. If you need more specific examples, let me know, and I will share them.
Comment #8
Adam Wood commentedHi BMX, thanks for your attention on this.
I completely agree with you that this should be default on future releases of this module!
I've tried this again and I still can't get it to work.
This is the end of my .js file;
And this is the CSS which I'm using for the menu currently;
I tried adding 'li.on a {my hover settings}' and that didn't make any difference.
Any help would be great!
Thanks.
Comment #9
bmx269 commentedLooks like the menu_minipanels.js is incorrect.
The line 47 to the end should look like this:
I am thinking this because you do not have "on" showing up.
Here is what it looks like on a dev site of mine. http://whistler.rjdempsey.com
-Trent
Comment #10
Anonymous (not verified) commentedFor me works fine with ul.primary-links li a.on
Comment #11
Adam Wood commentedThanks all, I've fixed it in the end!
I think it was a mixture of the .js and playing with the CSS.
For anybody else who has problems with the CSS on this, this is what I had and then had to change it too;
Old;
New;
Comment #12
tomlichaj commentedFor Drupal 7 you can add this after line 36
var thisTip = $(this);
settings['api'] = {
beforeShow: function()
{
thisTip.addClass('on');
},
beforeHide: function()
{
thisTip.removeClass('on');
}
};
Comment #13
tomlichaj commentedComment #14
digibeetle commented@tomlichaj: Yeah, it could be that the line number is different for D7, but indeed it still is working if you add this code. I have already added it myself and saw it worked. IMHO this could be added to the module by default: if you want to make use of it just add the required CSS code to your CSS file and you're done.
Comment #15
damienmckennaA few things to consider:
Going to mark this one as 'fixed' due to the above.
Comment #17
bmx269 commentedStill can't understand what the issue is with adding this to the module. If it is class naming, then active-trail is more what it should be. Thx
Comment #18
damienmckennaI'll review this again, I must have overlooked comment #2 above.
Comment #19
damienmckennaAnother issue with a similar goal but a different implementation: #1304560: Apply hover class to triggering menu link I'll review both of these this weekend and will commit the best option.
Comment #20
damienmckennaI committed patches from #1304560: Apply hover class to triggering menu link, which also resolve this issue. The README.txt file explains the class name to use, and the API.txt file includes example code to use a different class, if needed.
Comment #22
jwilson3Anyone participating on this issue should definitely update to the latest release candidate and use the qtip-hover class!
It rocks, however, I've just filed a related issue that I'm experiencing on sites where I'm using the qtip-hover.
Please checkout #1425046: Qtip-hover state is sticking. Your feedback is appreciated.
Comment #23
josleow commentedMenu Minipanels - version 6.x-1.4+0-dev
I looked around in module menu_minipanels that has menu_minipanels.callbacks.js.
The problem is that it does not apply "qtip-hover" css to menu minipanel when tab is hovered or megamenu (with minipanels) is open.
I wonder what could be wrong. I tried other way as instructed in that js file but it still doesnt work. Will appreciate if you could take a look.
thanks