A Lightweight jQuery Plugin For Basic SVG Manipulation | jq-svglite

SVGLite is a small jQuery plugin for SVG processing.  SVG Lite is SVG processing that dynamically changes the fill or stroke attributes of an SVG image and makes it fully responsive, regardless of how the viewport size is changed.

Ripple Effect Based on Material Design In jQuery | Ripple.js

How to make use of it:

1. Insert the SVGLite plugin after the jQuery library.

<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/svglite-min.js"></script>

2. Embed an SVG into the web page.

<svg id="example" ...>
  Paths Here
</svg>

3. Initialize the plugin on the SVG component and we’re ready to go.

$('#example').svglite({
  // options here
});

4. Change the styles of your SVG component by including or changing CSS classes.

// replace all classes
$('#path_id').pathclass('yourClass');

// add a CSS class
$('#path_id').pathclass('yourClass','add');

// clear all CSS classes
$('#path_id').pathclass();

// remove a specific CSS class
$('#path_id').pathclass('yourClass','remove');

5. Add patterns to SVG paths.

// replace all classes
$('#path_id').pathclass_pattern('yourClass');

// add a CSS class
$('#path_id').pathclass_pattern('yourClass','add');

// clear all CSS classes
$('#path_id').pathclass_pattern();

// remove a specific CSS class
$('#path_id').pathclass_pattern('yourClass','remove');

6. All default configuration options.

$('#example').svglite({

  // resize the SVG on window resize
  resize: false,

  // specific size you want the SVG to be sized to
  special: '',

  // set the animation timing for the patterns
  speed: 1500,

  // default opacity
  default_opacity: 1,

  // path opacity you're changing to
  change_opacity: 1,

});

7. Global settings.

// for 'special' config
svglitedefs.resize['jquery'] = 600;
$('#svg').svglite({special:'jquery'});

// set a maximum width
svglitedefs.max(1024);

Change Styles Of Inline SVGs, SVG in HTML, SVGLite Plugin/Github


See Demo And Download

Official Website(kaitwalla): Click Here

This superior jQuery/javascript plugin is developed by kaitwalla. For extra Advanced usage, please go to the official website.

Related Posts

VenoBox-Responsive-jQuery-Lightbox-Plugin

Responsive Image Gallery Lightbox jQuery Plugin | VenoBox

VenoBox is a responsive jQuery modal window plugin suitable for images, embedded content, iFrames, Google Maps, Vimeo, and YouTube videos. The big difference compared to many other…

bootstrap-dropdown-on-hover

[Animation] Bootstrap Multi-Level Responsive Dropdown Menu

Bootstrap-based multi-level dropdown navigation menu with cool animations. The dropdown on Hover is a jQuery plugin used to create Bootstrap multi-level scroll-triggered dropdown menus with CSS3 animations…

Google-Translate-Dropdown-Customize-With-Country-Flag

Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…

Bootstrap-Fileinput

HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….

HStack-and-VStack-in-CSS

CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…

Floating-Whatsapp-Chat-Button

How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Leave a Reply

Your email address will not be published. Required fields are marked *