I am trying to make the Bootstrap3 modal to work via Ajax Load using CodeIgniter. I've tried this but it's still not working. It's so simple to use when I follow what's in the docs but I want it to be via ajax load just like what I did for bootstrap 2.3.2. I am trying to figure it out for a couple of days but with no luck.
Here's my code:
View:(the one that triggers the 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 my 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">×</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 somebody help me?