Uncaught TypeError: undefined is not a function bootstrap.min.js:6-Collection of common programming errors
i made a function appendScript which will be called on a button click event my function code is
function appendScript()
{
var v_js;
var head= document.getElementsByTagName('head')[0];
v_js = document.createElement('script');
v_js.type = 'text/javascript';
v_js.src = "//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js";
head.appendChild(v_js);
var body = document.getElementsByTagName('body')[0];
v_js =document.createElement('script');
v_js.type="text/javascript" ;
v_js.src = "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js";
body.appendChild(v_js);
var v_css = document.createElement('link');
body.appendChild(v_css);
interval=self.setInterval(function(){ if(jQuery && typeof $().modal == 'function')
{
window.clearInterval(interval);
//create a div in the body which we will use for our dialog.
$(document.getElementsByTagName('body')[0]).append('×
Modal header
One fine body.CloseSave changes'); $('#myModal').modal('show') //setTimeout is non blocking (basically async) so lets put our apex call in a timeout so it doesn't //stop our dialog from showing. } } ,300); }
and the error i am facing is
Uncaught TypeError: undefined is not a function bootstrap.min.js:6
(anonymous function) bootstrap.min.js:6
(anonymous function) bootstrap.min.js:6