I have a ? about jquery tabs (and maybe callbacks).
I have a UI with a set of 2 tabs (actually more complicated, but let's
say 2 for simplicity).
first tab shows its content by default.
second tab's contents are initially hidden and dynamically generated
via javascript (it's a google map)
as you probably know the rendering of the google map is improper when
initially hidden in a jquery tab.
I've read about 2 possible solutions, each of which doesn't quite work
(or causes me a secondary problem).
Solution 1:
change the way that jquery tab "hides" the tab.
basically you change *.ui-tabs .ui-tabs-hide { display: none !
important; }*
to position:absolute; left: -1000px; top: -1000px;
this "works", but for some reason there are now peculiarities in
rendering font-sizes of the newly displayed tab...any text that's
initially hidden shows up as being quite large.
Solution 2:
call the google maps checkResize() function *after* the contents of
the 2nd div are shown.
I added an onclick method to my tab that calls checkResize(), but this
method is actually being called _before_ the hidden div is shown, so
it doesn't work.
Is there a way to set up a callback _only_ when the 2nd tab is clicked
on and _only_ after the tab contents are visible?
I tried $('.selector').tabs({show: function(event, ui)
{ map.checkResize(); }});
but this gets fired no matter which tab is clicked.
hope that makes sense & thx for any advice!!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---