Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- jQuery(document).ready(function(){
- setTimeout(function() {
- jQuery('select.single-option-selector').on('change', function() {
- var selectLabel = jQuery(this).prev().text().trim();
- if(selectLabel === "Color"){
- var selectedopt = parseInt( jQuery(this).prop("selectedIndex") );
- jQuery("#cst-container #side-switcher .product-switch:nth-child(" + (selectedopt + 1) + ") img").trigger("click");
- }
- });
- }, 1000);
- });
- /*$("#productSelect-option-0").change(function () {
- var val = parseInt($("#productSelect-option-0").val());
- console.log(val);
- });*/
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement