-class ConditionalLogic
+class @ConditionalLogic
 
   self = ConditionalLogic.prototype
 

      #console.log rule
      $(rule.conditions).each ->
        $ruleElement = $ruleElement
        condition = this
        #console.log condition
        questionId = condition.question_id
        $triggerContainer = $ruleElement.closest('.form-container-survey').find("[data-question-id=" + questionId + "]")
        # getting element on edit and new page
        $triggerElement = $triggerContainer.find(".form-control")

                self.bindConditions(rule.question_id, $(element), condition.operator, condition.answer)
        # hide show questions
        if rule.conditions.length > 1
          self.checkConditionsAndHideShow(rule.conditions, ancestorId, $ruleElement, $container, matchType)
        else
          self.hideShowQuestions(hideQuestions, ancestorId, $ruleElement, $container)
    return

  #bind conditions to question
