Tag: jquery

Using Spotfire Controls as JavaScript Objects

Let’s say that you are building an advanced workflow. You may need to take advantage of the text area’s capabilities to incorporate jQuery, CSS, and other responsive elements to design your interactive areas. I want to enumerate some of the techniques that I’ve used in the Blackjack template on Exchange.ai as a suggestion for best practices.

Read More

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!