I have a set of code which update the span dynamically.
<div id="ddlType" class="dropdown ddWrap">
<div data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="icon 1Icon"></span> <span class="dseleced">span</span>
<span class="caret pull-right"></span>
</div>
<ul class="dropdown-menu" aria-labelledby="dLabel">
<li data-value="1"><a href="#"><span class="iconDD 1Icon"></span> type 1</a></li>
<li data-value="2"><a href="#"><span class="iconDD 2Icon"></span> type 2</a></li>
<li data-value="3"><a href="#"><span class="iconDD 3Icon"></span> type 3</a></li>
<li data-value="4"><a href="#"><span class="iconDD 4Icon"></span> type 4</a></li>
</ul>
</div>
when user select li it update '.dseleced' span with value class ,and data-value, then after I need to update in db
Thank