[thelist] [SPAM] Re: ajax tabscontent

Christian Heilmann codepo8 at gmail.com
Mon Jul 10 12:19:58 CDT 2006


> Christian...
>
> The script he was using does not take into account which tab could be default depending upon URL - the default is hard coded using the CSS style. And while the current script does iterate through the UL container for other purposes, has no way of identifying which tab you would want, if you did try to pick one out - hence the IDs.
>
> Now on third thought, you could pass a "number" via the URL and within the iteration, pick the tab you want, I'm partial to using an  ID, because then you don't have to know which order the tabs are in. If the order changes, the IDs will still work, not so with "pick the third tab you come to" method.

Why not just compare the current location with the HREF? That's what I
am doing in DOMtab.

Using IDs and classes for data storage is as dirty as using FONT tags.
When will people learn that you cannot assume markup as CMS and other
systems will mess around with it?

-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/



More information about the thelist mailing list