javascript - jQuery.ripples contained within a box/table -
https://github.com/sirxemic/jquery.ripples/
i've fooled around ripples jquery plugin, though being novice can't seem find way contain ripple effect within specific area (such or something) - can work if set apply entire body of site.
i have tried editing ripple controls different css classes, though breaks if change $('body') part else.
$(document).ready(function() { try { $('body').ripples({ resolution: 512, dropradius: 20, //px perturbance: 0.04, }); $('main').ripples({ resolution: 128, dropradius: 10, //px perturbance: 0.04, }); }
is there way plugin apply area of page? thanks.
difficult problem if don't provide code ..
anyway, have read first lines of plugin code ?
// ripples class definition // ========================= var ripples = function (el, options) { var = this; this.$el = $(el); this.$el.addclass('jquery-ripples'); // if element doesn't have background image, don't apply effect var backgroundurl = (/url\(["']?([^"']*)["']?\)/.exec(this.$el.css('background-image'))); if (backgroundurl == null) return; backgroundurl = backgroundurl[1];
so, has element using background image ?
Comments
Post a Comment