Jolin
Jolin

Reputation: 1615

what does .svg('get') mean?

I have seen this syntax in many places, but cannot find any explanation on internet what does this two lines do, could anyone explain it?

$('#svgContainer').svg();           
var svg = $('#svgContainer').svg('get');

Upvotes: 2

Views: 503

Answers (1)

Jason Sperske
Jason Sperske

Reputation: 30416

This looks like a plugin for jQuery that creates (first line) and then returns (second line) a SVG element. Possibly this one?

From that plugin's documentation (found by clicking on 'Quick Ref'):

$(selector).svg('get') // Retrieve SVG wrapper 

Upvotes: 2

Related Questions