Answer the question
In order to leave comments, you need to log in
How to handle code added by append?
There is such a code, I want to take the value of the option added using append-yes.
What's wrong here? gives an error (Uncaught SyntaxError: Invalid or unexpected token);
jQuery('.single-product-wrapper .summary').append('<select class="input-text credit_select" style="display:inline-block;width:10em;margin-right:4px;vertical-align:text-bottom;-webkit-appearance:menulist-button;"><option value="3">3 мес.</option><option value="6">6 мес.</option></select><a href="/?page_id=2505" class="button color_bg" style="padding:.5rem 2.134em;margin-top:1em;"><span>Купить в кредит</span><br><strong>' + number_price + ' TJS мес.</strong></a>');
jQuery('select').on('change', '.credit_select', function(){
var wewww = jQuery('.credit_select option[value="3"]').text();
console.log(wewww);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question