Skip to content

Instantly share code, notes, and snippets.

@unofficialshopify
Last active September 19, 2016 06:26
Show Gist options
  • Save unofficialshopify/bad659e8216e484ac106d17c4d56194a to your computer and use it in GitHub Desktop.
Save unofficialshopify/bad659e8216e484ac106d17c4d56194a to your computer and use it in GitHub Desktop.
How to toggle divs,paragraph or text box when we select a varaint. Basic idea behind this like switch image when we select a variant.
// for paragraph
<p class="description" id="24290057091">Description for variant 1</p>
<p class="description" id="24290057006" style="display: none;">Description for variant 2</p>
<p class="description" id="24290057089" style="display: none;">Description for variant 3</p>
// for div
<div class="description" id="24290057091">Description for variant 1</div>
<div class="description" id="24290057006" style="display: none;">Description for variant 2</div>
<div class="description" id="24290057089" style="display: none;">Description for variant 3</div>
//for input type
<input type=text class="description" id="24290057091" />
<textarea rows="4" cols="50" class="description" id="24290057006" style="display: none;">Description for variant 2</textarea>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment