I have a view and with this code in the head.
$(document).ready(function() {
$('#myModal').modal('show');
}
and the following HTML:
<div id="myModal" class="modal hide" role="dialog">
</div>
The controller has:
class Home extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('session');
}
public function index() {
$this->load->view('home');
}
}
When I run the view the modal does not appear. I am new CodeIgniter and do not understand why the modal does not work by simply running the index.php/home
.
I am loading the bootstrap.js
file in the footer in the correct order with jQuery. I have a Bootstrap alert working.
Is there a Library or Helper that has to be loaded in the controller?
I do not see any html or body tags on your view. Also not really to do any thing with codeigniter it self.
Here is script for auto show bootstrap on page load
And The View