Noob to JQuery, and looking for a swap-DIVs plugin?
Posted: 18 May 2008 02:29 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  246
Joined  02-26-2004

Hey all, I’m trying to accomplish the following toggling action in JQuery:

When you click on a DIV with a bunch of images inside of it, it disappears and you get presented with another DIV (in the same place on the page) that has just one big image. Then when you click inside that DIV (on the image or inside the DIV, it doesn’t matter), that DIV disappears and you get your original DIV with multiple images back. Transition effects are unneccessary, show/hide will suffice.

I’m very new to JQuery, and I’m wondering if anyone has seen a Jquery plug-in that allows me to toggle the hide/show state of two DIVs (and everything inside of each DIV) this way. It would just be a toggle: when you click on anything inside a div, the other div displays and the one you clicked on gets hidden. Same when you click anywhere within the newly appeared DIV.

I’d the switch between DIVs to be controlled by just clicking inside the DIV, not buttons or links or tabs outside of it. I was attempting to learn from various slideshow and tabs plugins, but the code assumes greater knowledge than I’ve got. Online tutorials seem to be too basic or else skip too many steps. And tab plug-in code is great, but it often seems (stress on ‘seems’) to me that I have to organize my CSS/HTML as lists. I seem to think that I’m after something simple… but I know from advising clients that what looks simple is often difficult.

Anyway, if a handy swap-div plugin like I’m describing doesn’t exist, does anyone know of a good book for beginners (online or off)? Guidance appreciated.

Thanks

R o B

Profile
 
 
Posted: 18 May 2008 03:03 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  1557
Joined  01-07-2008

What you’re looking for is show, and hide.  Or simply toggle.

 Signature 
Profile
 
 
Posted: 19 May 2008 03:58 PM   [ Ignore ]   [ # 2 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1454
Joined  09-16-2004
Oxygen Smith - 18 May 2008 02:29 PM

does anyone know of a good book for beginners (online or off)? Guidance appreciated.

Bookwise, you can’t go wrong with jQuery in action 
OR
learning jQuery
both are also available as a PDF and with a full code archive.

 Signature 

Peace, e-man.
stookstudio.com, websites built with care and web standards. LinkedIn profile

Profile
 
 
Posted: 20 May 2008 02:03 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  881
Joined  02-15-2008

I find noupe.com has some excellent tutorials and examples.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64909 Total Logged-in Users: 46
Total Topics: 81853 Total Anonymous Users: 31
Total Replies: 440067 Total Guests: 227
Total Posts: 521920    
Members ( View Memberlist )