Need a special offer?Find out if your project fits.
+

How to get the pivot object by jquery selector

Resolved
Sohan asked on April 7, 2017

I want to get the flexmonster pivot object by ID.
For e.g. 
I crate the pivot using below code

var pivot = $("#pivotContainer_"+uniqeId).flexmonster({
report: {
dataSource: { filename: "data.csv" } },
licenseKey: "XXXX-XXXX-XXXX-XXXX-XXXX" }
);

Now later in the code I want to get this object by the ID that I have which is "pivotContainer_"+uniqeId,  

$(("#pivotContainer_"+uniqeId).flexmonster()

I don't want to use pivot variable which is defined while creating the pivot.
 
 

2 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster April 7, 2017

Hello Sohan,
Thank you for your question. A reference to Flexmonster instance can be obtained by selector the following way: $("#pivot-container").data("flexmonster"). Please have a look at the example on JSFiddle.
Regards,
Tanya

Public
Sohan April 7, 2017

Thanks Tanya.

Please login or Register to Submit Answer