On Mar 25, 1:58 pm, Klaus Hartl <[email protected]> wrote:
> Could you show us your code? It would be just useless speculation
> without it...
Sure, sorry. The old code (no scroll problem) did this:
$(document).ready(function(){
var cookie_val = Math.max($.cookie('views/admin/
teacher_status.tab'), 0);
$('#tabs').tabs();
<!---------------------------------------------------------------------
Only load the tab from the cookie if the link to the tabbed page
does
not contain an anchor (document.location.hash). If an anchor
exists
we assume its intent is to load the tab corresponding to the
anchor
name. Where this approach will break down is if the anchor is
actually
being used for a different purpose (like to link to a non-tabbed
area
of the page).
----------------------------------------------------------------------
>
if(document.location.hash == null || document.location.hash == ''
|| document.location.hash == 'undefined') {
$('#tabs').tabs("select", cookie_val);
}
$('#tabs').bind('tabsshow', function(event, ui) {
$.cookie('views/admin/teacher_status.tab', ui.index);
});
});
The new code, which introduced the scroll problem, did this:
$(document).ready(function(){
$('#tabs').tabs({ cookie: { name: 'views/admin/
teacher_status.tab' } });
$('#tabs').bind('tabsshow', function(event, ui) {
$('#tabs').tabs('option', 'cookie', { name: 'views/admin/
teacher_status.tab' });
});
});
Note that I removed the document.location.hash check to see if tabs
would now handle them innately.
The tabs look like this:
<div id="tabs">
<ul>
<li><a href="##tab-status"><span>Status</span></a></li>
<li><a href="##tab-update"><span>Update Details</span></a></
li>
<li><a href="##tab-resend"><span>Resend System Messages</
span></a></li>
<li><a href="##tab-messages"><span>Messages Sent</span></a></
li>
<li><a href="##tab-logins"><span>Login History</span></a></
li>
</ul>
<div id="tab-status">
etc.
Thanks!
Jim
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---