Latest topics
» [GAME] What are you thinking right now?
by universecat Yesterday at 21:46

» [GAME] Animal Game
by universecat Yesterday at 21:43

» [GAME] Count to 1000 using even numbers Van-Helsing Edition
by universecat Yesterday at 21:40

» [GAME] Count to One Million!
by universecat Yesterday at 21:40

» [GAME] Last Letter Game
by universecat Yesterday at 21:39

» [GAME] Post a random picture
by SLGray Yesterday at 16:28

» Dark Mode + Another Question
by Ace 1 Yesterday at 13:31

» Hi everyone!
by skouliki Yesterday at 02:01

» Hai Guys~
by skouliki Yesterday at 01:59

» Add a login popup for the toolbar
by Ape Sun 15 Oct 2017, 13:51

» Mobile Usability Test
by Ange Tuteur Sat 14 Oct 2017, 11:20

» Chit Chat Thread
by Ange Tuteur Sat 14 Oct 2017, 11:20

» [GAME] World Snake
by SLGray Thu 12 Oct 2017, 16:12

» [GAME] Never have I ever..
by Valoish Thu 12 Oct 2017, 13:01

» Browsers & Updates
by SLGray Mon 09 Oct 2017, 12:11

Recent Tutorials
Who is online?
In total there are 10 users online :: 1 Registered, 0 Hidden and 9 Guests :: 2 Bots

jlmic

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

[EDGE STYlING] Fade out the widget menu when it's not hovered over

View previous topic View next topic Go down

avatar
Guest
Guest
View all awards

PostGuest on Mon 19 Dec 2016, 11:56

I was trying to create a JS (in all the pages) to fade out (or perhaps a different effect in the future, like sliding back to the left) the widget menu after 5 seconds or so when it's not being hovered over, but it doesn't work.

Here's my first try:

Code:
if != $('#left:hover').delay(5000).fadeOut('slow');


Please, help @Ange Tuteur.
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4698
Points : 9534
Reputation : 2337
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Mon 19 Dec 2016, 13:05

@Samantha NL give the following script a try.

Install it via AP > Modules > JS codes management > new

Title : Auto-close side panels
Placement : In all the pages
Code:
$(function() {
  $('.module_column').on('mouseout', function() {
    var t = this;

    window[t.id + '-fadeout'] = window.setTimeout(function() {
      var button = document.getElementById(/_panel/.test(t.id) ? t.id.replace(/_panel/, '_button').replace(/fae/, 'fa') : '') || $('.column_button_' + t.id)[0];

      if (button) {
        button.click();
      }
    }, 3000);

  }).on('mouseover', function() {
    window.clearTimeout(window[this.id + '-fadeout']);
  });
});
It should auto-close the panels have 3 seconds ( 3000ms ) of leaving them. Lemme know if it works for you. Salute
avatar
Guest
Guest
View all awards

PostGuest on Mon 19 Dec 2016, 13:19

Oh this is so cool, yk! Finally we've got that one working! WOOHOOOO!! Cheer

Could you make a small adjustment to the script so that when someone has one of the side-panels open and clicks next to it, say anywhere on the body, it does the same without waiting 3 secs, please? i've seen something on the internet that may be of help: http://stackoverflow.com/questions/152975/how-do-i-detect-a-click-outside-an-element

When done you could close one of the other requests I had before:
http://fmdesign.forumotion.com/t964-suggestion-auto-collapse-the-side-widget-menu-and-quick-navigation

and make THIS one an official [PLUG-IN] for Edge if you want or default it for Edge! Smile

avatar
Ace 1
Valued Member
Title :

Beta Tester
Gender : Unspecified
Age : 18
Posts : 2142
Points : 2906
Reputation : 87
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Thu 29 Dec 2016, 07:11

@Ange Tuteur Making sloppy code eh? tsk tsk tsk

If someone closes it before the 3 seconds is up, your script reopens the widget. I got the fixed version right here tho Wink

Code:
$(function() {
  $('.module_column').on('mouseout', function() {
    var t = this;
 
    window[t.id + '-fadeout'] = window.setTimeout(function() {
      var button = document.getElementById(/_panel/.test(t.id) ? t.id.replace(/_panel/, '_button').replace(/fae/, 'fa') : '') || $('.column_button_' + t.id)[0];
           
      button && button.className.indexOf('active') != -1 ? button.click() : window.clearTimeout(window[this.id + '-fadeout']);
    }, 3000);
 
  }).on('mouseover', function() {
    window.clearTimeout(window[this.id + '-fadeout']);
  });
});
avatar
Guest
Guest
View all awards

PostGuest on Thu 29 Dec 2016, 07:12

Ah that's why it had such an erratic behavior... I was afraid to ask Ange lol! Thanks I'll be uploading the script lateron.
avatar
Guest
Guest
View all awards

PostGuest on Thu 29 Dec 2016, 10:44

Yeah, that's a whole lot better, @Ace 1! Thanks again! Smile

Did you see this one in one of the previous posts?
Could you make a small adjustment to the script so that when someone has one of the side-panels open and clicks next to it, say anywhere on the body, it does the same without waiting 3 secs, please? i've seen something on the internet that may be of help: http://stackoverflow.com/questions/152975/how-do-i-detect-a-click-outside-an-element

You think you can do that?
avatar
Ace 1
Valued Member
Title :

Beta Tester
Gender : Unspecified
Age : 18
Posts : 2142
Points : 2906
Reputation : 87
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Fri 30 Dec 2016, 16:43

How far though? Like this far?

avatar
Guest
Guest
View all awards

PostGuest on Fri 30 Dec 2016, 16:49

Anywhere right next to the Quick Navigation or Widget Menu panels when they're opened on the left or right side, on any of page.
avatar
Ace 1
Valued Member
Title :

Beta Tester
Gender : Unspecified
Age : 18
Posts : 2142
Points : 2906
Reputation : 87
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Fri 30 Dec 2016, 17:26

So like within the red box is good?
avatar
Guest
Guest
View all awards

PostGuest on Fri 30 Dec 2016, 17:51

Well, like anywhere here




here




and here



All the way down the pages, on any of page, if you get me on this. So anywhere next to the menus or widgets, where ever they may apply like in the subs, topics and on the index / homepage. Idk about the portal as I haven't activated it (yet).

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum