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

Changing icon on button click #22

Open
bradsapp opened this issue May 7, 2015 · 1 comment
Open

Changing icon on button click #22

bradsapp opened this issue May 7, 2015 · 1 comment

Comments

@bradsapp
Copy link

bradsapp commented May 7, 2015

I have not been successful in changing fa icons on click. Can anyone help me determine how I can change the icons for the buttons in the table rows?

$.table.addEventListener('click',function(e){
    if(e.source.toString() == '[object TiUIButton]') {
        if(e.source.icon=='fa-star-o') {
            $.fa.change(e.source,'fa-star');
        }
        if(e.source.icon=='fa-star') {
            $.fa.change(e.source,'fa-star-o');
        }
    }
});
@MattMcFarland
Copy link
Owner

can you confirm that e.source.icon is not undefined?

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

2 participants