Thanks for the reply... But I am using plugin table sorter... where should I
put empty text replacer... dint quite get you ?

Here is the code:

$(".tablesorter")
    .tablesorter({widthFixed: true, widgets: ['zebra']})
    .tablesorterPager({container: $("#pager")})



$(".tablesorter").each(function() {
 $(this).find("tbody").each(function() {


$(this).find("tr").each(function() {

$(this).find("td").each(function() {
 $(this).css("width","80px");
if($(this).html()=="")
{
$(this).html('NA')
}

});
 $(this).find("td").eq(7).click(function(){
 document.location.href =  $(this).html();

});
});
});
});

I know it should not be a big change but really cant understand the problem
?
Thanks
Varun

On Sat, Jan 17, 2009 at 10:56 AM, jQuery Lover <ilovejqu...@gmail.com>wrote:

>
> You must be loading your page 2 with an ajax call!
>
> Add your empty text replacer to the ajax call callback.
>
> PS. I haven't checked but I think you can rewrite your jquery code for
> better performance like this:
>
> $(".tablesorter").each(function() {
>        $('tbody tr td', this).each(function() {
>                 $(this).css("width","80px");
>                if($(this).html()=="")
>                {
>                        $(this).html('NA')
>                }
>         }).eq(7).click(function(){
>                document.location.href =  $(this).html();
>        });
> });
>
> ----
> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>
>
>
> On Sat, Jan 17, 2009 at 8:33 AM, varun <khatri.vk1...@gmail.com> wrote:
> >
> > Hi
> > I am using these plugins. But my problem is firefox related.
> > while sorting I can see small images in header of table in IE(images
> > on which we click and do sort ascending and descending ) but when I
> > open same page in firefox it does not show images .... Any idea ?
> >
> >
> > Also, there are some fields in the table where nothing is written so I
> > am using Jquery to put "NA" where nothing is written. But it only does
> > this on 1st page where I am showing only 10 rows.... Now suppose
> > through my pager I change the option to 20 rows ... It shows NA in 1st
> > 10 rows but after that it doesnot show NA , It shows only empty
> > field ....  I think when you use this :
> >
> > $(".tablesorter").each(function() {
> >  $(this).find("tbody").each(function() {
> >
> >
> > $(this).find("tr").each(function() {
> >
> > $(this).find("td").each(function() {
> >  $(this).css("width","80px");
> > if($(this).html()=="")
> > {
> > $(this).html('NA')
> > }
> >
> > });
> >  $(this).find("td").eq(7).click(function(){
> >  document.location.href =  $(this).html();
> >
> > });
> > });
> > });
> > });
> >
> >
> > It should put NA in the entire table ...Not just in 1st 10 rows which
> > are shown default on page.
> > Any ideas , any hints will help me!!
> >
> >
> > Thanks
> > Varun
>

Reply via email to