The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How do I add this feature, featured on Base's forum?

View previous topic View next topic Go down

How do I add this feature, featured on Base's forum?

Post by Cool-Guy on April 18th 2011, 11:56 am

Hello,

Take a look at this image:



How do I add that minimize feature?

http://pluspromotion.forumotion.co.uk/

Thanks.

Cool-Guy
Forumember

Posts : 295
Reputation : 0
Language : English

Back to top Go down

Re: How do I add this feature, featured on Base's forum?

Post by Base on April 18th 2011, 12:12 pm

Hi, in this case, jQuery was used. Credits to Saxaca for providing me with the code, please add this to your homepage message:

Code:
      <script>
    jQuery(function() {
      jQuery('div.forabg ul li.header').prepend('<span class="toggle" style="float: right; margin-right: 10px; font-weight: bold; margin-top: 5px; cursor: pointer;"><img src="http://icons.iconarchive.com/icons/iconarchive/red-orb-alphabet/16/Math-minus-icon.png" width="10px" /></span>');

      jQuery('.toggle').click(function() {
        if (jQuery(this).parent().parent().parent().find('li.row').is(':visible')) {
          jQuery(this).html('<img src="http://icons.iconarchive.com/icons/custom-icon-design/office/16/add-1-icon.png" width="10px" />');
          jQuery(this).parent().parent().parent().find('li.row').hide('slow');
        }

        else {
          jQuery(this).html('<img src="http://icons.iconarchive.com/icons/iconarchive/red-orb-alphabet/16/Math-minus-icon.png" width="10px" />');
          jQuery(this).parent().parent().parent().find('li.row').show('slow');
        }
      });
    });
    </script>

Smile

Base
Forumaster

Male Posts : 10386
Reputation : 1687
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

View previous topic View next topic Back to top


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