Deselecting rows in table using jquery -


In this, if I press shift + down key, then he selects several rows and if I press the up key , Then this is unselected. But if I suppress the shift then only the dissection should be done.

Normally, using the up and down keys, I can navigate up and down.

Example: If there are 10 rows in the table and Shift + Downarrow, I select 3 rows, and after that I press the down arrow down 6. This should enable me to select the rows again with the selection of the previous selected rows.

In my code you can see

  if (code == 13) {// enter the keycode warning (done); If (done! = Undefined) {window.open ('keyboard.php? Q =' +); }}   

Here, if I press the Enter key, I should take it to another page, but for some reason I get an undefined error. What am I doing wrong?

This problem appears how the script / code>

  $ (document) .keyup (function (e) {var current = rows.filter (".ui-selected"), selected = $ (); // An empty JQuery object ... Case 13: var code = (E.keyCode? E.kode: E.V.); var did the current data ('docID'); ...}   

Because keyup to document on document you are viewing this is passed as in the event call

var did = $ (this). Data ('d OcID ');

You should be able to change $ (this) to get the desired effect current

var did the current data ('docID');

Comments