0

I am new to angularjs. And i dont know how to bind scroll event to the html element select.this is my directive to adding scrolling functionality.

myApp.directive('scrolly', function () {
    return {
        restrict: 'A',
        link: function (scope, element, attrs) {
            var raw = element[0];
            console.log(element[0]);
            element.bind('scroll', function () {
                console.log('inside scroll');
            });
        }
    };
});

Here I attached my fiddle link.Please someone help me to fix this issue.

1 Answer 1

1

There is no HTML event fired when you scroll through a select box as it is rendered by your operating system and not the browser.

If you really need to catch this behavior, you should use a HTML select element, such as the popular select2 or selectize libraries.

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.