sirxemic / jquery.ripples

Add a water ripple effect to your background using WebGL.
https://sirxemic.github.io/jquery.ripples/
MIT License
1.06k stars 416 forks source link

How to properly use it with jQuery.noConflict? #48

Closed mavstuff closed 6 years ago

mavstuff commented 6 years ago

Thanks for the nice plugin! I need to use the with jQuery.noConflict. How ca I do this?

sirxemic commented 6 years ago

I have no idea. I never used jQuery.noConflict before and the noConflict code I added is just a pattern I copied over from other jQuery plugins.

Try the jQuery documentation, Google or StackOverflow.

mavstuff commented 6 years ago

I have just replaced code
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; with $ = jQuery;

Also the code to install ripples:

jQuery('.mybanner').ripples({
        resolution: 500,
        perturbance: 0.01
});

This might be usable to someone using ripples for Joomla, since Joomla has $('....') function defined by Mootools, not jQuery. jQuery is called via jQuery('.....') function.

Thank you for great plugin! have a nice day!