프로그래밍/Jquery

Jquery - data-icon="arrow-u" 속성이 안 될때

가카리 2015. 1. 29. 22:50
반응형

질문

"http://jquerymobile.com/demos/1.2.1/docs/buttons/buttons-icons.html"처럼 data-icon을 시도해보려고 했는데 안되요.

제 코드는 다음과 같구요. 


<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
   <link href="Content/jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css" />
   <a data-role="button" href="#page1" data-icon="arrow-u" data-iconpos="left">
        Button
    </a>
</body>
</html>

헬프좀요 ㅠㅠ


답변

맨앞에 아래와 같이 다셔야됩니다.

<head>
 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
 <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
</head>

그리고 jQuery Mobile 코드는 다음과 같이 해야되요


<div data-role='page'>
 <a href='#' data-role='button' data-icon='arrow-u' data-iconpos='left'>Button</a>
</div>

출처 : http://stackoverflow.com/questions/16940980/data-icons-not-displaying

반응형