Using `.copy-to-clipboard-button` class to select button element for the highlight code feature.
parent
c67ec357b9
commit
68ff5322a1
|
@ -17,7 +17,7 @@
|
|||
function MaterialComponentsSnippets() {
|
||||
'use strict';
|
||||
|
||||
this.snippetButtons = document.querySelectorAll('.snippet-caption .mdl-button');
|
||||
this.snippetButtons = document.querySelectorAll('.snippet-caption .copy-to-clipboard-button');
|
||||
this.init();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="snippet-caption"></div>
|
||||
{% for snippet in snippet_group %}
|
||||
<div class="snippet-caption">
|
||||
<button class="mdl-color-text--grey-600 mdl-button mdl-js-button mdl-js-ripple-effect" href="#{{ component_name }}/{{ snippet.file }}">
|
||||
<button class="copy-to-clipboard-button mdl-color-text--grey-600 mdl-button mdl-js-button mdl-js-ripple-effect" href="#{{ component_name }}/{{ snippet.file }}">
|
||||
<i class="material-icons copy">content_copy</i> {{ snippet.caption }}
|
||||
<object class="snippet-copy" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
|
||||
<param name="movie" value="../assets/clippy.swf"/>
|
||||
|
|
Loading…
Reference in New Issue