Comments (9)
im trying to do the same thing did you ever find a solution @nitrammit ?
from dropit.
Sorry, mate. I had no luck. I ended up building my own CSS dropdowns instead.
from dropit.
@nitrammit thanks anyways i asked @gilbitron on Twitter but i think he's got to much going on... oh well back to my search.
from dropit.
add this code in the afterShow function :
afterShow: function(){
$('ul#menu').on( "mouseleave", function() {
$('.dropit-open').removeClass('dropit-open').find('.dropit-submenu').hide();
});
}
from dropit.
// add this code to hide sub menu when you hover the others first level anchor
$('.menu_tab > ul > li > a').on('hover', function(){
settings.beforeHide.call(this);
$('.dropit-open').removeClass('dropit-open').find('.dropit-submenu').hide();
settings.afterHide.call(this);
});
//and this code to hide sub menu when you leave the ul
$('.menu_tab').mouseleave(function(){
settings.beforeHide.call(this);
$('.dropit-open').removeClass('dropit-open').find('.dropit-submenu').hide();
settings.afterHide.call(this);
});
//that's work for me
from dropit.
I used .mouseleave also it works great 👍
// Close if outside of area
$(".dropit").mouseleave(function () {
settings.beforeHide.call(this);
$('.dropit-open').removeClass('dropit-open').find('.dropit-submenu').hide();
settings.afterHide.call(this);
});
from dropit.
This is fixed in v1.1.0.
from dropit.
I fixed in my fork too. Great job!
Tyler Penney
(559) 834-8282
millerpenney.com
On Thu, May 8, 2014 at 8:00 AM, Gilbert Pellegrom
[email protected]:
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#event-119166142
.
from dropit.
Just a heads up @gilbitron - I still had this issue using 1.1.0. @tylerpenney's fork worked.
Thanks for the plugin.
from dropit.
Related Issues (20)
- action: 'hover' & jQuery v1.11.1 HOT 8
- Trigger programatically HOT 1
- menu still open while hover on child elements HOT 1
- Trigger element dissappears HOT 4
- Problem with click on submenu link HOT 2
- Jquery update make Dropit stops work... HOT 1
- Not actually in bower
- Trigger Top Level Menu Items Only?
- Can't init dropit HOT 1
- submenu not closing when user taps outside HOT 2
- Settings afterShow, afterHide doesn't work
- Bower error HOT 1
- Please include index.htm file fully integrated HOT 2
- TLS/SSL certificate for dev7studios.com is expired HOT 1
- Documentation link is broken HOT 1
- Delete issue, wrong repo.
- Which menu option selected
- Is there a way to hide the submenu ONLY if the trigger is clicked or if a click occurs outside the submenu? HOT 5
- [enhancement] Add missing bower.json. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropit.