Get Free Trial

How to get pivot object with jquery

Mauel Santizo asked on July 20, 2020

I’m working with multiple instances of flexmonster and i want to get the flexmonster object by id using jquery in previous versions the code below works, but with flexmonster v2.8.1 i get undefined.

var pivotObject = $("#pivot-container").data("flexmonster");

1 answer

Mykhailo Halaida Mykhailo Halaida Flexmonster July 22, 2020

Hi Mauel,
Thank you for posting your question.
We’ve managed to reproduce the described behavior when configuring one Flexmonster instance with vanilla JavaScript and the other one – with jQuery.
In case the scenario above resembles your use case, we would recommend configuring all instances through jQuery instead in order to ensure everything works as expected. Furthermore, we’ve checked this on previous Flexmonster versions and it seems to us that such behavior has always been there.
Check out a quick sample we’ve prepared where both instances are set up through jQuery and the  


API call works properly:
Please let us know if this helps.

Please login or Register to Submit Answer