Thanks Klaus..I am so close but still not done...
I want to add this cross sign [X] sign to only newly added tabs, not
to original tab.. I have received messages tab and when user click on
any received message, then that message opens in new tab...and user
can close that message/tab after reading it...
This is just logic problem but it will be great if someone could help
me...I tried few things but they didn't work...
$(document).ready(function(){
var $tabs = $('#myMessages > ul').tabs({
add: function(e, ui) {
$tabs.tabs('select', '#' + ui.panel.id);
},
load: function(e, ui){
$('a', ui.panel).click(function() {
$newtabs = $tabs.tabs("add", this.href, 'Read Message');
$('li', $newtabs).append('<em class="ui-tabs-close"
title="Close
Tab">[x]</em>')
.find('em')
.click(function() {
$tabs.tabs('remove', $('li', $newtabs).index($
(this).parents('li:first')[0]));
});
return false;
});
}
});
});
On Nov 5, 1:44 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Here's a demo:http://www.stilbuero.de/jquery/tabs_3/close.html
>
> --Klaus
>
> On 5 Nov., 18:59, Raghu <[EMAIL PROTECTED]> wrote:
>
> > I mean here, Is it possible to have[x] sign with each tab? If user
> > click on [x] tab get close.
>
> > On Nov 5, 12:56 pm, Raghu <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I have a requirement where each message opens in a new tab and user
> > > should have a option to close the message after reading it.
>
> > > Is it possible to have closeable tabs? If yes, then how?
>
> > > Thanks
> > > Raghu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---