|
 |
|
รบกวนผู้รู้เกี่ยวกับ การตรึงกล่อง พอเลื่อน scroll bar ลงมา หรือเลื่อนเลยกล่องที่กำหนด กล่องที่ตรึงไว้จะเลื่อนตาม scroll bar |
|
 |
|
|
 |
 |
|
Code (JavaScript)
$( window ).scroll(function() {
$( "#your_div" ).css( "top", new_num );
});
|
ประวัติการแก้ไข 2014-09-08 20:36:57
 |
 |
 |
 |
Date :
2014-09-08 20:36:32 |
By :
Chaidhanan |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มาแบบครึ่งๆ บอกทั้งทีจัดเต็มหน่อยครับ ไม่งั้นถ้ามีบทความที่เกี่ยวข้องก็บอกด้วยนะครับท่านกูรู
|
 |
 |
 |
 |
Date :
2014-09-08 20:58:31 |
By :
ฟงหวินขี้เครื่่องสูบน้ำ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Chaidhanan</title>
<link href="css.css" rel="stylesheet" />
<link href="/jquery/themes/ui-lightness/jquery-ui.css" rel="stylesheet" />
<script src="/jquery/jquery-1.8.2.js"></script>
<script src="/jquery/ui/jquery-ui.js"></script>
<script src="/jquery/ui/jquery.ui.autocomplete.js"></script>
<script>
var page_name='<?php echo $page_name; ?>';
jQuery.fn.c32 = function () {
this.css("top", (($(window).height() - this.outerHeight()) / 3) + $(window).scrollTop() + "px");
this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
return this;
}
jQuery.fn.center = function ( w, h) {
this.css("top", (($(window).height() - h) / 2) + $(window).scrollTop() + "px");
this.css("left", (($(window).width() - w) / 2) + $(window).scrollLeft() + "px");
return this;
}
$(document).ready(function(e) {
$(document).find('.menu').each(function(index, element) {
if($(element).attr('id')!==page_name){
$(element).on('mouseover', '', '', function(e){
$(this).attr({ src: $(this).attr('src').replace(/org/, 'over') });
}).on('mouseout', '', '', function(e){
$(this).attr({ src: $(this).attr('src').replace(/over/, 'org') });
}).on('click', '', '', function(){
bt_click( $(this).attr('id') );
});
}
});
$('.add_bottom_600x80')
.css({ bottom: '10px', left: (($(window).width() - 600) / 2) + $(window).scrollLeft() + "px"}).slideDown(200)
.on('click', '', '', function(){
if(document.getElementsByClassName('add_bottom_600x80').item(0).childNodes.length==0){
alert('Goto Contact Advertising');
}
});
});
function bt_click( op ){
switch( op ){
case 'Login':
$('#myPopUp').slideUp(500);
$.ajax({ url: 'inc/login.html?a='+Math.random(1000,9999)}).done( function(msg){ $('#myPopUp').html(msg).c32(304, 400).slideDown(500); });
break;
case 'Home':
if(page_name!=='Home')
$.ajax({ data:{ run: 'Home' }}).done( function(msg){ alert(msg); });
break;
case 'Registry':
$('#myPopUp').slideUp(500);
$.ajax({ url: 'inc/registry.html?a='+Math.random(1000,9999)}).done( function(msg){ $('#myPopUp').html(msg).c32(304, 538).slideDown(500); });
break;
}
}
function show_popup(){
alert($('#myPopUp').children(0).width() + ":" + $('#myPopUp').children(0).height() );
}
</script></head>
<body>
<div style="position: fixed; width: 100%; text-align: center">
<img src="/new_img/chaidhanan.gif" /><br/>
<?php include( $inc_menu ); ?>
</div>
<div style="height: 120px"><img src="new_img/block.png" height="120" /></div>
<?php
switch($page_name){
case 'Home': include('inc/home.php'); break;
case 'Shop': include('inc/shop.php'); break;
}
session_write_close();
?>
<div style="width: 600px; height: 90px;"><img src="new_img/block.png" height="90" /></div>
<div style="position: fixed; width: 600px; height: 80px; display: none" class="add_bottom_600x80"></div>
<div id='myPopUp' style="position: absolute; display:none"></div>
</body>
</html>
www.chaidhanan.com ทีแรกว่าจะเขียน คล้ายๆ เวป thaicreate นีแหล่ะครับ พอดีมาเจอ ไทยครีเอท ซะก่อน
เลยชะลอโครงการไว้ พอจะเอาเป็นตัวอย่างได้ ก็ลองดูครับ
|
 |
 |
 |
 |
Date :
2014-09-08 21:11:14 |
By :
Chaidhanan |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
จัดเตมแบบนี้ ไปเสิดบทความเว็บนอกอ่านเอาก็ได้มัง
|
 |
 |
 |
 |
Date :
2014-09-08 21:20:58 |
By :
ตาลายหมดแล้ว |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมแนะนำคุณ Chaidhanan ทำเว็บพวกให้ความรู้ทุกอย่างเลยก็ได้ ทั้งเขียนโปรแกรม สื่อสำหรับเด็ก แฟชั่น เขียนบทความ พอข้อมูลเยอะๆ แล้วก็ขอโฆษณาจาก google มาติด ประกอบกับการทำ SEO เพื่อให้เว็บติด search engine หารายได้เล็กๆ น้อยๆ ครับ
รับรองรุ่งแน่ครับ
|
 |
 |
 |
 |
Date :
2014-09-08 21:47:46 |
By :
มังกรวิ่งขี่เครื่องสูบ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Chaidhanan เยี่ยมมากครับ
|
 |
 |
 |
 |
Date :
2014-09-08 23:07:49 |
By :
anirut_yam |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|