daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Jun 25th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top