Bootstrap 3 Modal Via Ajax Load(CodeIgniter) -


i trying make bootstrap3 modal work via ajax load using codeigniter. i've tried this it's still not working. it's simple use when follow what's in docs want via ajax load did bootstrap 2.3.2. trying figure out couple of days no luck.

here's code:

view:(the 1 triggers modal)

<li role="presentation">    <a data-toggle="modal" href="<?php echo $this->config->item('ompty_url'); ?>/edit" data-target="#mymodal">edit information</a> </li> 

controller:

function edit(){    $this->load->view('system/modals/edit_form'); } 

view:(the content of modal)

<!-- modal --> <div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div class="modal-dialog">     <div class="modal-content">         <div class="modal-header">             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>              <h4 class="modal-title">modal title</h4>          </div>         <div class="modal-body"><div class="te"></div></div>         <div class="modal-footer">             <button type="button" class="btn btn-default" data-dismiss="modal">close</button>             <button type="button" class="btn btn-primary">save changes</button>         </div>     </div>     <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> 

can me?

your modal wrappers id doesn't match links data-target.

change:

<div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> 

to:

<div class="modal fade" id="terms" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> 

hope helps!


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

java - Unable to make sub reports with Jasper -

Integrity error when loading fixtures for Selenium testing in Django -