The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Show/Hide Widgets Script at both sides

Go down

Show/Hide Widgets Script at both sides Empty Show/Hide Widgets Script at both sides

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

Dear Forumotion,

Following the tutorial @ https://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://2img.net/i/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://2img.net/i/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
AlexisMcDevin
Forumember

Male Posts : 134
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Show/Hide Widgets Script at both sides Empty Re: Show/Hide Widgets Script at both sides

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

Anybody help?
AlexisMcDevin
AlexisMcDevin
Forumember

Male Posts : 134
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Back to top

- Similar topics

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