Using jQuery lite to rotate a series of playing card like forms that drill down to another level in the next page.
3 “cards” show at any one time.
Can anyone think of a way to assign the index value of the card that’s in the first position whenever you click any card (form) on the page so I can carry that value over to the next page?
Say I’ve rotated through a bit, and card number 4 is currently first. However, I click on card 6. I need to let the next page know that 4 was the first card so I can assign a start position.
I know how to statically assign a start position:
btnNext: ".next",
btnPrev: ".prev",
start: 4
… but how would I FIND that value as I rotate through cards, and assign it to a form variable.
This is in a loop (Coldfusion) on the page below. Each form is the “Card” and there’s currently 15 or 20 of them. Need to assign whichever card it first as the value of “firstCARD”.
<form name="form#getCARDS.card_id#" action="category.cfm" method="post" class="theFORM" id="frm#getCARDS.card_id#">
<button id="cbut#getCARDS.card_id#">
<h3>#getCARDS.card_title#</h3>
<cfif len(getCARDS.card_smtext)><p>#getCARDS.card_smtext#<span class="morec"> ...MORE</span></p></cfif>
</button>
<input type="hidden" name="thisCARD" value="#getCARDS.card_id#" />
<input type="hidden" name="firstCARD" value="" />
</form>