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 27 users online :: 0 Registered, 0 Hidden and 27 Guests :: 1 Bot

None

[ View the whole list ]


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

Modify Category Tabs lead to a desired position and auto scroll click

View previous topic View next topic Go down

djblah
djblah
Member
Gender : Unspecified
Posts : 12
Points : 3250
Reputation : 0
Language : español
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postdjblah Wed 16 Aug 2017, 20:14

Hello friends fmdesign

I am using the delisable menu of categories.

Modify Category Tabs lead to a desired position and auto scroll click Captur20

Well I wish if you administrator can make these changes I want to move only the category bar to a desired position.

And that when clicking you take it to the position of the category.

example: http://jsfiddle.net/kevinPHPkevin/8tLdq/

Without losing the same operation of the original that opens the category

Here is the javascript

Code:
$(function() {
          'DEVELOPED BY ANGE TUTEUR';
          'NO DISTRIBUTION WITHOUT CONSENT OF THE AUTHOR';
          'ORIGIN : http://fmdesign.forumotion.com/t472-category-tabs#5772';
       
          // automatically detects the version
          var version = 0;
       
          if (version == 'badapple') {
            if (window.console && console.warn)
              console.warn('The plugin "fa_tabs" is not supported for your forum version.');
            return;
          }
       
          window.fa_tabs = {
            active: my_getcookie('fa_tab_active') || 0,
            // active tab
            list: [],
            // category list
            version: version,
            // forum version
       
            // language settings
            lang: {
              title: 'Select a Category',
              placeholder: 'Category',
              all: 'All'
            },
       
            // selectors
            select: {
              content: 'main-content',
              category: ['.box-over'][version]
            },
       
            // function for changing the active category
            change: function(index) {
              my_setcookie('fa_tab_active', index);
              // save the active tab to a cookie
       
              // actions to run if the tab is not "all"
              if (index != 'all') {
                if (fa_tabs.active == 'all') {
                  fa_tabs.tab[0].previousSibling.className = '';
                  fa_tabs.display('none');
                } else {
                  fa_tabs.tab[fa_tabs.active].className = '';
                  fa_tabs.list[fa_tabs.active].style.display = 'none';
                }
       
                fa_tabs.tab[index].className = 'fa_tabactif';
                fa_tabs.list[index].style.display = '';
       
                if (fa_tabs.version == 2) {
                  if (fa_tabs.active != 'all')
                    fa_tabs.list[fa_tabs.active].nextSibling.style.display = 'none';
                  fa_tabs.list[index].nextSibling.style.display = '';
                }
              } else {
                if (fa_tabs.active != 'all')
                  fa_tabs.tab[fa_tabs.active].className = '';
                fa_tabs.tab[0].previousSibling.className = 'fa_tabactif';
                fa_tabs.display('');
              }
       
              fa_tabs.active = index;
            },
       
            // change the display of all categories
            display: function(state) {
              for (var i = 0, j = fa_tabs.list.length; i < j; i++) {
                fa_tabs.list[i].style.display = state;
                if (version == 2)
                  fa_tabs.list[i].nextSibling.style.display = state;
              }
              ;
            },
       
            // stop tab scrolling
            stop: function() {
              if (fa_tabs.interval) {
                window.clearInterval(fa_tabs.interval);
                fa_tabs.interval = null;
              }
            },
       
            // scroll tablist
            scroll: function(by, max) {
              if (!fa_tabs.interval) {
                var node = document.getElementById('fa_tablist').firstChild.firstChild;
       
                fa_tabs.interval = window.setInterval(function() {
                  var margin = +node.style.marginLeft.replace(/px/, '');
                  (by < 0 && margin <= max) || (by > 0 && margin >= max) ? fa_tabs.stop() : node.style.marginLeft = margin + by + 'px';
                }, 1);
              }
            }
       
          };
       
          // startup variables
          var frag = document.createDocumentFragment()
            , container = $('<div id="fa_category_tabs"><h2 id="fa_tabs_title">' + fa_tabs.lang.title + '</h2></div>')[0]
            , tablist = $('<div id="fa_tablist"><div class="inner_tabs"><div></div></div></div>')[0]
            , catglist = $('<div id="fa_catglist" />')[0]
            ,
          a = $(fa_tabs.select.category, !version ? $(fa_tabs.select.content)[0] : document.getElementById(fa_tabs.select.content))
            , i = 0
            , j = a.length
            , htmlStr = '<a href="javascript:fa_tabs.change(\'all\');">' + fa_tabs.lang.all + '</a>';
       
          // drop off the main container before the first category
          a[0] && a[0].parentNode.insertBefore(container, a[0]);
       
          // loop through each category
          for (; i < j; i++) {
            if (version == 2)
              var next = a[i].nextSibling;
       
            // create our tabs
            htmlStr += '<a href="javascript:fa_tabs.change(' + i + ');">' + ($('H2:first', a[i]).text() || fa_tabs.lang.placeholder + ' ' + i) + '</a>';
       
            // append the category to the list and hide it
            catglist.appendChild(a[i]);
            a[i].style.display = 'none';
       
            // get the next sibling as well for punbb
            if (version == 2) {
              catglist.appendChild(next);
              next.style.display = 'none';
            }
       
            fa_tabs.list[i] = a[i];
            // cache the category to the array
          }
       
          if (fa_tabs.list[0]) {
            tablist.firstChild.firstChild.innerHTML = htmlStr;
            // fill in the tablist
            fa_tabs.tab = [].slice.call(tablist.getElementsByTagName('A'));
            // create an array for the tabs
            fa_tabs.tab.shift();
            // remove the all tab
       
            fa_tabs.change(fa_tabs.active);
            // setup the active tab
       
            // finally add the content to the document
            frag.appendChild(tablist);
            frag.appendChild(catglist);
            container.appendChild(frag);
       
            window.setTimeout(function() {
              if (tablist.firstChild.scrollWidth > tablist.firstChild.clientWidth) {
                tablist.className = 'fa_tabs_overflow';
                tablist.firstChild.firstChild.style.marginLeft = '0px';
                tablist.insertAdjacentHTML('beforeend', '<a class="tab_scroller scroll_left" href="#" onmousedown="fa_tabs.scroll(20, 0); return false;" onclick="fa_tabs.stop(); return false;" onmouseout="fa_tabs.stop();"><</a><a class="tab_scroller scroll_right" href="#" onmousedown="fa_tabs.scroll(-20, -' + (tablist.firstChild.scrollWidth - tablist.firstChild.clientWidth) + '); return false;" onclick="fa_tabs.stop(); return false;" onmouseout="fa_tabs.stop();">></a>');
              }
            }, 100);
          }
        });
       
        $('head').append('<style type="text/css">#fa_tabs_title{color:#333;font-size:24px;font-weight:400;font-family:arial,sans-serif;margin:3px;line-height:24px}.inner_tabs a,a.tab_scroller{font-family:arial,sans-serif;height:30px;line-height:30px}#fa_tablist{position:relative;white-space:nowrap}#fa_tablist.fa_tabs_overflow{padding:0 18px}.inner_tabs{overflow:hidden;padding-bottom:1px;margin-bottom:-1px}a.tab_scroller{color:#FFF;background:#333;font-size:16px;text-align:center;position:absolute;bottom:2px;width:15px;opacity:.1}a.tab_scroller.scroll_left{left:0}a.tab_scroller.scroll_right{right:0}#fa_tablist:hover a.tab_scroller{opacity:.7}#fa_tablist a.tab_scroller:hover{opacity:1}#fa_catglist{background:#EEE;border:1px solid #CCC;border-radius:3px;padding:10px 6px}.inner_tabs a{color:#333 !important;background:#DDD;border:1px solid #CCC;border-bottom:none;border-radius:3px 3px 0 0;text-decoration:none!important;font-size:12px;font-weight:700;display:inline-block;padding:0 10px;margin:3px 3px 0}.inner_tabs a.fa_tabactif,.inner_tabs a:hover{background:#EEE;position:relative;bottom:-1px;opacity:1}</style>');


@Ange Tuteur
Wolfuryo
Wolfuryo

Gender : Male
Posts : 256
Points : 3568
Reputation : 81
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostWolfuryo Thu 17 Aug 2017, 15:55

I don't understand what you want to do.... Please explain better.
djblah
djblah
Member
Gender : Unspecified
Posts : 12
Points : 3250
Reputation : 0
Language : español
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postdjblah Thu 17 Aug 2017, 19:19

this is what I want

Modify Category Tabs lead to a desired position and auto scroll click Explic10
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5290
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Sat 19 Aug 2017, 14:57

@djblah Forum link?
djblah
djblah
Member
Gender : Unspecified
Posts : 12
Points : 3250
Reputation : 0
Language : español
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postdjblah Mon 21 Aug 2017, 09:58

Ace 1 wrote:@djblah Forum link?

here
http://www.tibiaface.com/forum
djblah
djblah
Member
Gender : Unspecified
Posts : 12
Points : 3250
Reputation : 0
Language : español
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postdjblah Wed 23 Aug 2017, 11:13

djblah wrote:
Ace 1 wrote:@djblah Forum link?

here
http://www.tibiaface.com/forum



bumb
djblah
djblah
Member
Gender : Unspecified
Posts : 12
Points : 3250
Reputation : 0
Language : español
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postdjblah Thu 14 Sep 2017, 18:51

bump
Luffy
Luffy

Gender : Male
Age : 30
Posts : 291
Points : 4019
Reputation : 64
Language : Greek, English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://www.inforumgr.com/ https://www.facebook.com/inforumgr https://twitter.com/inforumgr

PostLuffy Fri 15 Sep 2017, 06:16

@djblah, you are not using ForumActif Edge and you seek support here? This is not a support forum but it only supports forums that use ForumActif Edge and only. Therefore, i doubt you finding your solution here. Always friendly speaking.
djblah
djblah
Member
Gender : Unspecified
Posts : 12
Points : 3250
Reputation : 0
Language : español
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postdjblah Fri 15 Sep 2017, 14:56

Luffy wrote:@djblah, you are not using ForumActif Edge and you seek support here? This is not a support forum but it only supports forums that use ForumActif Edge and only. Therefore, i doubt you finding your solution here. Always friendly speaking.


sorry i think i was wrong
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