0

I want to show UI-select drop-down when, we click on html-element. Please see the demo DEMO. In Demo we are showing three elements, when we select any of elements it must show related ui-select(angularjs). How I will do this...

<div class="wrapper col-md-12 col-sm-12">
    <a title="week? category"  class="tag" ng-class="{selected:selectedType == 'week'}" ng-click="makeActive('week')">week</a>
    <a title="week? category"  class="tag" ng-class="{selected:selectedType == 'month'}" ng-click="makeActive('month')">month</a>
    <a title="week? category"  class="tag" ng-class="{selected:selectedType == 'year'}" ng-click="makeActive('year')">year</a>
</div>

1 Answer 1

1

Try this way, here is the hint for you. Demo

<div class="wrapper col-md-12 col-sm-12">
        <a title="week? category"  class="tag" ng-class="{selected:selectedType == 'week'}" ng-click="makeActive('week')">week
        <select ng-show="selectedType == 'week'">
          <option>week 1</option>
          <option>week 2</option>
          <option>week 3</option>
        </select>
        </a>
        <a title="week? category"  class="tag" ng-class="{selected:selectedType == 'month'}" ng-click="makeActive('month')">month
        <select ng-show="selectedType == 'month'">
          <option>month 1</option>
          <option>month 2</option>
          <option>month 3</option>
        </select>
        </a>
        <a title="week? category"  class="tag" ng-class="{selected:selectedType == 'year'}" ng-click="makeActive('year')">year
        <select ng-show="selectedType == 'year'">
          <option>year 1</option>
          <option>year 2</option>
          <option>year 3</option>
        </select>
        </a>
      </div>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.