버튼색상을 바뀌기질문드림니다.

버튼색상을 바뀌기질문드림니다.

QA

버튼색상을 바뀌기질문드림니다.

본문

저번에 질문드렷는데요 잘해결이 안되여 또질문드림니다.
스킨제작님의 video 스킨
https://sir.kr/g5_skin/15119?sfl=wr_subject%7C%7Cwr_content&stx=%EB%93%9C%EB%9D%BC%EB%A7%88

현재 아미나빌더 설치 스킨제작님의 video.zip 적용중이구요

디자인은어느정도 수정한상태이구요 


회차 클릭시 재생은 정상적으로 되나 회차버튼이 칼라가안바뀌는 문제가있습니다.


(초보라 구현하기 힘드네요 도와주세요  ) 

아래 이미지처럼 1회차 클릭 후 영상 로딩정상되고 1회차 버튼색상을 빨강색으로 바구려구합니다.
어디를 어떻케 손바야 하는지 많은조언부탁드림니다.

현재적용중인 테스트 서버:http://test.heetfile.xyz/bbs/board.php?bo_table=animation&wr_id=708
1888659226_1571624202.4988.jpg

이 질문에 댓글 쓰기 :

답변 4

php 코드를 볼수 없어서 자세히는 모르겠지만..

 

<a href="/bbs/board.php?bo_table=animation&wr_id=708&list=127764&plyer=2">
  <button style="margin-bottom:12px; margin-right:10px; border: solid 0px; ">
     <div align="center" class="button" style="width:78px;">

        <img style="width:22px;margin-right:3px;position:relative;top:-1px;"   src="/skin/board/video/img/play.png">1화

     </div>
   </button>
</a>

이걸 for문으로 출력하는 부분이 있을것입니다.

 

<a href="/bbs/board.php?bo_table=animation&wr_id=708&list=127764&plyer=2">
  <button style="margin-bottom:12px; margin-right:10px; border: solid 0px; ">
     <div align="center" class="button" style="width:78px;" id="button-<?php echo $list[wr_id]?>">

        <img style="width:22px;margin-right:3px;position:relative;top:-1px;"                 src="/skin/board/video/img/play.png">1화

     </div>
   </button>
</a>

 

이렇게 for문을 고치신다음

 

 

<script>

  $(document).ready(function(){

    $("#button-<?php echo $view[wr_id]?>").attr('style', 'background-color : #ff7277 ');

  });

</script>

이렇게 추가하시면 현재페이지($view)의 wr_id값을

목록($list)중 wr_id값에 배경색을 추가하게 됩니다.

 

이대로 따라하지 마시고 흐름을 참고하셨으면 좋겠습니다 :)

 

조나단입니다  님 답변감사합니다 . 
이해가 잘안대 거러는데요
아래 소스인데요 한번만 더 봐주세요 
wiew.skin.php 파일내용 입니다,

 
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
if ($admin_href) { 
if($config[cf_10]=="g5_video_list"){}else{
// Name of the file
$filename = "$board_skin_url/g5_video_list.sql";

// Connect to MySQL server
//mysql_connect($mysql_host, $mysql_username, $mysql_password) or die('Error connecting to MySQL server: ' . mysql_error());
// Select database
//mysql_select_db($mysql_database) or die('Error selecting MySQL database: ' . mysql_error());
// Temporary variable, used to store current query
$templine = '';
// Read in entire file
$lines = file($filename);
// Loop through each line
foreach ($lines as $line)
{
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '')
    continue;
// Add this line to the current segment
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
if (substr(trim($line), -1, 1) == ';')
{
    // Perform the query
    sql_query($templine) or print('Error performing query \'<strong>' . $templine . '\': ' . sql_error() . '<br /><br />');
    // Reset temp variable to empty
    $templine = '';
}
}
   $sql = " update g5_config
                          set cf_10_subj                 = '영상기능',
                           cf_10                 = 'g5_video_list'";
                    $sql_query=sql_query($sql);    
    
    
    echo "<script>document.location.href='/bbs/board.php?bo_table=$_GET[bo_table]&wr_id=$_GET[wr_id]'</script>";
}
///////////등록/////////
$bo_table                =$_POST[bo_table];
$wr_id                    =$_POST[wr_id];
$wr_subject            =$_POST[wr_subject];
$id                            =$_POST[id];
$wr_link1                =$_POST[wr_link1];
$wr_link2                =$_POST[wr_link2];
$wr_link3                =$_POST[wr_link3];
$wr_datetime        =date('Y-m-j h:i:s');
    if($_POST[type]=="new"){
                    $sql = " insert into g5_video_list
                                set bo_table                = '$bo_table',
                                     wr_id                        = '$wr_id',
                                     wr_subject                = '$wr_subject',
                                     wr_link1                    = '$wr_link1',
                                     wr_link2                    = '$wr_link2',
                                     wr_datetime                = '$wr_datetime'";
                    $sql_query=sql_query($sql);
                    echo "<script>alert('등록되였습니다..');window.location='/bbs/board.php?bo_table=$bo_table&wr_id=$wr_id'</script>";

///////////위치등록끝/////////
}else if($_POST[type]=="update"){
///////////위치수정/////////
                    $sql = " update g5_video_list
                                    set bo_table            = '$bo_table',
                                     wr_id                        = '$wr_id',
                                     wr_subject                = '$wr_subject',
                                     wr_link1                    = '$wr_link1',
                                     wr_link2                    = '$wr_link2'
                                     where id = '$id' ";
                        $sql_query=sql_query($sql);    
                        echo "<script>alert('수정되였습니다.');window.location='/bbs/board.php?bo_table=$bo_table&wr_id=$wr_id'</script>";

}
}
?>
<style>
    @font-face { /* 나눔고딕 Regular */
        font-family: 'Nanum Gothic';
        font-style: normal;
        font-weight: 400;
        src: url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Regular.eot);
        src: url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Regular.eot?#iefix) format('embedded-opentype'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Regular.woff2) format('woff2'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Regular.woff) format('woff'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Regular.ttf) format('truetype');
    }
    @font-face { /* 나눔고딕 Bold */
        font-family: 'Nanum Gothic';
        font-style: normal;
        font-weight: 700;
        src: url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Bold.eot);
        src: url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Bold.eot?#iefix) format('embedded-opentype'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Bold.woff2) format('woff2'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Bold.woff) format('woff'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-Bold.ttf) format('truetype');
    }
    @font-face { /* 나눔고딕 ExtraBold */
        font-family: 'Nanum Gothic';
        font-style: normal;
        font-weight: 800;
        src: url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-ExtraBold.eot);
        src: url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-ExtraBold.eot?#iefix) format('embedded-opentype'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-ExtraBold.woff2) format('woff2'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-ExtraBold.woff) format('woff'),
                 url(//fonts.gstatic.com/ea/nanumgothic/v5/NanumGothic-ExtraBold.ttf) format('truetype');
    }
html, body {
  font-family: 'Nanum Gothic', sans-serif;
}
    select {margin:0; font-family: 'Nanum Gothic', sans-serif; border: 1px solid #ccc; width: 140px; height: 38px; padding: 5px; 10px; }
    .title{border-bottom:solid 2px #202020; font-size: 13px; font-family: 'Nanum Gothic', sans-serif; font-weight: 800; color: #000; padding-bottom:9px; padding-top: 33px;}
    .list_content{border-bottom:solid 1px #e6e6e6; font-family: 'Nanum Gothic', sans-serif; height:58px;}
    
    .td_1{ font-family: 'Nanum Gothic', sans-serif; width: 104px; height:50px;  border-top: solid 1px #e9e9e9; border-right: solid 1px #e9e9e9; background-color: #fafafa; color: #000000; padding-left: 12px; font-size: 13px; font-weight: 800;}
    .td_2{ font-family: 'Nanum Gothic', sans-serif; width: 261px; height:50px; border-top: solid 1px #e9e9e9; padding-left: 10px;}
    .td_3{ font-family: 'Nanum Gothic', sans-serif; width: 104px; height:50px;  border-top: solid 1px #e9e9e9; border-right: solid 1px #e9e9e9; background-color: #fafafa; color: #000000; padding-left: 12px; font-size: 13px; font-weight: 800; border-bottom: solid 1px #e9e9e9;}
    .td_4{ font-family: 'Nanum Gothic', sans-serif; width: 261px; height:50px; border-top: solid 1px #e9e9e9; border-bottom: solid 1px #e9e9e9; padding-left: 10px;}
    .input1{border: solid 0px; background-color:#e9e9e9; width: 540px; height: 38px;}
    .input2{border: solid 0px; background-color:#e9e9e9; height: 38px;}
    
    .widget-box{
    margin-bottom: 25px;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 5px 15px #ccc;
    }
    
    .hd-active
    {backround-color:#e8b513; }
</style>
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<!-- 게시물 읽기 시작 { -->
<div id="bo_v_table"><?php echo $board['bo_subject']; ?></div>
<article id="bo_v" style="width:<?php echo $width; ?>">
    <header>
        <h1 id="bo_v_title">
            <?php
            if ($category_name) echo $view['ca_name'].' | '; // 분류 출력 끝
            echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
            ?>
        </h1>
    </header>
    <section id="bo_v_info">
        <h2>페이지 정보</h2>
        작성자 <strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo " ($ip)"; } ?></strong>
        <span class="sound_only">작성일</span><strong><?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
        조회<strong><?php echo number_format($view['wr_hit']) ?>회</strong>
        댓글<strong><?php echo number_format($view['wr_comment']) ?>건</strong>
    </section>

   
    <!-- 게시물 상단 버튼 시작 { -->
    <div id="bo_v_top">
        <?php
        ob_start();
         ?>
        <?php if ($prev_href || $next_href) { ?>
        <ul class="bo_v_nb">
            <?php if ($prev_href) { ?><li><a href="<?php echo $prev_href ?>" class="btn_b01">이전글</a></li><?php } ?>
            <?php if ($next_href) { ?><li><a href="<?php echo $next_href ?>" class="btn_b01">다음글</a></li><?php } ?>
        </ul>
        <?php } ?>
        <ul class="bo_v_com">
            <?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>" class="btn_b01">수정</a></li><?php } ?>
            <?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" class="btn_b01" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
            <?php if ($copy_href) { ?><li><a href="<?php echo $copy_href ?>" class="btn_admin" onclick="board_move(this.href); return false;">복사</a></li><?php } ?>
            <?php if ($move_href) { ?><li><a href="<?php echo $move_href ?>" class="btn_admin" onclick="board_move(this.href); return false;">이동</a></li><?php } ?>
            <?php if ($search_href) { ?><li><a href="<?php echo $search_href ?>" class="btn_b01">검색</a></li><?php } ?>
<!--            <li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li>  -->
            <?php if ($reply_href) { ?><li><a href="<?php echo $reply_href ?>" class="btn_b01">답변</a></li><?php } ?>
            <?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
        </ul>
        
      
      <div align="center">
        <?php
        $link_buttons = ob_get_contents();
        ob_end_flush();
         ?>
          
        <!-- } 게시물 상단 버튼 끝 -->
        <? if ($admin_href) { ?>
        <? if($_GET[w]==""){?>
        <a href="/bbs/board.php?bo_table=<?=$_GET[bo_table]?>&wr_id=<?=$_GET[wr_id]?>&w=w">
          <button style="padding: 7px; background-color: #e8180c; color: #fff; border: solid 0px; line-height: 12px; display: inline-block; border: 1px solid #aaaaaa5c;">회차등록하기</button>
        </a>
        <? } ?>
        </div>
      <div style="height: 20px;"></div>
        
      
      <div align="left">
        <? if($_GET[w]=="w" || $_GET[w]=="u"){?>
        </div>
      <form method="post" action="" onSubmit="return InputCheck(this)" enctype="multipart/form-data">
          
            
        <div align="left">
          <? if($_GET[w]=="w"){?>
          <input type="hidden" name="type" value="new">
          <input type="hidden" name="bo_table" value="<?=$_GET[bo_table]?>">
          <input type="hidden" name="wr_id" value="<?=$_GET[wr_id]?>">
          <? }else if($_GET[w]=="u"){ ?>
          <? 
    $user_query = sql_query("select * from g5_video_list where id = '$_GET[id]' limit 1");
    $video = sql_fetch_array($user_query);    
?>
          <input type="hidden" name="type" value="update">
          <input type="hidden" name="id" value="<?=$_GET[id]?>">
          <input type="hidden" name="bo_table" value="<?=$_GET[bo_table]?>">
          <input type="hidden" name="wr_id" value="<?=$_GET[wr_id]?>">
          <? } ?>
        </div>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tbody>
    <tr>
      <td class="td_1">회차입력</td>
      <td class="td_2"><input type="text" name="wr_subject" style="padding-left:10px; padding-right: 10px;" value="<?=$video[wr_subject]?>" class="input1" placeholder="例:2017/07/11 (제1회)"></td>
    </tr>
    <tr>
      <td class="td_1">비디오링크1</td>
      <td class="td_2"><input type="text" name="wr_link1" style="padding-left:10px; padding-right: 10px;" value="<?=$video[wr_link1]?>" class="input1" placeholder="例:http://www.dailymotion.com/embed/video/12332"></td>
    </tr>
    <tr>
      <td class="td_1">비디오링크2</td>
      <td class="td_2"><input type="text" name="wr_link2" style="padding-left:10px; padding-right: 10px;" value="<?=$video[wr_link2]?>" class="input1" placeholder="例:https://www.youtube.com/embed/PMrFkTwf7jo"></td>
    </tr>
  </tbody>
</table>
<div style="margin: auto; width: 100px; padding-top: 10px; padding-bottom: 15px;">
    <? if($_GET[w]=="w"){?>
    <input type="submit" value="등록확인" id="btn_submit" accesskey="s" style="padding: 5px; background-color: #e8180c; color: #fff; border: solid 0px;">
    <? }else{ ?>
    <input type="submit" value="수정" id="btn_submit" accesskey="s" style="padding: 5px; background-color: #e8180c; color: #fff; border: solid 0px;">
    <? } ?>
</div>
</form>
</div>
<? } ?>
<? } ?>
<!-- <div class="widget-box">  -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 980px; margin: auto;">
  <tbody>
    <tr>
      <td class="widget-box" height="490" valign="top" style="background-color: #c22b27;">
<?
    $view_query = sql_query("select * from g5_video_list where id = '$_GET[list]' limit 1");
    $vplyer = sql_fetch_array($view_query);    
                
if($_GET[plyer]=="1"){ $vcontent=$vplyer[wr_link1];
}else if($_GET[plyer]=="2"){ $vcontent=$vplyer[wr_link2];
}else if($_GET[plyer]=="3"){ $vcontent=$vplyer[wr_link3];}
?>
      
      <iframe width="100%" height="105%" src="<?=$vcontent?>" frameborder="0" scrolling="no" allowfullscreen style="background-image:url(https://yadongfree.com/img/logo.png)"></iframe>
      </td>
      <tr>
                                              <script>
$(".hd").on("click",function(){
 $(".hd").removeClass("hd-active");
 $(this).addClass("hd-active");
});
</script>    
      <td clss="widget-box" width="250" height="490" valign="top" style="background-color: #8cc346;">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                            <tr>
                                <td width="73" height="40" align="center" style="color: #ffffff;">재생목록</td>
                                <td style="background-color: #ea0d53;">11223344556677</td>
                            </tr>
                            <tr>
                                <td colspan="2" style="padding: 7px;">
                                <div style="height:450px; overflow:auto;">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tbody>
                                            <?
                                                $video_list = sql_query("select * from g5_video_list where bo_table ='$_GET[bo_table]' and wr_id ='$_GET[wr_id]' ORDER BY wr_datetime DESC ");
                                                for ($i; $list=sql_fetch_array($video_list); $i++) { 
                                            ?>
                                                <tr>
                                                    <td height="25" style=" color: #999999;"><?=$list[wr_subject]?></td>
<td><? if($list[wr_link2]){?><a href="/bbs/board.php?bo_table=<?=$_GET[bo_table]?>&wr_id=<?=$_GET[wr_id]?>&list=<?=$list[id]?>&plyer=2">
<button class="hd">HD2</button></a><? } ?></td>

                                                    
                                                    <td><? if($list[wr_link1]){?><a href="/bbs/board.php?bo_table=<?=$_GET[bo_table]?>&wr_id=<?=$_GET[wr_id]?>&list=<?=$list[id]?>&plyer=1"><button style="padding:2px; border: solid 0px; background-color: #757575; color: #000000;">HD1</button></a><? } ?></td>
                                                    
                                                    <? if ($admin_href) { ?>
                                                    <td><a href="/bbs/board.php?bo_table=<?=$_GET[bo_table]?>&wr_id=<?=$_GET[wr_id]?>&w=u&id=<?=$list[id]?>"><button style="padding:2px; border: solid 0px; background-color: #757575; color: #ffffff;">수정</button></a></td>
                                                    <? } ?>
                                                    
                                                </tr>
                                        <? } ?>    
                                
                                            </tbody>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
            </td>
    </tr>
  </tbody>
</table>
   
   
   
   
   
   
    <section id="bo_v_atc">
        <h2 id="bo_v_atc_title">본문</h2>
<br>
<br>
<br>
        <?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
        <!-- 스크랩 추천 비추천 시작 { -->
        <?php if ($scrap_href || $good_href || $nogood_href) { ?>
        <div id="bo_v_act">
            <?php if ($scrap_href) { ?><a href="<?php echo $scrap_href;  ?>" target="_blank" class="btn_b01" onclick="win_scrap(this.href); return false;">스크랩</a><?php } ?>
            <?php if ($good_href) { ?>
            <span class="bo_v_act_gng">
                <a href="<?php echo $good_href.'&'.$qstr ?>" id="good_button" class="btn_b01">추천 <strong><?php echo number_format($view['wr_good']) ?></strong></a>
                <b id="bo_v_act_good"></b>
            </span>
            <?php } ?>
            <?php if ($nogood_href) { ?>
            <span class="bo_v_act_gng">
                <a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="btn_b01">비추천  <strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
                <b id="bo_v_act_nogood"></b>
            </span>
            <?php } ?>
        </div>
        <?php } else {
            if($board['bo_use_good'] || $board['bo_use_nogood']) {
        ?>
        <div id="bo_v_act">
            <?php if($board['bo_use_good']) { ?><span>추천 <strong><?php echo number_format($view['wr_good']) ?></strong></span><?php } ?>
            <?php if($board['bo_use_nogood']) { ?><span>비추천 <strong><?php echo number_format($view['wr_nogood']) ?></strong></span><?php } ?>
        </div>
        <?php
            }
        }
        ?>
        <!-- } 스크랩 추천 비추천 끝 -->
    </section>
    <?php
    include_once(G5_SNS_PATH."/view.sns.skin.php");
    ?>
    <?php
    // 코멘트 입출력
    include_once(G5_BBS_PATH.'/view_comment.php');
     ?>
    <!-- 링크 버튼 시작 { -->
    <div id="bo_v_bot">
        <?php echo $link_buttons ?>
    </div>
    <!-- } 링크 버튼 끝 -->
</article>
<!-- } 게시판 읽기 끝 -->
<script>
<?php if ($board['bo_download_point'] < 0) { ?>
$(function() {
    $("a.view_file_download").click(function() {
        if(!g5_is_member) {
            alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
            return false;
        }
        var msg = "파일을 다운로드 하시면 포인트가 차감(<?php echo number_format($board['bo_download_point']) ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?";
        if(confirm(msg)) {
            var href = $(this).attr("href")+"&js=on";
            $(this).attr("href", href);
            return true;
        } else {
            return false;
        }
    });
});
<?php } ?>
function board_move(href)
{
    window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
}
</script>
<script>
$(function() {
    $("a.view_image").click(function() {
        window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
        return false;
    });
    // 추천, 비추천
    $("#good_button, #nogood_button").click(function() {
        var $tx;
        if(this.id == "good_button")
            $tx = $("#bo_v_act_good");
        else
            $tx = $("#bo_v_act_nogood");
        excute_good(this.href, $(this), $tx);
        return false;
    });
    // 이미지 리사이즈
    $("#bo_v_atc").viewimageresize();
});
function excute_good(href, $el, $tx)
{
    $.post(
        href,
        { js: "on" },
        function(data) {
            if(data.error) {
                alert(data.error);
                return false;
            }
            if(data.count) {
                $el.find("strong").text(number_format(String(data.count)));
                if($tx.attr("id").search("nogood") > -1) {
                    $tx.text("이 글을 비추천하셨습니다.");
                    $tx.fadeIn(200).delay(2500).fadeOut(200);
                } else {
                    $tx.text("이 글을 추천하셨습니다.");
                    $tx.fadeIn(200).delay(2500).fadeOut(200);
                }
            }
        }, "json"
    );
}
</script>
<!-- } 게시글 읽기 끝 -->
 

조나단 님 위에서처럼적용해보니 전체버튼이 독같이 적용됩니다 .
어느부분이 문제일까요?

고수분들 조언부탁드림니다.

 


<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background:#ffffff">
                                            <tbody>
                                                <tr>
                                                    <td>
                                                        <ul style="padding:0px;">
                                                            <li style="list-style:none;">
                                            <?
                                                $video_list = sql_query("select * from g5_video_list where bo_table ='$_GET[bo_table]' and wr_id ='$_GET[wr_id]' ORDER BY wr_datetime ASC ");
                                                for ($i; $list=sql_fetch_array($video_list); $i++) { 
                                            ?><? if($list[wr_link2]){?>
                                                                <a href="/bbs/board.php?bo_table=<?=$_GET[bo_table]?>&wr_id=<?=$_GET[wr_id]?>&list=<?=$list[id]?>&plyer=2">
                                                                <button style="margin-bottom:12px; margin-right:10px; border: solid 0px; ">
                                                                <div align="center" class="button" style="width:78px;"  id="button-<?php echo $list[id]?>">
<img style="width:22px;margin-right:3px;position:relative;top:-1px;" src="/skin/board/video/img/play.png" /><?=$list[wr_subject]?></span></div>
                                                                </button>
                                                                </a>
<script>$(document).ready(function(){$("#button-<?php echo $list[id]?>").attr('style', 'background-color : #ff7277  ');   });
</script>

DB 구조 입니다.
   wr_id =708  제목       wr_subject = 1화  (회차)  wr_link2(링크주소)

  이런구조 때문에 $list[id] 선택한겁니다.

id         bo_table    wr_id wr_subject  wr_link2                                                      wr-link1

127764  animation  708      1화            https://xxx.com/ani_video4/33400.html       

127765  animation  708      2화            https://xxx.com/ani_video4/33400.html      

127766  animation  708      3화            https://xxx.com/ani_video4/33400.html   

 

127650  animation  707      1화            https://xxx.com/ani_video4/33400.html     

127651  animation  707      1화            https://xxx.com/ani_video4/33400.html    

현재 이런 상황이에요  아래 이미지첨부 확인부탁드림니다.

1888659226_1571640164.8913.jpg

 

많은조언부탁드림니다.

네 홈페이지 살펴보니 id는 잘 들어갔고
스크립트 문제입니다.

이렇게 바꿔보세요
<script>
$(document).ready(function(){$("#button-<?php echo $view[wr_id]?>").attr('style', 'background-color : #ff7277  ');  });
</script>

답변을 작성하시기 전에 로그인 해주세요.
전체 123,532 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT