Tag: 材料设计

Firefox上的Mousedown和Click冲突

我尝试使用MAWButton插件( https://github.com/yuhua-chen/MAWButton )和JQuery Color插件( https://github.com/jquery/jquery-color )来模拟Paper Ripple Effect。 基本上,效果对Firefox不起作用。 这是演示 – > http://jsfiddle.net/2txszd46/4/ //https://github.com/yuhua-chen/MAWButton/blob/master/js/mawbutton.js (function($) { $.fn.ripple = function(options) { var settings = $.extend({ speed: 333, // ms transitionEnd: function() {} // callback when transition ends. }, options); return this.each(function() { var $this = $(this); var supportEvent = (‘ontouchstart’ in window) ? ‘touchstart’ : ‘mousedown’; […]

聚合物纸波纹

当按下按钮时,我试图改变元素的颜色。 我想要在按下按钮并且颜色改变时在该元素中触发纸张波纹效果。 我该怎么做? 目标要素: Heading 触发元素: 使用Javascript: $(“.def”).click(function(){ $(“.abc”).css(“background-color”, $(this).css(“background-color”)); });