Social Reiot

Social Game Developer wandering in strange dungeon.

jQuery UI Dialog Button Focus

1.8.4 에서 다이얼로그의 버튼의 순서가 역순이 되어 버리는 바람에, 첫번째 버튼이 디폴트 버튼이면서 맨 처음 나오게 된다. open 콜백에서 다음 코드를 넣으면 가장 마지막 버튼이 활성화된다.  

$(this)        .next() // button pane            .find(button)                .removeClass(ui-state-focus)            .end()            .find(button:last)                .focus();

Comments