채택완료

스크립트 질문좀 드리겠습니다.

모바일에서 이미지맵을 사용할려고 하는 스크립트인데요

a 태그를 클릭시 undefined ​라는 창이 하나뜨고 a링크로 넘어가는데 

undefined  <이창이 안뜨고 넘어가게 하는방법좀 알려주시면 감사하겠습니다  

 

Copy
<script>$(document).ready(function(e) {	$('img[usemap]').rwdImageMaps();		$('area').on('click', function() {		alert($(this).attr('alt') );	});});</script>   <img src="/img/m_via3.png" width="640" height="516" usemap="#powerpuffgirls1" alt="" />	<map name="powerpuffgirls1">		<area shape="rect" coords="349,191,391,231" href="/bbs/content.php?co_id=FranChiseAcademy"  />		<area shape="rect" coords="38,449,90,490" href="#cn" /> 		 </map>

 

|

답변 1개

채택된 답변
+20 포인트

$('area').on('click', function() {

   alert($(this).attr('alt')); 

}); 

이걸 삭제하세요.

그럼 경고창 안 떠요. 

답변을 작성하려면 로그인이 필요합니다.