Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Thanks but for some reason this hasn't worked. Still doesn't get selected and no errors Commented Jun 3, 2015 at 18:16
  • Thanks this has worked after all, as I mentioned in another answer, I was calling the functions in the wrong order to populate and select Commented Jun 3, 2015 at 18:25
  • @Boardy, I would still recommend you to use either .val() or .prop() Go through stackoverflow.com/questions/5874652/prop-vs-attr Now Its up to you to decide whether to use best practice or not Commented Jun 3, 2015 at 18:28
  • I found when I used the val it would only set 1 item and I need to be select multiple items Commented Jun 3, 2015 at 18:33