Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
Jochen Wiedmann
Jochen Wiedmann's Profile
2
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Ceck, if a tab already exists.
[1Reply]
04-Jul-2020 05:21 AM
Forum:
Using jQuery UI
In a callback, I open tabs like this:
$('#packageTable tbody').on( 'click', 'button', function () {
var data = table.row($(this).parents('tr')).data();
var tabId = "tab-" + data.id;
$("<li id=" + tabId + "><a href='" + tabId + "'>" + data.package + "</a</li>")
.appendTo("#tabs .ui-tabs-nav");
$("#tabs").tabs("refresh");
});
In other words: The tabs have an associated id. (The tabId.) Now, I'd like to change the callback as follows:
Check, if a tab with the given id is already open. If so, do nothing. Otherwise, create the new tab.
How would I do that?
Thanks,
Jochen
Create, and activate a tab.
[2Replies]
05-Jun-2020 04:23 PM
Forum:
Using jQuery UI
Beginners question, so bear with me.
According to
the documentation
, I can create a new tab with the following snippet:
var tabId = "tab-" + data.id; // Data is an item, which has been clicked.
$("<li><a href='" + tabId + "'>Some text</a></li>").appendTo("#tabs .ui-tabs-nav");
$("#tabs").tabs("refresh");
Works fine. However, there's one detail missing: How could I activate the created tab?
Thanks,
Jochen
«Prev
Next »
Moderate user : Jochen Wiedmann
Forum