La Nenicu

The best site


  • Posteaza un subiect nou

Punbb: Deschideti intregul mesaj printr-un buton

Distribuiţi
avatar
Horrible

Mesaje : 117
Joined : 18/11/2014
Varsta : 24
Oras : Sibiu
Reputatie : 0

Punbb: Deschideti intregul mesaj printr-un buton

Mesaj Scris de Horrible la data de Mier Noi 19 2014, 00:47

Nume cod: Deschideti intregul mesaj printr-un buton
Versiune: PunBB
Autor: anhoang_qn

Previzualizare:




CSS:
Cod:
.baivietdai{overflow:hidden}
.thugon span:hover{cursor:pointer}
.thugon{background-color:#FAFFC7;border:3px double #9ED8FF;clear:both;margin:0;padding:2px 10px}
.viewfull{background:url(//ssl.gstatic.com/ui/v1/zippy/arrow_down.png) no-repeat scroll 3px 7px transparent;padding:0 15px}
.viewhide{background:url(//ssl.gstatic.com/ui/v1/icons/mail/arrow_up.png) no-repeat scroll 3px 7px transparent;padding:0 15px}
.fullOff{background:url(http://i48.servimg.com/u/f48/16/58/89/73/power_10.png) no-repeat scroll 0 2px transparent;margin-top:-2px;padding:2px 5px 2px 20px}
.fullOn{background:url(http://i48.servimg.com/u/f48/16/58/89/73/power_11.png) no-repeat scroll 0 2px transparent;margin-top:-2px;padding:2px 5px 2px 20px}

Adauga urmatorul cod Javascript
Titlu: Deschideti intregul mesaj printr-un buton
Amplasare: topicuri
Cod:
$(function () {
   $(".postbody .post-entry").each(function () {
      600 <= $(this).height() && $(this).addClass("baivietdai").height(310).after('<p class="thugon"><span><span class="viewfull">Details</span><span class="viewhide" style="display:none">Collapse</span></span><span><span class="fullOff" style="float:right">Off collapse</span><span class="fullOn" style="float:right;display:none">Turn collapse</span></span></p>')
   });
   "100%" == my_getcookie("thugonbaiviet") && ($(".fullOn, .viewhide,.fullOff, .viewfull").toggle(), $(".baivietdai").height("100%"));
   $(".viewfull, .viewhide, .fullOff, .fullOn").click(function () {
      var c = "100%",
         a = $(this),
         b = a.attr("class");
      if ("viewhide" == b || "fullOn" == b) c = 310;
      "fullOff" == b || "fullOn" == b ? (my_setcookie("thugonbaiviet", c, !0), $(".fullOff, .fullOn").toggle()) : (a.closest(".thugon").prev().height(c), $(window).scrollTop(a.closest(".post").offset().top));
      a.hide().siblings().show()
   })
});
  • Posteaza un subiect nou

Subiecte similare

-

Acum este: Lun Apr 23 2018, 12:24