Get Free Trial

How to get the pivot object by jquery selector

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" } },

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


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

2 answers

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. You can find more different examples in our documentation: $.flexmonster().

Sohan April 7, 2017

Thanks Tanya.

Please login or Register to Submit Answer