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.

Show/Hide Widgets Script at both sides

View previous topic View next topic Go down

Show/Hide Widgets Script at both sides

Post by AlexisMcDevin on March 8th 2015, 10:59 am

Dear Forumotion,

Following the tutorial @ http://help.forumotion.com/t78898-show-hide-widgets-script. I applied these codes to my forum however, there are something wrongs.

Could you please help me to review and fix below codes?

* For the left side :

- Top Widget:
Code:
<div onclick="jQuery('#left').animate({width:'toggle',height:'toggle',opacity:'toggle'},1000); if(my_getcookie('forum-widget')=='0') { my_setcookie('forum-widget','1',0,0); jQuery('#forum-widget').css('background-position','0 -13px'); } else { my_setcookie('forum-widget','0',1,0); jQuery('#forum-widget').css('background-position','0 0px'); }" style="height: 13px; width: 16px; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; cursor: pointer; position: absolute; background: #f5ebf7 url(http://illiweb.com/fa/optimisation_fdf/common/arrow_rtl.png) no-repeat 0 -13px;" id="forum-widget">
</div>
- Bottom Widget:
Code:
<script type="text/javascript"> jQuery('#forum-widget').insertBefore('#left'); if(my_getcookie('forum-widget')=='0') {jQuery('#left').animate({width:'toggle',height:'toggle',opacity:'toggle'},0); jQuery('#forum-widget').css('background-position','0 0px'); } </script>

* For the right side :

- Top Widget:
Code:
<div onclick="jQuery('#right').animate({width:'toggle',height:'toggle',opacity:'toggle'},1000); if(my_getcookie('forum-widget')=='0') { my_setcookie('forum-widget','1',0,0); jQuery('#forum-widget').css('background-position','0 -13px');  jQuery('#content-container div#content').css('margin-right','189px');} else { my_setcookie('forum-widget','0',1,0); jQuery('#forum-widget').css('background-position','0 0px'); jQuery('#content-container div#content').css('margin-right','0px'); }" style="cursor: pointer; height: 13px; width: 16px; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; position: relative; bottom: -15px; float: right; background: #f5ebf7 url(http://illiweb.com/fa/optimisation_fdf/common/arrow_rtl.png) no-repeat 0 -13px;" id="forum-widget">
</div>
- Bottom Widget:
Code:
<script type="text/javascript"> jQuery('#forum-widget').insertBefore('#right'); if(my_getcookie('forum-widget')=='0') {jQuery('#right').animate({width:'toggle',height:'toggle',opacity:'toggle'},0); jQuery('#forum-widget').css('background-position','0 0px');} </script>

Thank you!
Alex.

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Re: Show/Hide Widgets Script at both sides

Post by AlexisMcDevin on March 14th 2015, 7:58 am

Anybody help?

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

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