Sha256: 325db715f263eba1c340a7076deb344bc6e1f257e79eb72d6eb5172b79241a86
Contents?: true
Size: 986 Bytes
Versions: 54
Compression:
Stored size: 986 Bytes
Contents
/** * Charts helper-wrapper. * * @author Htmlstream * @version 1.0 * @requires chart.js (v1.0.3) * */ ;(function($){ 'use strict'; $.HSCore.helpers.HSHoverBlocks = { /** * Helper function for correct work the 'pappercut' hover. * * @return undefined */ papercut: function(){ var collection = $('.g-block-hover__additional--pappercut-front, .g-block-hover__additional--pappercut-back'); if(!collection.length) return; collection.each(function(){ var $this = $(this), clipArea = $this.closest('.g-block-hover').outerHeight() / 2 + 60; $this.css('background-image', 'url(' + $this.children('img').hide().attr('src') + ')'); if($this.hasClass('g-block-hover__additional--pappercut-front')){ $this.css('clip', 'rect(0px, auto, ' +clipArea+ 'px, 0px)'); } else{ $this.css('clip', 'rect('+clipArea+'px, auto, auto, 0px)'); } }); } }; })(jQuery);
Version data entries
54 entries across 54 versions & 1 rubygems