Webboard

Pełna wersja: Dodanie "opcity" w FancyCollapses
Aktualnie przeglądasz uproszczoną wersję forum. Kliknij tutaj, by zobaczyć wersję z pełnym formatowaniem.
wersja skryptu MyBB: 1.6.9
adres forum: Play3Center!
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu): Cześć, witajcie. O tuż zainstalowałem FancyCollapses (takie fajne zwijanie działów xD)i teraz nie wiem jak do niego dodać opacity, tak jak jest w I.P.B

Tutaj daje kody tych plików:

jquery.fancyCollapses.js
Kod PHP:
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1;}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires="; expires="+date.toUTCString();}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("");}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return-h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return-h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return-h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return-h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return-h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return-h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return-h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return-h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return-(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return-0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});expandables=null;(function($){jQuery(document).ready(function(){var fancyCollapses_cookie="fancyCollapses_collapsed_elmnts",sepR="|",sepM=",";var coll_onLoad=$.cookie(fancyCollapses_cookie);if(coll_onLoad!=""&&coll_onLoad!=null){var w=coll_onLoad.split(sepR);for(i=0;i<w.length;i++){var bit=w[i].split(sepM)
if(
typeof bit[0]!="undefined"&&bit[0]!=""){if(bit[2]=="m"){var collapser_img=$(bit[1]).attr("src");if(typeof collapser_img!="undefined"){collapser_img=collapser_img.replace("collapse","collapse_collapsed");$(bit[1]).attr("src",collapser_img);$(bit[1]).css("cursor","pointer");var fancyCollapses_body=$(bit[0]);var cellpadding=fancyCollapses_body.closest("table").attr("cellpadding");var cellspacing=fancyCollapses_body.closest("table").attr("cellspacing");fancyCollapses_body.closest("table").attr("cellspacing","0")
fancyCollapses_body.addClass("fancyCollapses_modded").wrapInner("<tr><td style='padding: 0; margin: 0; width: 100%'><div><table width='100%' border='0' cellspacing='"+cellspacing+"' cellpadding='"+cellpadding+"'></table></div></td></tr>");fancyCollapses_body.children().children().children().hide();}}else{$(bit[0]).hide();}
$(
bit[1]).addClass("fancyCollapses_collapser_collapsed");$(bit[0]).addClass("fancyCollapses_collapsed");}}}})
$.fn.
fancyCollapses=function(options){var opts=$.extend({},$.fn.fancyCollapses.defaults,options);return this.each(function(){var fancyCollapses_cookie="fancyCollapses_collapsed_elmnts",sepR="|",sepM=",";function addColl(body,collapser,mn){var list=$.cookie(fancyCollapses_cookie);if(list==null){list="";}
var 
line=list+sepR+body+sepM+collapser+sepM+mn;$.cookie(fancyCollapses_cookie,line);}
function 
removeColl(body,collapser,mn){var list=$.cookie(fancyCollapses_cookie);var que=sepR+body+sepM+collapser+sepM+mn;list=list.replace(que,"");$.cookie(fancyCollapses_cookie,list)}
var 
$this=$(this);var o=$.meta?$.extend({},opts,$this.data()):opts;var tblid="",tbtn="",fancyCollapses_body,fancyCollapses_btn,storeCookie=false;tblid=$this.attr("id");if(o.collapser){tbtn=o.collapser;}
if(!
tblid){if(!o.collapser){var err=new Error();err.name='fancyCollapses error';err.message='No collapser specified';throw(err);}
fancyCollapses_body=$this;}else{storeCookie=true;tblid="#"+tblid;fancyCollapses_body=$(tblid);if(o.isTable){tbtn=tblid.replace("_e","_img")
if(!
fancyCollapses_body.hasClass("fancyCollapses_modded")){var cellpadding=fancyCollapses_body.closest("table").attr("cellpadding");var cellspacing=fancyCollapses_body.closest("table").attr("cellspacing");fancyCollapses_body.closest("table").attr("cellspacing","0")
fancyCollapses_body.wrapInner("<tr><td style='padding: 0; margin: 0; width: 100%;'><div><table width='100%' border='0' cellspacing='"+cellspacing+"' cellpadding='"+cellpadding+"'></table></div></td></tr>");}
fancyCollapses_body=$(tblid).children().children().children();}else{if(!o.collapser){tbtn=tblid+"_btn";;}}}
fancyCollapses_btn=$(tbtn);fancyCollapses_btn.css("cursor","pointer");fancyCollapses_body.width("100%");fancyCollapses_btn.click(function(){if(!fancyCollapses_btn.hasClass("fancyCollapses_collapser_collapsed")){fancyCollapses_body.slideUp(o.speed,o.easing);if(o.isTable){var collapser_img=fancyCollapses_btn.attr("src");collapser_img=collapser_img.replace("collapse","collapse_collapsed");fancyCollapses_btn.attr("src",collapser_img);}
fancyCollapses_btn.addClass("fancyCollapses_collapser_collapsed");fancyCollapses_body.addClass("fancyCollapses_collapsed");if(storeCookie){var type="n";if(o.isTable){type="m";}
addColl(tblid,tbtn,type);}}else{fancyCollapses_body.slideDown(o.speed,o.easing)
if(
o.isTable){var collapser_img=fancyCollapses_btn.attr("src");collapser_img=collapser_img.replace("_collapsed","");fancyCollapses_btn.attr("src",collapser_img)}
fancyCollapses_btn.removeClass("fancyCollapses_collapser_collapsed");fancyCollapses_body.removeClass("fancyCollapses_collapsed");if(storeCookie){var type="n";if(o.isTable){type="m";}
removeColl(tblid,tbtn,type);}}})});};$.fn.fancyCollapses.defaults={easing:"linear",speed:"normal",collapser:"",isTable:true};})(jQuery); 

theme.js
Kod PHP:
jQuery.noConflict();jQuery(document).ready(function($){$(".tborder  tbody[id$='_e'], .tborder2 tbody[id$='_e']").fancyCollapses({easing:"easeInOutQuart",speed:"normal"});$("#nav").delegate("a.panel_toggle","onmouseout",function(){$("#panel ul.panel_menu").slideUp('fast');})
$(
"#nav").delegate("a.panel_toggle","click",function(){if(!$("#panel ul.panel_menu:visible").size()){$("#panel ul.panel_menu").slideDown('slow');$("#panel").hover(function(){},function(){$("#panel ul.panel_menu").slideUp('fast');})}else{$("#panel ul.panel_menu").slideUp('fast');}})
$(
"table.forum_main").each(function(){$(this).hover(function(){$(this).stop().animate({backgroundColor:"#F6F9FC"},200).addClass("active");$(this).click(function(){document.location.href=$(this).find("td strong a:first").attr("href");});},function(){$(this).stop().animate({backgroundColor:"#EAF1FA"},400).removeClass("active");});});$("#subnav").delegate(".sub_links .dd_menu .dd_menu_link","click",function(){$("#subnav .sub_links ul li.dd_menu a").find("a").removeClass("active");$(this).addClass("active");if(!$(this).siblings("ul:visible").size()){$(this).siblings("ul").slideDown('medium');$(this).parent().hover(function(){},function(){$(this).children("ul").slideUp('fast');$("#subnav .sub_links ul li.dd_menu a").removeClass("active");})}else{$(this).parent().children("ul").slideUp('fast');}})}); 

Ps. Nie wiedziałem gdzie to wstawić więc wstawiłem tutaj. ;x
Ps 2. Powinien być dodatkowy dział z java scriptami xD
Riplej!
Daj jakiś przykład "na żywo" jaki efekt chcesz uzyskać ;)
Jak widzisz na moim forum gdy zwinie się dział, jest animacja i tylko ona. A chciałbym dodać że po zwinięciu dostaje się przeźroczystość tak jak na i.p.b np.: http://www.cs-spark.eu