Guest User

Untitled

a guest
Jun 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. $("#select_test").change(function(){
  4. var optionVal = [];
  5. $.each($("#select_test option:selected"), function(){
  6. optionVal.push($(this).text());
  7. });
  8. var myselect = $('<select>');
  9. $.each(optionVal, function(index, key) {
  10. myselect.empty().append( $('<li class="list-group-item">').val(key).html(key) );
  11. });
  12. $('#test_item').append(myselect.html());
  13. });
  14. });
  15. </script>
Add Comment
Please, Sign In to add comment