2012年8月9日 星期四
jquery 同時進行不同的動畫又不被取消或干擾
//同時進行不同的動畫又不被取消
alpha_40();
$("#about_content").animate({scrollTop: $('#about_human_WOW').offset().top-use_top_dis},{queue: false,duration: 3000,complete:function(){$("#goTop").fadeIn();}});
function alpha_40(){
$("#about_content").animate({opacity: 0.2},{queue: false,duration: 500,complete:function(){alpha_mid()}});
}
function alpha_mid(){
$("#about_content").animate({opacity: 0.2},{queue: false,duration: 2500,complete:function(){alpha_100()}});
}
function alpha_100(){
$("#about_content").animate({opacity: 1},{queue: false,duration:2000});
}
參考
http://alphasis.info/2011/09/jquery-api-animate-properties-options-queue/
2012年8月8日 星期三
CSS 上下置中
<style>
html,body{
margin:0;
height:100%;
width:100%;
}
#in_wrap{
margin:0 auto;
text-align:center;
}
</style>
<div id="in_wrap" class="greenBorder" style="display: table; width:800px;height: 100%; #position: relative; overflow: hidden;">
<div style=" #position: absolute; #top: 50%;display: table-cell; vertical-align: middle;">
<div class="greenBorder" style="#position: relative; #top: -50%; ">
這裡寫要使用的吧
</div>
</div>
</div>
2012年8月2日 星期四
jquery Iframe控制父視窗內容
parent.$ <-----這樣使用
parent.$.colorbox.close();
parent.$.address.value('contactOK');
parent.$.colorbox.close();
parent.$.address.value('contactOK');
2012年7月30日 星期一
wordpress顯示分類標題或slug(category name)
在single.php裡這樣用
<?php
$category = get_the_category();
echo $category[0]->slug ;
?>
在category.php裡這樣用
$current_category = single_cat_title("", false);
2012年7月19日 星期四
wordpress取得縮圖網址SRC(thumbnail)
<?php
$domsxe = simplexml_load_string(get_the_post_thumbnail());
$thumbnailsrc = $domsxe->attributes()->src;
?>
<?php if (has_post_thumbnail()){ ?>
<?php }?>
2012年7月17日 星期二
訂閱:
文章 (Atom)