sasori Posted April 20, 2017 Share Posted April 20, 2017 which event to use to get the properties,ids,elements of the first tab in ui jquery? so the situation is like this: I pop out a jquery dialog box when I click a row from a grid view in the main page. inside that dialog box, I have a jquery ui tabs. I was able t o get the properties by using the 'activate' event in this jquery ui tab like this $('#tabs').tabs({ activate : function(event,ui){ alert(ui.newPanel.find(".row #button").attr("id"));} }); that snippet works if I click the other tabs. but the problem now is, once the dialog box pops out. I am not able to get the properties inside the first tab which is by default selected in jquery. I am only able to use that snippet to the succeeding tabs , it will only work in the first tab after I click the other tabs. any idea to solve this problem? i'm more of a backend dev...it takes me hours to build an application that has a front-end coding involve Quote Link to comment https://forums.phpfreaks.com/topic/303764-jqueri-ui-tab-help/ Share on other sites More sharing options...
denno020 Posted May 18, 2017 Share Posted May 18, 2017 Do you want the tab that is selected? You can always do something like this: $(".ui-tabs-container").find("li.active") Which will give you the actual tab. If you want the tab content that is currently selected then you could read the 'aria-controls' attribute of the selected tab, which will correspond to the ID of the tabs content container var tabId = $(".ui-tabs-container").find("li.active").attr('aria-controls'); var tabContent = $("#"+tabId); Pretty sure that will work, but not 100% sure what you want Quote Link to comment https://forums.phpfreaks.com/topic/303764-jqueri-ui-tab-help/#findComment-1546590 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.