House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / JQuery

Div Placement

Author:
CJ McCarey
03/05/2010 04:46 PM

Put a unique id on each of the showhide div's utilizing your output query loop. Something to the effect of <div id="showHide_#id#>.  From there you can do a similair setup on your button's <input class="pretty_button" name="toggle_#id#" value="Edit" id="toggle_#id#" type="submit" title="Click to edit judges"/> Then based off the button ID you know which div to hide/show in your JQuery. > Hello - > > I'm taking myself deeping into jQuery and need a bit of guidance.  I'm > creating a table that lists poems (database id, poem title, rating of > poem, and judges who are reviewing poem). > > I've added an "edit" but where I want a small menu to appear via > show/hide div.  The menu lists three judges to select to assign to > review the selected poem.  I have the menu appearing, but it appears > on all rows of the table containing poems.  How may I make it appear > for only the row containing the judges I wish to edit? > > <table id="box-table-a" summary="Cumulative List of Poems"> > <thead> >   <tr> >   <th>ID</th> >   <th>Title</th> >   <th>Rating</th> >   <th>Judge(s)</th> >   <th></th> >   </tr> > </thead> >   <tbody> >     <cfoutput query="qGetPoems" startrow="#url.start#" > maxrows="#perpage#"> >     <tr> >       <td class="poemID">#id#)</td> >       <td><a href="poemOverview.cfm?id=#id#">#poemTitle#</a></td> >       <td>Overall Rating</td> >       <td>Judge 1<br />Judge 2<br /> Judge 3 </td> >       <td>        >       <div class="examples"> >       <input class="pretty_button" name="toggleh1" value="Edit" > id="toggleh1" type="submit" title="Click to edit judges"/> >       </div> >       </cfoutput> >       <div class="showhide"> >         <form> >         <label ><input checked="checked" type="checkbox">Judge 1</label> >         <label><inputtype="checkbox">Judge 2</label> >         <label><input  type="checkbox">Judge 3</label> >         <div align="center"> >         <input class="dlgButton" value="Done" type="button"> >         </div> >               </form> >           </div> >         </td> >       </tr> >     </tbody> > </table> > > I think may .showHide class is in the wrong location.   > > Any help is appreciated.  Thanks in advance.


Search jquery

February 12, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29