jquery - Using Bootstrap modal popup -


i have started using bootstrap modal popup. looks great except 1 annoying thing need create whole div hierarchy using modal popup. e.g.

<div class="modal fade"> <div class="modal-dialog"> <div class="modal-content">   <div class="modal-header">     <button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">&times;</span></button>     <h4 class="modal-title">modal title</h4>   </div>   <div class="modal-body">     <p>one fine body&hellip;</p>   </div>   <div class="modal-footer">     <button type="button" class="btn btn-default" data-dismiss="modal">close</button>     <button type="button" class="btn btn-primary">save changes</button>   </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> 

i prefer way of passing header content, body content argument rather creating whole structure. basic problem have structure if tomorrow bootstap renames/add new class need change in n places , there lot repetition of code not seems right.

i missing trick here or done way.

you use function add templating specific content, ?


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -