I have a table wich expands/contracts on click. It works great, however, there is one problem, sometimes users might want to copy text in the table, and thus their line contracts(on the click)
Is there some way to avoid the event being triggerd on click but not if you hold the mouse down and/or mark text?
Sample page:
http://resihop.nu/search?from=&to=&when=&got_car=1&code=
I would much appriciate if you could supply an example, i’m not that used to javascript. 🙂
Make the event
mouseup– rather thanclick. You could also check the length of time betweenmousedownandmouseupto decide if you should process the click.Something like this should do the trick: