我试图让bootstrap下拉工作。当以独立方式执行时,相同的代码完美地工作,但是当我将其与现有代码集成时,它不起作用。按钮显示,但不会下拉! bootstrap和jquery所需的文件是在本地安装的,而不是使用CDN。
DB::table('analytics')
->where('user_id', $request->user_id)->
->whereBetween('date', [$request->from_date, $request->to_date])
->update(['finalized' => 1]);
this.renderLaunchJobs = function( data ) {
var allData = myModel.getMetaData();
workingJobData = {};
backupJobData = {};
var html = '<table style="width:70%"';
html += '<tr>';
html += '<td> Build # </td>';
html += ' <td> <input type="text" name="firstname" style="width:50%;"> </td>';
html += '<td> </td>'
html += '<td> <input type="radio" name="group" id="production" checked>';
html += '<label for="production"> Production</label> </td>';
html += '<td> <input type="radio" name="group" id="private">';
html += '<label for="private">Private</label> </td>';
html += '</tr>';
//adding transfer method
html += '<tr>';
html += '<td> Transfer method </td>';
html += '<td>';
html += myUtils.getDropDownBox("transfermethod_id","width:50%;", workingSubJobData.transfermethod_id, allData['transfermethods'], "id", "nickname" );
html += '</td>';
html += '</tr>';
//adding nested dropdown
html += '<tr>';
html += '<td>';
html += '<div class="container">';
// html += ' <h2>Multi-Level Dropdowns</h2>';
// html += ' <!--<p>In this example, we use jQuery to open multi-level dropdowns on click (see script section below).</p>-->';
html += ' <div class="dropdown">';
html += ' <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Tutorials';
html += ' <span class="caret"></span></button>';
html += ' <ul class="dropdown-menu">';
html += ' <li><a tabindex="-1" href="#">HTML</a></li>';
html += ' <li><a tabindex="-1" href="#">CSS</a></li>';
html += ' <li>';
html += ' <a class="test" tabindex="-1" href="#">New dropdown <span class="caret"></span></a>';
html += ' <ul class="dropdown-menu">';
html += ' <li><a tabindex="-1" href="#">2nd level dropdown</a></li>';
html += ' <li><a tabindex="-1" href="#">2nd level dropdown</a></li>';
html += ' <li>';
html += ' <a class="test" href="#">Another dropdown <span class="caret"></span></a>';
html += ' <ul class="dropdown-menu">';
html += ' <li><a href="#">3rd level dropdown</a></li>';
html += ' <li><a href="#">3rd level dropdown</a></li>';
html += ' </ul>';
html += ' </li>';
html += ' </ul>';
html += ' </li>';
html += ' </ul>';
html += ' </div>';
html += '</div>';
html += '</td>';
html += '</tr>';
html += '</table>';
var jobs = data;
if( jobs.length == 0 ) {
html += " <br> <font color='red' size='3'> <strong> No Jobs found to Launch. Please add a Job profile. </strong> </font> <br>";
} else {
html += '<br> <br> <br>';
html += myJobs.getJobsHtmlTable( jobs, allData );
}
$('#page_holder').html( html );
$('.tree2').treegrid({
expanderExpandedClass: 'icon-minus-sign',
expanderCollapsedClass: 'icon-plus-sign',
initialState: 'collapsed'
});
}
档案
Index.html
我已经检查过以确保依赖项没有问题。 Bootstrap和jquery完美地加载到页面中。除dropdown之外的其他引导程序组件运行良好。 我错过了什么? :(