Single/Double Click loads new page
Single/Double Click loads new page
First off GREAT plug in for jquery! Simple, and easy to use. also the best looking one at that!
So onto the subject
Just wondering if there is a way to have a single or double click on a row to load a new page.
for example Ive got a grid of users. When you single click on them it brings you to their profile. However if you have the access to do so double click will let you modify their profile.
I'm going to guess I could use the click detection stuff, and within that little function have it redirect to a page or something. But id like to get your input on it.
So onto the subject
Just wondering if there is a way to have a single or double click on a row to load a new page.
for example Ive got a grid of users. When you single click on them it brings you to their profile. However if you have the access to do so double click will let you modify their profile.
I'm going to guess I could use the click detection stuff, and within that little function have it redirect to a page or something. But id like to get your input on it.
This discussion has been closed.
Replies
Thanks very much for the compliments about DataTables! :-)
What you need to do to achieve what you are looking for here, is to bind the relevant event handlers to your table rows. I've got two examples for this, pre- and post- initialisation:
http://datatables.net/examples/example_events_pre_init.html
http://datatables.net/examples/example_events_post_init.html
Also double click detection can be done with jQuery's dblclick bind helper:
http://docs.jquery.com/Events/dblclick#fn
Hope this helps!
Allan