Hoping to find a way to have multiple URL parameters display specific divs for certain products, while hiding all the other product divs.
For example:
website.com/?product=widget1,widget3,widget4
or
website.com/?product=widget1&product=widget3&product=widget4
The above would display the 3 divs associated with each of those 3 parameters and hide all others. See below.
<div class="widget1 product-selector">Widget1</div>
SHOW
<div class="widget2 product-selector">Widget2</div>
HIDE
<div class="widget3 product-selector">Widget3</div>
SHOW
<div class="widget4 product-selector">Widget4</div>
SHOW
<div class="widget5 product-selector">Widget5</div>
HIDE
The example on the following site achieves similar, but it will only allow for a single URL parameter: http://jennamolby.com/how-to-display-dynamic-content-on-a-page-using-url-parameters/
Appreciate any solutions to help me achieve this. Thanks