Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropmenu has no animation #51

Open
74sharlock opened this issue Sep 9, 2015 · 1 comment
Open

dropmenu has no animation #51

74sharlock opened this issue Sep 9, 2015 · 1 comment

Comments

@74sharlock
Copy link

下拉菜单狠好用, 但是却缺少动画。
diretive:dropmenu works well, but has no animation when operate it.

@74sharlock
Copy link
Author

ok, i wrote a new dropmenu diretive just now.
HTML:

 <select ng-model="newShop.starTime" class="ui selection dropdown" dropmenu>
    <option value="">starTime</option>
    <option value="8:00">8:00</option>
    <option value="8:30">8:30</option>
    <option value="9:00">9:00</option>
    <option value="9:30">9:30</option>
    <option value="10:00">10:00</option>
    <option value="10:30">10:30</option>
</select>
<select ng-model="newShop.endTime" class="ui selection dropdown" dropmenu>
    <option value="">endTime</option>
    <option value="19:00">19:00</option>
    <option value="19:30">19:30</option>
    <option value="20:00">20:00</option>
    <option value="20:30">20:30</option>
    <option value="21:00">21:00</option>
    <option value="21:30">21:30</option>
    <option value="22:00">22:00</option>
    <option value="22:30">22:30</option>
</select>

JS:

app.directive('dropmenu', function () {
    return {
        restrict: 'A',
        link: function postLink(scope, element, attrs) {
            $(element).dropdown({
                onChange:function(){
                    console.log(scope.newShop);
                }
            });
        }

    };
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant