Bootstrap modal: is not a function

I don't know if you have figured out this issue or not being it was a couple months ago when you asked the question, but I came across the same problem and it had to do with a conflict with another plugin, so I will post the solution for future inquiries.

Here is an example of what I did to get around this issue.

function ShowImageInModal(path) {
    jQuery.noConflict();
    (function ($) {
        $('#modalImage').removeAttr("src").attr("src", path);
        $('#myModal').modal('show');
    }
    )(jQuery);
}

probably a namespace conflict, simply do this...

jQuery(document).ready(function($) {
    $('#myModal').modal('toggle');
});

Make sure you are not loading multiple jquery files from multiple locations, local or remote.


one of the most concise ways to avoid these conflicts is :

<script src="jquery.js"></script>
<script src="prototype.js"></script>
<script>
jQuery(function($){
// Your jQuery code here, using the $
});
</script>

as shown in :

http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/