FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 21 users online :: 0 Registered, 0 Hidden and 21 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

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

View previous topic View next topic Go down

Anonymous
Guest
Guest

PostGuest 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.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12013
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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
Anonymous
Guest
Guest

PostGuest Mon 19 Dec 2016, 13:19

Oh this is so cool, yk! [EDGE STYlING] Fade out the widget menu when it's not hovered over 1f496 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:
https://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

Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5289
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 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']);
  });
});
Anonymous
Guest
Guest

PostGuest 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.
Anonymous
Guest
Guest

PostGuest 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?
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5289
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Fri 30 Dec 2016, 16:43

How far though? Like this far?

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

PostGuest 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.
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5289
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Fri 30 Dec 2016, 17:26

So like within the red box is good?
Anonymous
Guest
Guest

PostGuest Fri 30 Dec 2016, 17:51

Well, like anywhere here

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


here

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


and here

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

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).
Sponsored content

PostSponsored content

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