mirror of
				https://github.com/mdbootstrap/mdb-ui-kit.git
				synced 2025-10-31 16:07:53 +03:00 
			
		
		
		
	source btn now gets not parsed HTML
This commit is contained in:
		
							parent
							
								
									9548af79b3
								
							
						
					
					
						commit
						a5557e7d11
					
				|  | @ -333,6 +333,11 @@ | ||||||
|                             <a href="javascript:void(0)" class="btn btn-primary btn-xs">Mini button</a> |                             <a href="javascript:void(0)" class="btn btn-primary btn-xs">Mini button</a> | ||||||
|                         </p> |                         </p> | ||||||
| 
 | 
 | ||||||
|  |                         <h3>Floating action buttons</h3> | ||||||
|  |                         <p class="bs-component"> | ||||||
|  | 
 | ||||||
|  |                         </p> | ||||||
|  | 
 | ||||||
|                     </div> |                     </div> | ||||||
|                     <div class="col-lg-6"> |                     <div class="col-lg-6"> | ||||||
| 
 | 
 | ||||||
|  | @ -1299,10 +1304,15 @@ | ||||||
|             (function(){ |             (function(){ | ||||||
| 
 | 
 | ||||||
|                 var $button = $("<div id='source-button' class='btn btn-primary btn-xs'>< ></div>").click(function(){ |                 var $button = $("<div id='source-button' class='btn btn-primary btn-xs'>< ></div>").click(function(){ | ||||||
|                     var html = $(this).parent().html(); |                     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); |                         html = cleanSource(html); | ||||||
|                         $("#source-modal pre").text(html); |                         $("#source-modal pre").text(html); | ||||||
|                         $("#source-modal").modal(); |                         $("#source-modal").modal(); | ||||||
|  |                     }) | ||||||
|  | 
 | ||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|                 $('.bs-component [data-toggle="popover"]').popover(); |                 $('.bs-component [data-toggle="popover"]').popover(); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user