mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-29 04:54:12 +03:00
source btn now gets not parsed HTML
This commit is contained in:
parent
34557a2dca
commit
ad91222839
|
@ -333,6 +333,11 @@
|
|||
<a href="javascript:void(0)" class="btn btn-primary btn-xs">Mini button</a>
|
||||
</p>
|
||||
|
||||
<h3>Floating action buttons</h3>
|
||||
<p class="bs-component">
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
|
||||
|
@ -1299,10 +1304,15 @@
|
|||
(function(){
|
||||
|
||||
var $button = $("<div id='source-button' class='btn btn-primary btn-xs'>< ></div>").click(function(){
|
||||
var html = $(this).parent().html();
|
||||
html = cleanSource(html);
|
||||
$("#source-modal pre").text(html);
|
||||
$("#source-modal").modal();
|
||||
var index = $('.bs-component').index( $(this).parent() );
|
||||
console.log(index);
|
||||
$.get(window.location.href, function(data){
|
||||
var html = $(data).find('.bs-component').eq(index).html();
|
||||
html = cleanSource(html);
|
||||
$("#source-modal pre").text(html);
|
||||
$("#source-modal").modal();
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
$('.bs-component [data-toggle="popover"]').popover();
|
||||
|
|
Loading…
Reference in New Issue
Block a user