그누보드 관련은 아니지만 여쭤봅니당.. 채택완료
아래와 같은 소스가 들어가 있는데 크롬에서는 data-link가 잘 먹히는데 IE에서는 전혀 먹히질 않네요..
그렇다고 공백이미지로 div 안에
이걸 넣어도 안먹히고..
div에 onClick 스크립트도 써보고 이것저것 다 써봤는데도 아무것도 안먹히네요..
IE에서는 원래 data-link가 먹히지 않나요?;
</p><p> </p><p><span class="Apple-tab-span" style="white-space: pre;"> </span><div class="fluid_container"></p><p> <div class="camera_wrap camera_emboss" id="camera_wrap_3"></p><p><span class="Apple-tab-span" style="white-space: pre;"> </span><!--- visual ---></p><p> <div data-src="<a href="<a href="http://1st-page.co.kr/img/main_visual.jpg" target="_blank" rel="noopener noreferrer">http://1st-page.co.kr/img/main_visual.jpg</a>">img/main_visual.jpg</a>" data-link="<a href="<a href="http://1st-page.co.kr/bbs/board.php?bo_table=event&wr_id=3" target="_blank" rel="noopener noreferrer">http://1st-page.co.kr/bbs/board.php?bo_table=event&wr_id=3</a>">bbs/board.php?bo_table=event&wr_id=</a><u>3</u>" data-target="_self"></div></p><p> <div data-src="<a href="<a href="http://1st-page.co.kr/img/main_visual1.jpg" target="_blank" rel="noopener noreferrer">http://1st-page.co.kr/img/main_visual1.jpg</a>">img/main_visual1.jpg</a>" data-link="<a href="<a href="http://1st-page.co.kr/shop/list.php?ca_id=501010" target="_blank" rel="noopener noreferrer">http://1st-page.co.kr/shop/list.php?ca_id=501010</a>">shop/list.php?ca_id=501010</a>" data-target="_self"></div></p><p> <div data-src="<a href="<a href="http://1st-page.co.kr/img/main_visual2.jpg" target="_blank" rel="noopener noreferrer">http://1st-page.co.kr/img/main_visual2.jpg</a>">img/main_visual2.jpg</a>" data-link="<a href="<a href="http://1st-page.co.kr/shop/list.php?ca_id=5010140" target="_blank" rel="noopener noreferrer">http://1st-page.co.kr/shop/list.php?ca_id=5010140</a>">shop/list.php?ca_id=5010140</a>" data-target="_self"></div></p><p><span class="Apple-tab-span" style="white-space: pre;"> </span><!---// visual ---></p><p> </div></p><p> </div> </p><p> </p><span style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; line-height: 1.5;">
답변 3개
data-link="shop/list.php?ca_id=5010140"
대신에해서
onclick="javascript:window.location.href='shop/list.php?ca_id=5010140';"
로 변경해서 수정하세요.
댓글을 작성하려면 로그인이 필요합니다.
data-src
data-link
등 data 코드는 html5 코드입니다.
html5가 지원되지 않는 저버전 ie 호환을 위해서는 데이타 코드 대신에
로 처리해 주셔야 합니다
슬라이딩 관련 소스는 어떤 소스를 이용하셨는지 확인이 안되네요^^
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 3개
방법은 있다는거~어~
크롬 사파리 파폭 오페라등등 모두 html5지원하니깐 ie노무시키만 구별하면되요!
[code]
<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.1.1.min.js"></script>
<script type="text/javascript">
if($.browser.msie){
$(".camera_wrap div").click(function(){
location.href = $(this).attr("data-link"); // 둘중하나 골라서 쓰세요.
window.open($(this).attr("data-link"), "_blank", ""); // 타겟 셀프니깐 로케이션이 낳겠네요...
});
}
</script>
[/code]
jquery에서 브라우저 식별하는건데요. 1.10버전되면서 사라졌지만 아직 제공하는거 사용하시면 되죠머 ^^
사실... 자바스크립트로하면 정규식써야되고... 포문돌리고 배열에 넣어야되고.... 귀차나서...
설명 : if 브라우저가 msie(익스플로러)일때 camera_wrap아래에 있는 div를 click시 해당 div의 attr중 data-link의 value를 가져와서 location.href & window.open으로 페이지를 보내버린다~ 이런거죠!
아... 영어 잘하는거가타 ☆.☆
끝...
너무너무 감사하지만 적용해보니 안되네요..ㅠㅠ
어디에서 막히는지 알수 있을까요?
camera_wrap아래의 div를 클릭했는데 펑션이 작동을 안한다던가?
아니면 $.browser가 작동을안한다던가?
이런것들요
if문 바로 아래나 click펑션 바로 아래에 알럿창 띄어보세요.
if바로 아래는 페이지 리플래시 할때마다 ie면 알럿이 떠야하고요.
click펑션 바로 아래의 알럿은 camera_wrap div를 클릭할때마다 알럿이 떠야해요.
혹시 location.href 하고 window.open두개를 다넣으신건.... 아니겠죠???
끝...
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
사용한 소스는 이거예요~
http://www.htmldrive.net/items/demo/1166/Awesome-jQuery-Camera-slideshow-plugin
사이트에 맞는 소스를 겨우 찾았는데...
링크가 안걸리니 막막하네요..흑