Skip to content

Commit

Permalink
Dev: move delegate to on for tableCellAdapters
Browse files Browse the repository at this point in the history
Dev: maybe is better to delegate to 'td.radio-item,td.checkbox-item'
  • Loading branch information
Shnoulle committed Nov 19, 2013
1 parent 9ed5f8f commit d2467b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/survey_runtime.js
Expand Up @@ -304,8 +304,8 @@ function tableCellAdapters()
// $('table.question').delegate('tbody td input:checkbox,tbody td input:radio,tbody td label',"click", function(e) {
// e.stopPropagation();
// });
$('table.question').delegate('tbody td',"click",function(event) {
var eventTarget=$(event.target).prop("tagName");
$(document).on('click','table.question tbody td',function(event) {// 'table.question tbody td' or 'td.radio-item,td.checkbox-item': maybe less js here
var eventTarget=$(event.target).prop("tagName");// Alternative us data
var eventActivate=$(this).find("input:radio,input:checkbox");
if(eventActivate.length==1 && (eventTarget!='INPUT' && eventTarget!='LABEL' ) )
{
Expand Down

0 comments on commit d2467b7

Please sign in to comment.