Override custom option file in your theme
app/design/frontend/namespace/themename/Magento_Catalog/templates/product/view/options/type/select.phtml
<?php @var $this Mage_Catalog_Block_Product_View_Options_Type_Select ?>
<?php $_option = $this->getOption() ?>
<?php if ($_option->getTitle()=="testoption1") { ?>
<div id="hingebox">
<?php } ?>
<?php if ($_option->getTitle()=="testoption2") { ?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#hingebox select').on('change', function() {
if (jQuery('#hingebox select option:selected' ).text()==0)
{
jQuery('#hingeoptions').hide();
}
else jQuery('#hingeoptions').show();
});
});
</script>
<div id="hingeoptions" style="display:none;">
<?php } ?>
<dt>
<?php if ($_option->getTitle()=="Please select option") { ?>
<h3 class="edging-title"><span class="cfg-step">STEP 2</span>Please select testoption <a href="/blog/products/" title="What is option?" target="_blank">What is option?</a></h3>
<?php } else { ?>
<label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label>
<?php } ?>
</dt>
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
<div class="input-box">
<?php
$valuesHtml=$this->getValuesHtml();
$valuesHtml=str_replace("<ul","<div class='edging-list'",$valuesHtml);
$valuesHtml=str_replace("</ul>","</div>",$valuesHtml);
$valuesHtml=str_replace("<li","<div class='edging-list-item'",$valuesHtml);
$valuesHtml=str_replace("</li>","</div>",$valuesHtml);
echo $valuesHtml;
?>
<?php if ($_option->getIsRequire()): ?>
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
<span id="options-<?php echo $_option->getId() ?>-container"></span>
<?php endif; ?>
<?php endif;?>
</div>
</dd>

