c

마우스 오버시 나오게 할려면 어떻게하나요?

· 2012-05-12 (토) 23:52:09 · 3529 · 3
그누보드 질문에도 올렸는데.. 이건 제이쿼리 문제인것것같아 여기로 다시올립니다.
 
http://best.milkyxy.milkyxy.gethompy.com/nbbs/index1.php

최근 게시물 설치했는데요..
마우스 클릭시 큰이미지 나오는게아니라 오버시 나오게끔했음좋겠는데.. 어떻게 수정해야하나요?




<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$img_width = 739; //큰 썸네일 가로
$img_height = 391; //큰 썸네일 세로
$img_quality = 100; //썸네일 퀄리티

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_big4';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);
?>

<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/style.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>

<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});


</script>

<h4><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><?=$latest_title?></a></h4>

<div id="featured" >
<ul class="ui-tabs-nav">
<?
for ($i=0; $i<count($list); $i++) {
$j = $i + 1;
if ($j == "1") {
$selected='ui-tabs-selected';
} else {
$selected='';}
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
}

if (file_exists($thumb))
$thumfile = "$thumb";
else
//이미지가 없으면
$thumfile="$latest_skin_path/img/noimg.gif";
//이미지가 아니네
if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
{ $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
?>
<li class="ui-tabs-nav-item <?=$selected?>" id="nav-fragment-<?=$j?>"><a href="#fragment-<?=$j?>"><img src="<?=$thumfile?>" alt="" width="80" height="50" ></a></li>
<? }?>
</ul>


<!-- First Content -->
<?
for ($i=0; $i<count($list); $i++) {
$thumfile2 = $thumb_path.'/'.$list[$i][wr_id];

$j = $i + 1;
if ($j == "1") {
$hide='';
} else {
$hide='ui-tabs-hide'; }
?>
<div id="fragment-<?=$j?>" class="ui-tabs-panel <?=$hide?>" style="">
<a href='<?=$list[$i][href]?>'><img src="<?=$thumfile2?>" alt="" /></a>
<div class="info" >
<h2><a href='<?=$list[$i][href]?>'><strong><?=$list[$i][subject]?></strong></a></h2>
<p><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><?=cut_str(strip_tags($list[$i][wr_content]),120,"...더보기")?></a></p>
</div>
</div>
<? }?>
</div>
</div>
|

댓글 3개

jQuery 스크립트가 나타난 부분이 확인이 안되서 자세한 설명은 어렵습니다만,
click 매서드 대신에 mouseover 매서드를 사용하시면 됩니다.
이를 테면,
$("#div").click(function() {
/* 클릭시 실행될 스크립트 */
});
->
$("#div").mouseover(function() {
/* 마우스오버시 실행될 스크립트 */
});
답변주셔서.. 감사..
어딜 고쳐야 되는지 몰라서 ㅋ
다른 플러그인 http://malsup.com/jquery/cycle/... 이쪽사이트에 비슷한게 있어서 그걸로 들에서 확인해서 교체했습니다.
2012-06-02 (토) 05:03:57
css만 제대로 숙지하셔도 같은 효과를 볼 것 같은데요
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
16-06-03 조회 2,842
15-07-30 조회 3,329
15-06-08 조회 5,483
15-05-27 조회 4,332
15-01-08 조회 6,613
14-12-30 조회 5,343
14-10-10 조회 5,311
14-08-13 조회 6,266
14-08-11 조회 5,094
14-08-06 조회 6,431
14-03-19 조회 7,348
13-04-26 조회 9,515
12-12-15 조회 5,055
12-12-15 조회 7,284
12-12-11 조회 5,397
12-11-21 조회 5,899
12-10-11 조회 5,008
12-10-03 조회 4,697
12-09-20 조회 6,026
12-09-02 조회 4,164
12-08-29 조회 5,128
12-08-29 조회 4,031
12-08-24 조회 4,145
12-08-18 조회 4,374
12-08-17 조회 4,421
12-08-16 조회 3,669
12-08-06 조회 5,441
12-08-05 조회 4,735
12-08-03 조회 4,465
12-08-03 조회 4,608
12-07-29 조회 3,444
12-07-24 조회 4,038
12-07-22 조회 3,531
12-07-20 조회 4,223
12-07-19 조회 4,623
12-07-19 조회 3,860
12-07-19 조회 3,808
12-07-19 조회 5,477
12-07-19 조회 3,416
12-07-18 조회 5,095
12-07-15 조회 4,025
12-07-14 조회 3,721
12-07-12 조회 4,435
12-07-11 조회 3,703
12-07-11 조회 3,419
12-07-11 조회 3,382
12-07-10 조회 4,560
12-07-09 조회 3,278
12-07-09 조회 4,143
12-07-09 조회 4,543
12-07-08 조회 4,469
12-07-07 조회 5,401
12-07-06 조회 4,675
12-07-06 조회 3,938
12-07-06 조회 3,814
12-07-06 조회 3,701
12-07-02 조회 5,416
12-07-02 조회 4,113
12-06-29 조회 3,621
12-06-28 조회 4,250
12-06-26 조회 3,744
12-06-26 조회 4,851
12-06-21 조회 3,821
12-06-20 조회 4,519
12-06-20 조회 4,147
12-06-15 조회 4,504
12-06-15 조회 4,266
12-06-13 조회 7,272
12-06-05 조회 7,250
12-06-04 조회 3,846
12-06-03 조회 3,694
12-05-31 조회 3,703
12-05-28 조회 6,525
12-05-27 조회 3,770
12-05-25 조회 3,918
12-05-23 조회 4,297
12-05-21 조회 5,025
12-05-17 조회 3,976
12-05-17 조회 3,897
12-05-09 조회 3,944
12-05-07 조회 4,199
12-05-02 조회 4,426
12-05-01 조회 4,585
12-04-30 조회 3,327
12-04-30 조회 4,289
12-04-25 조회 4,360
12-04-25 조회 4,783
12-04-24 조회 3,758
12-04-24 조회 4,525
12-04-23 조회 3,535
12-04-20 조회 3,166
12-04-17 조회 5,363
12-04-16 조회 4,291
12-04-14 조회 3,584
12-04-14 조회 3,621
12-04-14 조회 3,663
12-04-13 조회 3,290
12-04-13 조회 4,478
12-04-13 조회 6,089
12-04-12 조회 3,250