Explorar el Código

Fixed selected attributes

Previnash Wong hace 8 años
padre
commit
1389a84f8d

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 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>';

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
package/js/awselect.min.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio