IMPORTANT

FM Design will be closing soon, please click here for more information.

Latest topics
» Forum Closure
by Michael_vx Yesterday at 05:52

» Forumactif Edge - Releases
by Ange Tuteur Thu 14 Dec 2017, 11:25

» [GAME] Count to One Million!
by Valoish Wed 13 Dec 2017, 23:23

» [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

» Numbering of messages in the topic
by SLGray Mon 04 Dec 2017, 22:40

» Support Forums and Social Networks
by SLGray Mon 04 Dec 2017, 22:38

» Browsers & Updates
by Wolfuryo Mon 04 Dec 2017, 15:20

» Logo/Favicon
by Mr_Grande Mon 04 Dec 2017, 09:55

» Broadcasting Duo
by brandon_g Sun 03 Dec 2017, 11:01

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

None

[ 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 : 22
Posts : 4718
Points : 9625
Reputation : 2346
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 : 2153
Points : 2982
Reputation : 92
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 : 2153
Points : 2982
Reputation : 92
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 : 2153
Points : 2982
Reputation : 92
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