Search code examples
liferayliferay-auialloy-ui

How to get checkbox checked value in AlloyUI?


How to get Liferay AUI taglib checkbox checked value in AlloyUIi ?

<aui:input type="checkbox" ></aui:input>

Solution

  • I have developed entire solution for get single checkbox values, It might help to other AUI Script Developer

    AUI().ready('aui-node',function(A) {
        A.all(':checkbox').each(function() {
            this.on('click', function(event) {
            var checkBoxStatus = A.all(':checked');
                if(checkBoxStatus.attr('checked') == 'true') {
                // your conditional code
                }
                else { 
                // your conditional code
                }
            });
        });
    });