Jump to content
We've recently updated our Privacy Statement, available here. ×

Stable visualisation IDs for JavaScript/JQuery


B I

Recommended Posts

I've written a script in JQuery that triggers whenever the mouse is over a visualisation. I got the visualisation ID from the developer tools on Spotfire and the script then works on my desktop dxp:

 

$(document).ready(function() {

$( "#id208" ).mousemove(function(e) {

alert("Hover!");

});

});However, the ID that I got from the development tool is not stable. It changes when the display environment changes or when the dxp is resaved. Is there a stable ID or some other identifier that I can use to recognise the visualisations The classes are not unique so I don't think I can use those.

By the way, the Spotfire IDs that you can get from heredo not seem to be recognised by JQuery so I don't think I can use those either.

Any help gratefully received!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...