$result = str_replace('{cost}', $answer->cost, $result); } echo replace_cost($result, $answer->cost, $answer->extra_cost); ?> </h2> <?php $result = $lng == 'english' ? @$answer->en_supporting_facts : @$answer->fr_supporting_facts; if ($result) { ?> <hr> <h4 class="small white-text bolder"><?php echo $this->lang->line('fact'); ?> </h4> <h4 class="small white-text"><?php echo replace_cost($result, $answer->cost, $answer->extra_cost); ?> </h4> <?php } ?> <div class="button-answer red-class" id="go-questions"><h3 class="white-text bolder"><?php echo $this->lang->line('next-button'); ?> </h3></div> </div> </div> <script> $(document).ready(function(){ var boxHeight = 0.8; var paddingBox = 2.2;
<?php $i = 0; foreach ($answers_info as $answer) { $i++; ?> <div class="answer-box grey-class" data-answer="<?php echo $answer->id; ?> "> <div> <div class="number red-class button-circle"><h3 class="white-text bolder"><?php echo $i; ?> </h3></div> <h3 class="white-text"><?php echo replace_cost($lng == 'english' ? $answer->en_desc : $answer->fr_desc, $answer->cost); ?> </h3> </div> </div> <?php } ?> </div> </div> <script> $(document).ready(function(){ $('.answer-box').css('height',$('.answer-box').width()*0.8+"px"); }) $(window).load(function(){ $('.answer-box').css('height',$('.answer-box').width()*0.8+"px");