无法使用参数调用Knockout函数并同时打开css模式

时间:2016-07-04 07:53:58

标签: javascript jquery twitter-bootstrap knockout.js modal-dialog

我已经对此进行了彻底搜索,但无法找到解决问题的方法。我有一个标签,我需要将参数传递给淘汰赛功能,我必须在css模态中显示绑定的结果,所以现在问题是我的链接完全调用敲门功能,但我的模态弹出窗口没有显示。 这是我的链接

 <a href="#openDetailModal" data-bind="text: $root.TotalEmail(),click:ContactLogDetail.bind($data,'2')">0</a>

这是我的模态对话框

  <div id="openDetailModal" class="modalDialog" >
                    <div class="modal-dialog-xl">
                        <div class="modal-content">
                            <div class="modal-header">
                                <a href="#close" title="Close">
                                    <button type="button" class="close" aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                    </button>
                                </a>
                                <h4 class="modal-title">
                                    Detail
                                </h4>
                            </div>
                            <div class="modal-body">
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="table-responsive">
                                            <table id="tblContactLog" class="table table-striped table-bordered">

                                                <thead>
                                                    <tr>
                                                        <th width="3%">SNo.</th>
                                                        <th width="4%">Registration No</th>
                                                        <th width="8%">First Name</th>
                                                        <th width="8%">Last Name</th>
                                                        <th width="8%">Contact</th>
                                                        <th width="7%">Message Subject</th>
                                                        <th width="7%">Message Description</th>
                                                        <th width="5%">Campaign Type</th>
                                                        <th width="5%">Date</th>

                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <!-- ko foreach: ContactLogList() -->
                                                    <tr>
                                                        <td width="3%" data-bind="text:$index()+1">1</td>
                                                        <td width="4%" data-bind="text:RegistrationNo">Some</td>
                                                        <td width="8%" data-bind="text: FirstName">1</td>
                                                        <td width="8%" data-bind="text: LastName">1</td>
                                                        <td width="8%" data-bind="text: Contact">Some</td>
                                                        <td width="7%" data-bind="text: MessageSubject">One</td>
                                                        <td width="7%" data-bind="text: MessageDescription">English</td>
                                                        <td width="5%" data-bind="text: CampaignType">1</td>
                                                        <td width="5%" data-bind="text: CreationDate">1</td>
                                                    </tr>
                                                    <!-- /ko -->

                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <a href="#close" class="btn btn-default " title="Close">Close</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

我尝试使用jquery调用

  

$(&#34;#openDetailModal&#34)的模态。(&#39;显示&#39)

it just fades my page but do not show dialog.

following is the link which explains a little of my problem. it does not work for me

0 个答案:

没有答案