Uncaught TypeError: $(...).modal is not a function in Codeigniter
<p>Hi I am trying to load bootstrap modal on page load.</p>

<p>I have referred this links:</p>

<p><a href="https://stackoverflow.com/questions/24978937/modal-error-uncaught-typeerror-undefined-is-not-a-function-modal">Modal error - Uncaught TypeError: undefined is not a function modal</a></p>

<p><a href="https://stackoverflow.com/questions/32326074/bootstrap-typeerror-modal-is-not-a-function">Bootstrap : TypeError: $(…).modal is not a function</a></p>

<p><a href="https://stackoverflow.com/questions/27064176/typeerror-modal-is-not-a-function-with-bootstrap-modal">TypeError: $(…).modal is not a function with bootstrap Modal</a></p>

<p>So As per them I arranged my scripts as:</p>

<pre><code>   &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;    
&lt;script src="&lt;?php echo site_url('js/bootstrap.min.js'); ?&gt;"&gt;&lt;/script&gt;      
&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"&gt;&lt;/script&gt;
&lt;script src="&lt;?php echo site_url('assets/js/jquery-1.11.1.min.js');?&gt;"&gt;&lt;/script&gt;
&lt;script src="&lt;?php echo site_url('assets/js/jquery.backstretch.min.js');?&gt;"&gt;&lt;/script&gt;
&lt;script src="&lt;?php echo site_url('assets/js/retina-1.1.0.min.js');?&gt;"&gt;&lt;/script&gt;
&lt;script src="&lt;?php echo site_url('assets/js/scripts.js');?&gt;"&gt;&lt;/script&gt;
</code></pre>

<p>And My Modal code like this:</p>

<pre><code>&lt;div class="modal hide fade" id="myModal"&gt;
    &lt;div class="modal-dialog"&gt;
        &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
                &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
                &lt;h4 class="modal-title"&gt;Subscribe our Newsletter&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;
        &lt;p&gt;Subscribe to our mailing list to get the latest updates straight in your inbox.&lt;/p&gt;
                &lt;form&gt;
                    &lt;div class="form-group"&gt;
                        &lt;input type="text" class="form-control" placeholder="Name"&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                        &lt;input type="email" class="form-control" placeholder="Email Address"&gt;
                    &lt;/div&gt;
                    &lt;button type="submit" class="btn btn-primary"&gt;Subscribe&lt;/button&gt;
                &lt;/form&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;script type="text/javascript"&gt;
    $(window).load(function(){
        $('#myModal').modal('show');
    });
&lt;/script&gt;
</code></pre>

<p>But I am still getting the error on my modal is not being loaded. What can be the possible solution to this? How should be my scripts called in correct way</p>

<p><a href="https://i.stack.imgur.com/TWgv3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TWgv3.png" alt="error"></a></p>

<p><a href="https://i.stack.imgur.com/AkUn0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AkUn0.png" alt="Console error"></a></p>