$(this).find('.modal-title').text(title);
//console.log(title);
- var body = '';
- if (orig.data('body')) $(this).find('.modal-body').html(orig.data('body'));
- if (orig.data('footer')) $(this).find('.modal-footer').html(orig.data('footer'));
+ //var body = '';
+ if (orig.data('body')) $(this).find('.modal-body').html(orig.data('body').clone(true));
+ if (orig.data('footer')) $(this).find('.modal-footer').html(orig.data('footer').clone(true));
- $(this).find('iframe').focus();
+ //$(this).find('iframe').focus();
+ //console.log(orig.data('body').src);
+ if (0) $(this).find('[src]').each(function(){
+ console.log(this.src);
+ console.log(orig.data('body'));
+ console.log(orig[0].outerHTML);
+ //$(this).attr('src',this.src);
+ });
})
.on('hide.bs.modal', function (e) {
$(this).find('.modal-title').html('');
- $(this).find('[src]').attr('src','');
+ $(this).find('[src]').attr('src','about:blank');
+ $(this).find('.modal-body').html('');
+ $(this).find('.modal-footer').html('');
+ //$(this).find('[src]').attr('src','javascript:void(0);');
+ //$(this).find('[src]').contents().find("body").html('');
})
.appendTo('body')
;