Maybe try .html() instead of .text() to get the number from the cell.

On Jul 15, 11:37 am, Rick Pasotto <[EMAIL PROTECTED]> wrote:
> The following code doesn't work. There are no errors reported but
> nothing happens. What have I misunderstood and therefore gotten wrong?
> Am I even on the right track to do what I want?
>
> The dimensions.js and cluetip.js plugins have been loaded.
>
> // have: <td>1420</td>
> // want: <td><a class="ct" href="oneclub.php?club=1420" 
> rel="oneclub.php?club=1420">1420</a></td>
>
> $(function() {
>     // get the first cell of each table row
>     $("tr+td").each(function(){
>         var clubnumber = $(this).text()
>         $(this).empty()
>         var url = '"oneclub.php?club=' + clubnumber + '"'
>         var h1 = ' href=' + url
>         var h2 = ' rel=' + url
>         $(this).html('<a class="ct"' + h1 + h2 + '>' + clubnumber + '</a>')
>     })
>     $(".ct").cluetip()
>
> })
>
> --
> "If you speak the truth, have a foot in the stirrup." -- Turkish proverb
>     Rick Pasotto    [EMAIL PROTECTED]    http://www.niof.net

Reply via email to