I would like users to be able to double click anywhere on the screen to display a form that allows submission of feedback about that very spot.
I can think of 2 solutions:
- Store X,Y coordinates. Had to rule this out since X,Y coordinates aren't supported on all browsers.
Use Jquery to bind an exhaustive list of html entities to a dblClick event like this:
$(document).ready(function() { $("p,label,input,textarea").bind("dblclick", function(e) { $("#feedback_form").show(); });
});
So, in the example above, when any p, label, input, or textarea is double clicked, the feedback form will show (Code to pass the ID of the item being double clicked isn't included in my example for simplicity).
So 2 isn't perfect, but appears it will do the trick for any feedback on a list of supported html entities.
Is there some simpler solution I'm overlooking?
Also, if I go with 2, is double click the best method for engaging this feedback form, or would you recommend some other event?