Rich-text Reply

Using Optimizely to customize a web app

dansullivan 06-20-14

Using Optimizely to customize a web app

I'd like to customize the display of an app (personal use) and I think I'd be able to use this process for client testing also.  The need is to hide elements based on OTHER elements...


I'd like to do this based on a parameter; I know how to set the parameter trigger, but not this experiment!


Specifically - in the image below, I wish to show items with a star (like the arrow points to), and hide them otherwise.

erase ft.jpg

Amanda 06-20-14

Re: Using Optimizely to customize a web app

Hey there! Yes, I've implemented an experiment such as the one you are mentioning -- it just takes a little jQuery magic.


Essentially, you need to identify what differentiates the elements with a star and the elements without a star. Is there a unique class name? Is the star element an image that only appears within certain elements and not others? Does the star have a different class when selected vs not?


Once you can identify how the elements you want to remove are unique, you can use jQuery and DOM traversal to select and hide the entire container. There is a helpful resource on traversal here:


Can you provide some more information on what you are hoping to do with the parameter? Also, if you can provide the URL of the page, I'd be happy to take a closer look for you.