0

I have a select menu with multiple options. Using jQuery I was trying to pre-populate the dropdown. I've tried using this code:

jQuery("select#attribute150").val("Double").click();

I can visually see that the option has been selected, however the actual price has not been changed. I've also tried:

jQuery("select#attribute150").val("Double").change();

URL to the dropdown is here. The dropdown I want to change is "Size".

John
  • 627
  • 6
  • 19
  • 2
    Possible duplicate of [How do you select a particular option in a SELECT element in jQuery?](http://stackoverflow.com/questions/314636/how-do-you-select-a-particular-option-in-a-select-element-in-jquery) – laurent Nov 24 '16 at 16:18
  • You need some event handler for the change event for the select menu. Please show us this code. – Seb Nov 24 '16 at 16:21
  • It doesn't update the UI because you're not triggering the event that the code is listening for. What events have you bound to that select? – Rory McCrossan Nov 24 '16 at 16:21
  • @this.lau_ I've tired that but it did not work, please test in console – John Nov 24 '16 at 16:21
  • on the given website , when i change the site the price is changing as expected. what is the issue ? – Deep Nov 24 '16 at 16:24
  • @Deep I am trying to do that through jQuery rather than physically clicking on it – John Nov 24 '16 at 16:24

0 Answers0