how would i target my tables with a  class="tablesorterXP"
but not any other table classes?

i tried
$(".tablesorterXP table tbody tr").each( function(i) {
   $("td", $(this)).eq(0).html(i+1);
 });


Thanks BTW this is just what i was looking for.



On Mon, May 11, 2009 at 3:16 PM, Azadi Saryev <az...@sabai-dee.com> wrote:

>
> there probably is, but i do not know one...
>
> here's a full sample code, though:
>
> <script type="text/javascript" src="path/to/jquery.js"></script>
> <script type="text/javascript">
> $(document).ready(function(){
>  $("table tbody tr").each( function(i) {
>    $("td", $(this)).eq(0).html(i+1);
>  });
> });
> </script>
>
> <table width="250" border="1">
> <tbody>
> <cfoutput>
> <cfloop from="1" to="12" index="idx">
> <tr>
>    <td width="50"></td>
>    <td>#monthasstring(idx)#</td>
> </tr>
> </cfloop>
> </cfoutput>
> </tbody>
> </table>
>
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com/
>
>
>
> Paul Ihrig wrote:
> > hey Azadi  is there a link to an example using jquery?
> > thanks a bunch!
> >
> >
> > On Mon, May 11, 2009 at 12:02 PM, Azadi Saryev <az...@sabai-dee.com>
> wrote:
> >
> >
> >> very easy using jquery:
> >>
> >> $(document).ready(function(){
> >>  $("table tbody tr").each( function(i) {
> >>    $("td", $(this)).eq(0).html(i+1);
> >>  });
> >> });
> >>
> >> Azadi Saryev
> >> Sabai-dee.com
> >> http://www.sabai-dee.com/
> >>
> >>
> >>
> >> Paul Ihrig wrote:
> >>
> >>> i have a bit of css, that displays row number, excluding header.
> >>> works in FF but note iE ..
> >>>
> >>> table { counter-reset: line-number; }
> >>> td:first-child:before {
> >>> content: counter(line-number) ".";
> >>> counter-increment: line-number;
> >>> padding-right: 0.3em; }
> >>>
> >>>
> >>> is there a way using coldfusion or JS/jquery to display the row number
> of
> >>>
> >> a
> >>
> >>> table?
> >>> independent of a recordset...
> >>>
> >>> thanks
> >>> -paul
> >>>
> >>>
> >>>
> >>>
> >>
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322383
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to