jQuery help...?

smswetz

New Member
Hey all,
I'm racking my brain trying to logically figure this out. I have been working on my web portfolio, and I am by no means a developer, but I'm trying to incorporate some jQuery into it to make it run a little smoother. I am using some tabs, in which I am splitting up my portfolio sections (Print, Multimedia, Web). When a section fills the page, i want to add another one it, and I want it to load in the tab and keep the tab selected, however if I use a PHP switch (I am currently using includes inside a div for each tab), it reloads the page and clears out the selected tab.

Is there any way to do what I want (it's pretty much a manual pagination) without having to nest a set of tabs inside a tab?

You can see what I'm getting at via http://www.chromaticstudios.net/work.php
 

jnjc

New Member
I think you have implemented some of what you are trying to do. If you select the tab "Web" and then view page source you will see that the link has a class of "selected" added to it.

I imagine when you select each tab the php code should add the "selected" class to the appropriate link.

What you need to do is modify you .css so that it has a "selected" class that sets the background color of the tab etc. The when the php code adds the "selected" class to the link, the tab will look like it's selected.

At the moment the logic seems to only be applied to the "web" tab so you will need to do it for the others tabs.

HTH,
JC
 

smswetz

New Member
hmm..maybe I explained this wrong?

Basically, if you click the "print" section, you'll see that i've populated it with some work. Currently it doesn't look right, but that's because I haven't had time to work on it for the time being. However, I've designed it with enough room for 8 items per page, but for print, I have about 15 items that I would like to show.

I want to be able to have a pagination at the bottom, but am not quite sure how to do it in PHP, as the most I know how to do with that is contact forms and includes. If I just include a link to print2.php, it refreshes the whole page, and the user has to then click "Print" again on the tabs.

That would work, but it seems confusing for the end user, so I would like the content in the print tab to be loaded without refreshing the page, so when the user clicks "Page 2", it loads another 8 items in the same tab, without refreshing.

I had it working, however when the user clicks on the Page 2 button, it doesn't seem to want to use the lightbox that i have installed. I'm thinking ajax would be a good idea for this, but I'm also having a hard time figuring out how to do it.
 
Top