Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////
- // CLOSE MENU IF ANY OTHER BUTTON IS CLICKED
- ////////////////////////////////////////////
- $('html').on('mousedown',function(e){
- if(e.which!==3 && settings.click_to_close) {
- $('.gizmoMenu:visible').each(function() {
- var detectChild=$(this).is($(e.target));
- if (!detectChild) $(this).children().each(function() {
- if (!detectChild && $(this).is($(e.target))) {detectChild=true;}
- });
- if (!detectChild) {
- $(this).stop(true,false).animate({opacity:0},{duration:100,queue:false,complete:function(){
- // CLOSE ANY OPEN gizmoMENUS
- $(this).css('display','none').find('.active').removeClass('active').next().stop(true,true).slideUp('normal');
- }});
- }
- });
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement