Jump to content

Recommended Posts

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 

Link to comment
https://forums.phpfreaks.com/topic/303764-jqueri-ui-tab-help/
Share on other sites

  • 4 weeks later...

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

Link to comment
https://forums.phpfreaks.com/topic/303764-jqueri-ui-tab-help/#findComment-1546590
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.