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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -