Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. function getText(){
  2. $(document).on('change', '#change', function(){
  3. $(".value_change").prop('value', 'Potvrdi');
  4. var val = $(this).val();
  5. var text = $('option:selected', this).text();
  6. var valuee=$('option:selected','#select').text();
  7. var content = '<li>'+text+'('+valuee+')'+'<a class="speclist-remove"></a></li>';
  8. $('ol').append(content);
  9. content="";
  10. $('option[value="'+val+'"]', this).prop('disabled', 'disabled');
  11. });
  12.  
  13. $(document).on('click','ol li',function(){
  14. var arr=$(this).text().split('(');
  15. $(this).remove();
  16. $('#change option[value="'+arr[0]+'"]').prop('disabled', false);
  17.  
  18. if ( $('ol').children().length === 0 )
  19. $(".value_change").prop('value', 'Zatvori');
  20. });
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement