文本在两个跨度中不是彼此相邻的

时间:2018-06-26 19:00:41

标签: javascript jquery html html-table

我有两个跨度的文本,但是它们不是彼此相邻的。 (最后一个文本在上一个文本的下方,但应在上一个文本的旁边。)

以下是打印文本的代码:

var display_options_1 = `

         <td><span id="A${i}" class="${question.questionId}" onclick="onSelect(event)">${question.options[0]}</span><span>${question.option_text[0]}</span></td>
         <td><span id="B${i}" class="${question.questionId}" onclick="onSelect(event)">${question.options[1]}</span><span>${question.option_text[1]}</span></td>`;

var display_options_2 = `

         <td><span id="C${i}" class="${question.questionId}" onclick="onSelect(event)">${question.options[2]}</span><span>${question.option_text[2]}</span></td>
         <td><span id="D${i}" class="${question.questionId}" onclick="onSelect(event)">${question.options[3]}</span><span>${question.option_text[3]}</td>`;

这里是full code,工作正常的Demo

更新1

使用Static Void's Answer解决问题更容易,但是我只需要选择 ${question.options[]} 而不是${question.option_text[0]} ...

2 个答案:

答案 0 :(得分:0)

仍在编辑片刻http://jsbin.com/zizelebiko/1/edit?js,output

guard let ciImage = image.ciImage else { return }
guard let cgImage = cgImage(from: cgImage) else { return } // the above function

let newImage = UIImage(cgImage: cgImage) // ready to be saved!

答案 1 :(得分:0)

像这样更改它: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"/> <header> <nav class="nav navbar-nav navbar navbar-ot navbar-ot-white navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ot-nav"> <i class="fa fa-navicon text-white"></i> </button> <a class="navbar-brand" href="#"></a> </div> <div class="collapse navbar-collapse" id="ot-nav"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Features <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Feature</a></li> <li><a href="#">Feature</a></li> <li><a href="#">Feature</a></li> <li><a href="#">Feature</a></li> </ul> </li> </ul> <div class="nav navbar-nav navbar-right"> <a href="#" class="btn btn-primary btn-alt" data-no-scroll="">Book a Demo</a> &nbsp; &nbsp; <a href="#" class="btn btn-primary btn-outline btn-alt">Log In</a> </div> </div> <!-- /.navbar-collapse --> </div> <!-- /.container-fluid --> </nav> </header>

只需要一个跨度。