Using `.copy-to-clipboard-button` class to select button element for the highlight code feature.

master
Nicolas Garnier 2015-06-24 14:30:38 +01:00 committed by Addy Osmani
parent c67ec357b9
commit 68ff5322a1
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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"/>