소스 검색

Fixed selected attributes

Previnash Wong 8 년 전
부모
커밋
1389a84f8d
4개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 0
      docs/demo/awselect/js/awselect.min.js
  2. 1 1
      docs/index.html
  3. 1 1
      package/js/awselect.js
  4. 0 0
      package/js/awselect.min.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
docs/demo/awselect/js/awselect.min.js


+ 1 - 1
docs/index.html

@@ -65,7 +65,7 @@
                     <div style="padding:0" class="columns medium-5">
                         <select style="margin-top:2px;">
 						<option value = "ew">From ugly</option>
-						<option value = "what">What</option>
+						<option selected value = "what">What</option>
 						<option value = "even">Even</option>
 					</select>
                     </div>

+ 1 - 1
package/js/awselect.js

@@ -64,7 +64,7 @@ awselect_count = 0; // used for generating sequential ID for <select> that does
         var vertical_padding = opts["vertical_padding"];
         var horizontal_padding = opts["horizontal_padding"];
         options.each(function() {
-            if ($(this).attr("selected") == "selected") {
+            if (typeof $(this).attr("selected") !== typeof undefined && $(this).attr("selected") !== false) {
                 selected = $(this).text();
             }
             options_html += '<li><a style="padding: 0 '+ horizontal_padding +'">' + $(this).text() + '</a></li>';

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
package/js/awselect.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.