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">×</span></button> <h4 class="modal-title">modal title</h4> </div> <div class="modal-body"> <p>one fine body…</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
Post a Comment