Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <select name="sono[]" id="sonoDetails" class="select2 form-control select2-hidden-accessible" tabindex="-1" aria-hidden="true">
  2. <option value="">Select SO No</option>
  3. <option value="5" data-bookingtime="2015-10-16 21:00:00">5</option>
  4. <option value="4" data-bookingtime="2015-10-17 20:15:00">4</option>
  5. </select>
  6.  
  7. $(document).ready(function(){
  8. $(".select2").select2();
  9. $(document).on("change","select[name='sono[]']",function(){//
  10. var me = $(this);
  11. var sono = me.select2("val");
  12. console.log(sono);
  13. });
  14. });
  15.  
  16. $(document).ready(function(){
  17. $(".select2").select2().on("change", function (e) {
  18. console.log("change",$(this).val());
  19. });
  20. });
  21.  
  22. var bindsonoSelect = function(){
  23. $("select#sonoDetails").on("change",function(){
  24. var me = $(this);
  25. var sono = me.select2("val");
  26. //var sono = me.select2().val();
  27. console.log(sono);
  28. }
  29. });
  30. }
  31. bindsonoSelect ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement