$("#new_poll_question").html(""); $("#poll_content").append("
" + "
" + "<% if @poll_questions.question_type == 1%>" + "<%= escape_javascript(render :partial => 'show_MC', :locals => {:poll_question => @poll_questions}) %>" + "<% elsif @poll_questions.question_type == 2%>" + "<%= escape_javascript(render :partial => 'show_MCQ', :locals => {:poll_question => @poll_questions}) %>" + "<% elsif @poll_questions.question_type == 3%>" + "<%= escape_javascript(render :partial => 'show_single', :locals => {:poll_question => @poll_questions}) %>" + "<% elsif @poll_questions.question_type == 4%>" + "<%= escape_javascript(render :partial => 'show_mulit', :locals => {:poll_question => @poll_questions}) %>" + "<% end%>" + "
" + "" + "
");