Codeigniter Jquery UI issue when nesting views (TypeError: 'undefined' is not a function)-Collection of common programming errors

I’m using the BlueImp’s file upload query widget (https://github.com/blueimp/jQuery-File-Upload) in a Codeigniter project. When I load only multi-image view everything works great, but when I load the view nested inside my base view (includes header, main_content, and footer) I get a javascript error (TypeError: ‘undefined’ is not a function(evaluating ‘$(‘#fileupload’).fileupload()’)).

What could be causing this? Code Below

multi-image.php (view)


    
        
            
                
                    Add files...
                    
                
                Start upload
                Cancel upload
            
        
        
            
            
${name} ${sizef} Error: {{if error === ‘maxFileSize’}}File is too big {{else error === ‘minFileSize’}}File is too small {{else error === ‘acceptFileTypes’}}Filetype not allowed {{else error === ‘maxNumberOfFiles’}}Max number of files exceeded {{else}}${error} {{/if}} Start Cancel ${name} ${sizef} Error: {{if error === 1}}File exceeds upload_max_filesize (php.ini directive) {{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive) {{else error === 3}}File was only partially uploaded {{else error === 4}}No File was uploaded {{else error === 5}}Missing a temporary folder {{else error === 6}}Failed to write file to disk {{else error === 7}}File upload stopped by extension {{else error === ‘maxFileSize’}}File is too big {{else error === ‘minFileSize’}}File is too small {{else error === ‘acceptFileTypes’}}Filetype not allowed {{else error === ‘maxNumberOfFiles’}}Max number of files exceeded {{else error === ‘uploadedBytes’}}Uploaded bytes exceed file size {{else error === ’emptyResult’}}Empty file upload result {{else}}${error} {{/if}} {{if thumbnail_url}} {{/if}} Delete

Originally posted 2013-11-09 23:04:54.