[jQuery] Re: JQuery tablesorter problem
Hi Aquaone I am using Version 2.0.3 On Feb 4, 11:20 pm, aquaone aqua...@gmail.com wrote: Please provide the code you're using to invoke tablesorter. It's likely a syntax error. On Thu, Feb 4, 2010 at 05:36, Nagaraju man25...@gmail.com wrote: I am facing problem with jquery.tablesorter.js It's working fine if I have more than column in sorting/header list. But if I have one column in sorting/header showing following error. o is undefined o.order = o.count = s[1]; (jquery.tablesorter.js at line 421) Please suggest me fix for this Regards Nagaraju P
[jQuery] Re: Jquery tablesorter problem
when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
Can I also use table sorter with datagrid control? Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
Also, to get around the problem : I made a div around the table : div id=tableDiv table id=table1 cellspacing=1 class=tablesorter // table content here /table /div I used this jquery after making div: $(#tableDiv).each(function(){ $(this).find(table).each(function() { if($(this).hasClass('tablesorter')) { $(this).tablesorter({widthFixed: true, widgets: ['zebra']}) //.tablesorterPager({container: $(#pager)}) } }); }); This worked fine . div id=tableDiv table id=table1 cellspacing=1 class=tablesorter *runat=server**// only this thing changed * // table content here /table /div I used this jquery after making div: $(#tableDiv).each(function(){ $(this).find(table).each(function() { if($(this).hasClass('tablesorter')) { $(this).tablesorter({widthFixed: true, widgets: ['zebra']}) //.tablesorterPager({container: $(#pager)}) } }); }); This does not work. Any body knows the reason. On Mon, Jan 12, 2009 at 9:09 AM, Varun Khatri khatri.vk1...@gmail.comwrote: Can I also use table sorter with datagrid control? Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
*alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:25 AM, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik.Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
Can I also use table sorter with datagrid control? No, well, not out of the box anyways... as the DataGrid control doesn't generate thead, th, and tbody tags, all of which are important parts of the TableSorter structure If you insist on using DataGrid, you'll have to make a custom control adapter that generates the HTML that the plugin is looking for On Jan 12, 12:09 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Can I also use table sorter with datagrid control? Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
What happens with: $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) On Jan 12, 3:11 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Here I have attached 3 files ... Its just a simple example I am trying this coz all my tables are dynamic (made at runtime) can you please check and let me know ... I have already spent hours for just 1 thing : Thanks I really appreciate the effort Varun On Mon, Jan 12, 2009 at 11:59 AM, MorningZ morni...@gmail.com wrote: Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun Default3.aspx 145KViewDownload jquery.tablesorter.js 31KViewDownload sort.js 1KViewDownload
[jQuery] Re: Jquery tablesorter problem
If I remove runat=server Like *table id=table1 cellspacing=1 class=tablesorter* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It works fine * But If I do *table id=table1 cellspacing=1 class=tablesorter runat=server* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It doesnot work* In the firebug it desont show any error : Infact when I write this in the console it says *Object length=1* but still does not work... :( Thanks Varun On Mon, Jan 12, 2009 at 12:26 PM, MorningZ morni...@gmail.com wrote: What happens with: $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) On Jan 12, 3:11 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Here I have attached 3 files ... Its just a simple example I am trying this coz all my tables are dynamic (made at runtime) can you please check and let me know ... I have already spent hours for just 1 thing : Thanks I really appreciate the effort Varun On Mon, Jan 12, 2009 at 11:59 AM, MorningZ morni...@gmail.com wrote: Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery:
[jQuery] Re: Jquery tablesorter problem
Sorry man, no idea what to tell you. good luck with your issue On Jan 12, 3:34 pm, Varun Khatri khatri.vk1...@gmail.com wrote: If I remove runat=server Like *table id=table1 cellspacing=1 class=tablesorter* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It works fine * But If I do *table id=table1 cellspacing=1 class=tablesorter runat=server* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It doesnot work* In the firebug it desont show any error : Infact when I write this in the console it says *Object length=1* but still does not work... :( Thanks Varun On Mon, Jan 12, 2009 at 12:26 PM, MorningZ morni...@gmail.com wrote: What happens with: $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) On Jan 12, 3:11 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Here I have attached 3 files ... Its just a simple example I am trying this coz all my tables are dynamic (made at runtime) can you please check and let me know ... I have already spent hours for just 1 thing : Thanks I really appreciate the effort Varun On Mon, Jan 12, 2009 at 11:59 AM, MorningZ morni...@gmail.com wrote: Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)})