javascript - Display bootstrap pop up without defining the HTML (jquery) -


is possible display bootstrap pop on website, without predefining html of on html.

an alternative define in javascript or separate html template.

can explain me how can achieve it?

try appending html node using javscript , open bootstrap modal.

var modalhtml = '<div id="mymodal1" class="modal hide" tabindex="-1" role="dialog"> \                  <div class="modal-header">\                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>\                 <h3>standard selectpickers</h3>\                 </div>\                 <div class="modal-body">\                 </div>\                <div class="modal-footer">\                 <button class="btn" data-dismiss="modal" aria-hidden="true">close</button>\                 <button class="btn btn-primary">save changes</button>\                 </div>\               </div>';  $('.container').append( modalhtml);  $("#mymodal1").modal() 

demo js fiddle


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -