I have three buttons. The idea is to change text on button id #11 and #12 when #1 is clicked.
$(document).ready(function() {
    var dict = {#1: ['#11', '#12']}
    $('button').click(function () {
        var k = dict['#'+$(this).attr('id')]
        for (c in k){
            var m = k[c]
            $(m).button('it works')
        }
    })
});
Now the problem is: if I call alert(m), I get the correct result, but it just doesn't work with $(m).button('it works'). Any idea why?
 
     
     
     
     
    