Make whole cell clickable in single and multi grids: Difference between revisions
From Catglobe Wiki
More actions
Created page with '== Challenge == Normally, the grid question require to click on the check or radiobutton. Now, we want it to register the answer when the user click on the cell. == Example == […' |
(No difference)
|
Revision as of 13:42, 27 January 2010
Challenge
Normally, the grid question require to click on the check or radiobutton. Now, we want it to register the answer when the user click on the cell.
Example
Script
quest.onInit = function()
{
$(".grid_subquestion_odd,.grid_subquestion_even").click(
function(evt)
{
if(evt.target.nodeName == "INPUT")
return true;
$(this).children("input").click();
return false;
});
}