Advertisement
Guest User

w2ui breaking mousedown

a guest
May 11th, 2018
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang='en-us'>
  3. <head>
  4.     <meta charset="utf-8">
  5.     <link rel="stylesheet" type="text/css" href="http://w2ui.com/src/w2ui-1.5.rc1.min.css" />
  6.     <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  7.     <script src="http://w2ui.com/src/w2ui-1.5.rc1.min.js"></script>
  8. </head>
  9. <body>
  10.     <div id="grid" style="width: 100%; height: 250px;"></div>
  11. </body>
  12. <script>
  13. $(function () {
  14.     $('#grid').w2grid({
  15.         name: 'grid',
  16.         header: 'List of Names',
  17.         columns: [
  18.             { field: 'fname', caption: 'First Name', size: '30%' },
  19.             { field: 'lname', caption: 'Last Name', size: '30%' },
  20.             { field: 'email', caption: 'Email', size: '40%' },
  21.             { field: 'sdate', caption: 'Start Date', size: '120px' }
  22.         ],
  23.         records: [
  24.             { recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' },
  25.             { recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' },
  26.             { recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' },
  27.             { recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' },
  28.             { recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' },
  29.             { recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' }
  30.         ]
  31.     });
  32. });
  33. $(document).on("mousedown", "#grid", function(){
  34.     console.log("This mousedown won't work")
  35. });
  36. $(document).on("mouseup", "#grid", function(){
  37.     console.log("This mouseup will work")
  38. });
  39. </script>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement