実行結果
設置サンプルのソース
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<title>設定サンプル</title>
<link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
<!-- JS -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="/content/lib/jquery/jquery.meerkat.1.0.js"></script>
<script type="text/javascript">
$(function(){
/* ページ読み込み時に実行 */
meerkat({
close: '.close',
dontShow: '.dont-show',
animation: 'slide',
animationSpeed: 500,
dontShowExpire: 0,
removeCookie: '.remove-cookie',
meerkatPosition: 'bottom',
background: '#000 url(/meerkat/images/meerkat-bg.png) repeat-x 0 0',
height: '110px'
});
$("#demo1").click(function(){
meerkat({
close: '.close-meerkat',
animation: 'fade',
animationSpeed: 750,
meerkatPosition: 'top',
background: '#000',
height: '110px'
});
});
});
</script>
<!-- CSS -->
<style type="text/css">
#wrap {
margin-left:20px;
margin-right:20px;
}
#meerkat-container {
position:relative;
}
#meerkat {
width: 100%;
display: none;
}
#meerkat-content-adsense {
width:728px;
margin:0 auto;
padding-top:10px;
}
#meerkat-content-adsense a {
width:728px; height:90px;
display:block;
background:transparent url("/content/img/ajax/banner728x90.jpg") no-repeat 0 0;
text-indent:-9999px;
}
a.close {
position: absolute;
top: 7px;
right: 3px;
background: url("/content/img/ajax/btn_close.png") no-repeat 0 0;
display: block;
height: 26px;
width: 26px;
text-indent:-9999px;
}
a.close:hover {
background-position: 0 bottom;
}
</style>
<link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
<body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
<div id="wrap">
<h1>設置サンプル</h1>
<p>参照:<a href='http://jarodtaylor.com/meerkat/'>Meerkat - A jQuery Plugin</a></p>
<ul>
<li><a href="#" id="demo1">ページ上部にバナー表示(フェード効果)</a></li>
</ul>
</div>
<!-- CODE -->
<div id="meerkat">
<div id="meerkat-content-adsense">
<a href="#">banner728x90</a>
</div>
<a class="close">Close</a>
</div>
<!-- CODE / -->
</body>
</html>