Tag: css

Hide elements inside a SpotfireControl

Let’s say you want to remove an item from the dropdown of a SpotfireControl.

You can look inside of a Spotfire Control with the following JavaScript:

HTML:

<p id="turkey"><SpotfireControl id="b6d7d7d9761649bd9f87f096def91dfb" ></p>

<p id="bacon"></p>

JS:

$( document ).ready(function() {
   $('#bacon').text($('#turkey').html());
});

This lets you see the inside of the SpotfireControl. We see that the ‘Variable’ selection is the one that we want to hide. Simply grab the object using the title attribute.

JS:

$( document ).ready(function() {
   $("[title='Variable']").hide();
});

Viola!