Last active
June 2, 2020 15:46
-
-
Save cgi-caesar/2f2d4ddee9e0ddd816a87bacfddd13ea to your computer and use it in GitHub Desktop.
aMember (site.js): switch input-text for quantity select with input-select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@file application/configs/site.js | |
setTimeout(function(){ | |
jQuery(function($){ | |
$('.am-product-qty', '.am-signup-form').each(function(){ | |
var s = $('<select class="am-product-qty">\ | |
<option value="1">1</option>\ | |
<option value="2">2</option>\ | |
<option value="3">3</option>\ | |
<option value="4">4</option>\ | |
<option value="5">5</option>\ | |
</select>'); | |
s.attr('name', $(this).attr('name')); | |
s.val($(this).val()); | |
$(this).after(s); | |
s.toggle($(this).is(':visible')); | |
$(this).remove(); | |
}); | |
}); | |
}, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment