상품리스트 페이지 jQuery load 로 불러오기
jQuery로 상품 목록을 불러 올 수 있도록 수정했습니다.
좌측의 상품카테고리 영역과 상품리스트의 페이징 링크에 반응 하도록 되어있습니다.
skin/shop/스킨명/boxcategory.skin.php 에 아래 스크립트를 추가합니다.
[code]
<script>
$(function() {
$('#gnb a, a.pg_page').live('click', function(e) {
if(this.href.match(/list\.php/g)) {
e.preventDefault();
var page_title = $(this).text() + ' 상품리스트';
var link = this.href;
if(!this.href.match(/page/))
document.title = page_title + ' | <?php echo $config['cf_title'];?>';
else $('html,body').animate({scrollTop:0},'fast');
var loading = '<div class="loading"> 상품목록을 불러오는 중입니다 </div>';
var i = 0;
var load = setInterval(function() {
$('.loading').append('.').prepend('.');
i++;
if(i == 20) {
i = 0;
$('.loading').html('상품목록을 불러오는 중 오류가 발생하여 다시 시도 중입니다. 잠시만 기다려 주십시오.<br /><br /><a href="'+link+'">바로 이동하기</a>');
location.href = link;
clearInterval(load);
}
}, 500);
$('#container').prepend(loading).load(link + '&load=true', function() {
$('#container').prepend('<div id="wrapper_title">'+ page_title +'</div>');
clearInterval(load);
});
return false;
}
});
});
</script>
[/code]
skin/shop/스킨명/style.css 에 아래 클래스를 추가합니다.
[code]
.loading {position:absolute; left:0; top:0; width:100%; height:100%; text-align:center; font-size:15px; font-weight:bold; background:url('/shop/img/loading.gif') 50% 120px rgba(255,255,255,0.5) no-repeat; z-index:1; padding:50px 0 0;}
[/code]
/shop/list.php 를 아래와 같이 수정합니다.
[code]
if ($ca['ca_include_head'])
@include_once($ca['ca_include_head']);
else
include_once('./_head.php');
-------------------->>>>>---------------------
if ($ca['ca_include_head'])
@include_once($ca['ca_include_head']);
else
if(!$_GET['load']) include_once('./_head.php');
//////////////////////////////////////////////
if ($ca['ca_include_tail'])
@include_once($ca['ca_include_tail']);
else
include_once('./_tail.php');
-------------------->>>>>----------------------
if ($ca['ca_include_tail'])
@include_once($ca['ca_include_tail']);
else
if(!$_GET['load']) include_once('./_tail.php');
[/code]
좌측의 상품카테고리 영역과 상품리스트의 페이징 링크에 반응 하도록 되어있습니다.
skin/shop/스킨명/boxcategory.skin.php 에 아래 스크립트를 추가합니다.
[code]
<script>
$(function() {
$('#gnb a, a.pg_page').live('click', function(e) {
if(this.href.match(/list\.php/g)) {
e.preventDefault();
var page_title = $(this).text() + ' 상품리스트';
var link = this.href;
if(!this.href.match(/page/))
document.title = page_title + ' | <?php echo $config['cf_title'];?>';
else $('html,body').animate({scrollTop:0},'fast');
var loading = '<div class="loading"> 상품목록을 불러오는 중입니다 </div>';
var i = 0;
var load = setInterval(function() {
$('.loading').append('.').prepend('.');
i++;
if(i == 20) {
i = 0;
$('.loading').html('상품목록을 불러오는 중 오류가 발생하여 다시 시도 중입니다. 잠시만 기다려 주십시오.<br /><br /><a href="'+link+'">바로 이동하기</a>');
location.href = link;
clearInterval(load);
}
}, 500);
$('#container').prepend(loading).load(link + '&load=true', function() {
$('#container').prepend('<div id="wrapper_title">'+ page_title +'</div>');
clearInterval(load);
});
return false;
}
});
});
</script>
[/code]
skin/shop/스킨명/style.css 에 아래 클래스를 추가합니다.
[code]
.loading {position:absolute; left:0; top:0; width:100%; height:100%; text-align:center; font-size:15px; font-weight:bold; background:url('/shop/img/loading.gif') 50% 120px rgba(255,255,255,0.5) no-repeat; z-index:1; padding:50px 0 0;}
[/code]
/shop/list.php 를 아래와 같이 수정합니다.
[code]
if ($ca['ca_include_head'])
@include_once($ca['ca_include_head']);
else
include_once('./_head.php');
-------------------->>>>>---------------------
if ($ca['ca_include_head'])
@include_once($ca['ca_include_head']);
else
if(!$_GET['load']) include_once('./_head.php');
//////////////////////////////////////////////
if ($ca['ca_include_tail'])
@include_once($ca['ca_include_tail']);
else
include_once('./_tail.php');
-------------------->>>>>----------------------
if ($ca['ca_include_tail'])
@include_once($ca['ca_include_tail']);
else
if(!$_GET['load']) include_once('./_tail.php');
[/code]
게시판 목록
영카트5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 401 |
|
1년 전 | 2335 | |
| 400 |
|
1년 전 | 1386 | |
| 399 | 1년 전 | 2773 | ||
| 398 | 1년 전 | 869 | ||
| 397 |
|
1년 전 | 2746 | |
| 396 | 1년 전 | 1336 | ||
| 395 | 1년 전 | 735 | ||
| 394 | 1년 전 | 453 | ||
| 393 | 1년 전 | 1012 | ||
| 392 |
다케미카코
|
1년 전 | 2654 | |
| 391 |
|
1년 전 | 806 | |
| 390 |
사노라가노라
|
1년 전 | 1051 | |
| 389 | 1년 전 | 504 | ||
| 388 |
|
1년 전 | 85436 | |
| 387 | 1년 전 | 823 | ||
| 386 | 1년 전 | 2519 | ||
| 385 | 2년 전 | 829 | ||
| 384 | 2년 전 | 1848 | ||
| 383 |
|
2년 전 | 1875 | |
| 382 | 2년 전 | 1427 | ||
| 381 | 2년 전 | 2579 | ||
| 380 |
|
2년 전 | 2129 | |
| 379 |
e4uhack
|
2년 전 | 2073 | |
| 378 |
|
2년 전 | 1066 | |
| 377 |
|
2년 전 | 1381 | |
| 376 | 2년 전 | 1211 | ||
| 375 |
|
2년 전 | 2236 | |
| 374 |
페이투페이
|
2년 전 | 1727 | |
| 373 |
|
2년 전 | 1454 | |
| 372 | 2년 전 | 1235 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기