Reputation: 702
how can focus on first input in active content when it changed ?
Upvotes: 0
Views: 2489
Reputation: 15945
$( ".selector" ).accordion({
activate: function(event, ui) {
$(ui.newPanel).find("input:first").focus();
}
});
Originally answer was based on the jQuery Accordion Demo, but the API has changed in the meantime.
Upvotes: 2
Reputation: 1
I'm working with JQuery UI control and I had a trouble with focusing the first input of my page. Here is the solution:
setTimeout(function () { $("#dvCreateItem").find("input:first").focus(); }, 1000);
Upvotes: 0