anhedonium — 2010-04-12T18:26:35-04:00 — #1
I have a page with lots of people, and each person may be included in a sub-directory by specialty.
Is there a way to do this without a database but just using jquery / css?
Here is the existing page:
Each sub-directory goes to a different page. This is way too cumbersome to keep maintained. I'd like to have everyone in one place.
For example could I assign a class to each specialty and have them list with some jquery mechanism?
I'm looking at this in this light because I don't have a good understanding of DB or how to implement.
paul_wilkins — 2010-04-12T20:40:32-04:00 — #2
You could use a definition list.
Or, you could place them in a list, and use an accordion to show/hide the content.
And there are a vast array of other types of structures as well. It all depends on what you're intentions are going to be.
Do you have any ideas of examples from other web pages around the internet that do things in a similar way to what you desire?
anhedonium — 2010-04-13T12:18:32-04:00 — #3
I'm liking this as an example:
I'll pursue this unless I find a better solution.
Thanks for the input. These should be represented as a list. You are right on that for sure I think.
paul_wilkins — 2010-04-13T15:40:21-04:00 — #4
Well if you're using the jQuery library, here is their tabs solution:
anhedonium — 2010-04-13T16:50:31-04:00 — #5
Thanks for the link!
Do you think this will allow me to show specialty by adding a class?
Or do you think I'm looking the wrong direction for this...
paul_wilkins — 2010-04-13T16:55:25-04:00 — #6
yes, you should be able to use a class to adjust the presentation, so that you can show speciality.
anhedonium — 2010-04-14T12:16:45-04:00 — #7
Ok I hate to bother you on this but hoping for some glimmer of understanding.
I get that the "organic tabs" example is showing and hiding different UL's by ID. However, it would be great to have only one list and show and hide parts of the one list by different classes. – I have no idea how to write this code. Any chance someone could show me an example of how this works, or if it will work?
paul_wilkins — 2010-04-14T15:39:02-04:00 — #8
Classes don't work for tabs. Each tab relates to a single specific section of the page, which is why unique identifiers are the correct tool to use for them.
So the question needs to be asked. What are you attempting to do with tabs that makes using unique identifiers a problem.
anhedonium — 2010-04-14T18:05:31-04:00 — #9
The problem is if I have 1 list of say 10 people, and 2 of those people are specialists in Office, 5 are specialists in Retail, 2 are specialists in BOTH Office and Retail...
I can't give them a unique ID. They all need to be of the "retail" class and show when I hit that tab. I can do this by simply adding a list of all the retail only people, office only people, etc. to a unique UL but it would be nice if I could have each person in once list with a way to filter or show only people associated with that specialty.
Example of current solution:
Organic Tabs in unique UL = better
One UL with the ability to show li with specific class = BEST
Sorry, I think I know what I want but don't know if it can be done really.
Makes me think this needs to be a database I suppose.
anhedonium — 2010-04-14T18:28:43-04:00 — #10
Ok I just updated this page using a half-baked version of the script.
Default is a massive list of people. The Office division tab loads the office division UL.
But it would be cool if it could just load li elements that had a class of .office so I could keep everyone in one list instead of having multiple lists with redundant names.
paul_wilkins — 2010-04-14T18:35:12-04:00 — #11
Then perhaps you need something completely different than a standard tabbed solution.
anhedonium — 2010-04-14T19:09:14-04:00 — #12
right now I'm taking baby steps at this.
ultimately yes I'd like maximum usability. I'm just trying to figure out if I can do this a more efficient way than having a completely different page for each specialty.
paul_wilkins — 2010-04-14T19:13:40-04:00 — #13
A more efficient way is to have a separate page for each tab. Each page uses some server-side code to generate the list of people. That works for the no-scripting situation.
Then from the main page, you use scripting to request from the server (via AJAX) the list of people to show when people click on each category, and replace the list of people with that retrieved list instead.