Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Archived] basic view buttons



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
i just want to ask how to do this one.


Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

2
Offline

  nanako

avatar
Punbb Guru
Punbb Guru
Javascript - topics
Code:
        $(document).ready(function($) {
        $('div.main-head.clearfix:first p.h2').prepend('<div class="topicViewIcons">
        <a id="topicViewRegular" title="Regular view" class="active"><img src="http://i72.servimg.com/u/f72/18/07/42/17/spacer10.gif" alt=""></a>
        <a id="topicViewBasic" title="Basic View"><img src="http://i72.servimg.com/u/f72/18/07/42/17/spacer10.gif" alt=""></a>
        </div>');
        $("#topicViewBasic").click(function(){
            $(".pun .post .user").hide("user");
            $(".postmain").css('margin-left','0px');
            $(".postfoot").css('margin-left','0px');
            $("#topicViewRegular").removeClass("active");
            jQuery(this).addClass('active');
            $("div.main-content.topic").addClass("basicTopicView");
          });
        $("#topicViewRegular").click(function(){
            $(".pun .post .user").show("user");
            $(".postmain").css('margin-left','17em');
            $(".postfoot").css('margin-left','-17em');
            $("#topicViewBasic").removeClass("active");
            jQuery(this).addClass('active');
            $("div.main-content.topic").removeClass("basicTopicView");
          });
        });
btw punbb have this tutorial before but don't know why it's removed.

Powered by PunBB
Currently 0 users have thanked nanako for this post:

3
Offline

  KiNGphx

avatar
Punbb Guru
Punbb Guru
nothings happen ..

Powered by PunBB
Currently 0 users have thanked KiNGphx for this post:

4
Offline

  nanako

avatar
Punbb Guru
Punbb Guru
forgot the css lol
Code:
[panda=css]
    .topicViewIcons {
    overflow: hidden;
    position: relative;
    padding-bottom: 1px;
    margin: -3px 10px -5px 0;
    float: left;
    }
    .topicViewIcons a {
    cursor: pointer;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    float: left;
    width: 22px;
    height: 22px;
    text-decoration: none;
    text-align: center;
    outline: none;
    margin-right: 5px;
    opacity: 0.6;
    }
    .topicViewIcons a:hover {
      background:url("http://i72.servimg.com/u/f72/18/07/42/17/trans110.png") repeat;
      background:rgba(0,0,0,0.1);
      opacity:0.8
    }
    .topicViewIcons #topicViewRegular.active img {
    background-position: 0 -16px;
    }
    .topicViewIcons a.active {
    background: url("http://i72.servimg.com/u/f72/18/07/42/17/trans510.png") repeat;
    background: rgba(0,0,0,0.5);
    -webkit-box-shadow: inset rgba(0,0,0,0.6) 0px 1px 3px, rgba(255,255,255,0.3) 0px 1px 0px;
    -moz-box-shadow: inset rgba(0,0,0,0.6) 0px 1px 3px, rgba(255,255,255,0.3) 0px 1px 0px;
    box-shadow: inset rgba(0,0,0,0.6) 0px 1px 3px, rgba(255,255,255,0.3) 0px 1px 0px;
    opacity: 1;
    }
    .topicViewIcons #topicViewRegular img {
    background-position: 0 0;
    }
    .topicViewIcons img {
    opacity: 1!important;
    vertical-align: top;
    margin-top: 4px;
    width: 16px;
    height: 16px;
    background: url("http://i72.servimg.com/u/f72/18/07/42/17/topicv10.png") no-repeat;
    }
    .topicViewIcons #topicViewBasic.active img {
    background-position: -16px -16px;
    }
    .basicTopicView .postmain{margin-left:10 !important;}
    .basicTopicView .postmain .postfoot {
      margin: 0;
    }
    .basicTopicView .user, .basicTopicView .sig-content{display:none}

Powered by PunBB
Currently 0 users have thanked nanako for this post:

5
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
nothing's happened.

Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

6
Offline

  Guest

avatar
Guest
Post your forum url here.

Powered by PunBB
Currently 0 users have thanked Guest for this post:

7
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
my forum link

http://legacymu.forum.st/

Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

8
Offline

  Guest

avatar
Guest
Try adding this JS instead of previous one,

Code:
[panda=js]        $("#topicViewBasic").click(function(){
                $(".pun .post .user").hide("user");
                $(".postmain").css('margin-left','0px');
                $(".postfoot").css('margin-left','0px');
                $("#topicViewRegular").removeClass("active");
                jQuery(this).addClass('active');
                $("div.main-content.topic").addClass("basicTopicView");
              });
            $("#topicViewRegular").click(function(){
                $(".pun .post .user").show("user");
                $(".postmain").css('margin-left','17em');
                $(".postfoot").css('margin-left','-17em');
                $("#topicViewBasic").removeClass("active");
                jQuery(this).addClass('active');
                $("div.main-content.topic").removeClass("basicTopicView");
              });
            });

Powered by PunBB
Currently 0 users have thanked Guest for this post:

9
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
still the same

Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

10
Offline

  Guest

avatar
Guest
Hmm, then I think you have a problem with some javascript and it makes this one like an invalid. Try to disable 1 by 1 and check if that helps.

Powered by PunBB
Currently 0 users have thanked Guest for this post:

11
Offline

  Guest

avatar
Guest
[aviso="Thread Archived"]Original poster seems to be inactive and didn't respond within 7 days in this thread. Because of this, the topic has been Archived.

If you have further questions, please open a new topic.[/aviso]

Powered by PunBB
Currently 0 users have thanked Guest for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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