Re: [jQuery] Quirks with Tablesorter
seconded. Your best bet is to write your own widget that deletes and appends your separators for you on sort. On Thu, Feb 25, 2010 at 15:33, Nathan Klatt n8kl...@gmail.com wrote: On Thu, Feb 25, 2010 at 5:28 PM, West415 malik.robin...@gmail.com wrote: I don't need the headers to repeat though. I'm trying to have a visual separator between the rows. I don't have to use an hr tag, but the problem is, it tries to sort every row as if there is data there. I'd like it to ignore that row when doing the sort. Any idea? I'm happy to replace my hr tag with an image but I'm afraid it may try to sort that row to Yeah, I'm sure it will. What determines whether there is a separator between two rows? I expect you'll have to re-apply that logic each time the table is sorted; just add a class to the trs that you want to have the separator after (or before, I suppose). Remember to remove the class before you re-apply the logic, though. :) Good luck. Nathan
Re: [jQuery] JQuery tablesorter problem
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
Re: [jQuery] Is there have any JQuery plugin that can sort 1A,2A,3A,... 10A, 11A, 12A, 13A, 14A?
Sort as in a tablesorter parser, an array, or what? On Tue, Feb 2, 2010 at 07:37, HenryRock henryloke.myetr...@gmail.comwrote: I facing a problem in sorting : 1A,2A,3A,... 10A, 11A, 12A, 13A, 14A Sample data. I using the SQL to sort ASC but it return result as below: 12A 13A 14A 10A 11A 1A 2A 3A 4A 5A 6A 7A 8A 9A May I know is there have any plugin that can sort the sample data above to 1A until 14A? Thanks...
Re: [jQuery] All of my columns are sorting fine, except one! It is acting as if there's a decimal point!
It's detecting it as text then most likely. Force it to sort numeric and you should be fine. On Fri, Jan 29, 2010 at 13:05, mackrider matst...@gmail.com wrote: What's up? This is really odd. One of my columns (HR) is not sorting properly. It is sorting as if there's a decimal point. Please go to http://toiletsurvey.com/free-agents/ and on the first table sort by HR. It sorts the numbers as such: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 10 10 13 13 2 2 2 2 20 24 27 31 4 6 7 7 8 8 Which leads me to believe for this one column, it's treating the numbers as if there's a decimal after the first digit. If I hadd a zero to the cells it sorts properly. I don't want to resort to using leading zero's especially because the numbers can be in triple digits under certain circumstances. Please help! Thanks, Mack -- View this message in context: http://old.nabble.com/All-of-my-columns-are-sorting-fine%2C-except-one%21--It-is-acting-as-if-there%27s-a-decimal-point%21-tp27378273s27240p27378273.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] All of my columns are sorting fine, except one! It is acting as if there's a decimal point!
confirmed by looking at live site, $(#freeagents).get(0). config.parsers.8.id is text. Looks like you'll have the same problem with 3B as well for the same reason. To force a specific parser to be used, pass the options in to Tablesorter on invocation. In this case for example: jQuery(#freeagents).tablesorter({ headers: { 7: { sorter: 'digit' }, 8: { sorter: 'digit' } } }); You can collapse the white space if you wish but multiline makes it more readable, especially when you start adding other options (e.g. widgets, forced sort orders, ...). e.g. jQuery(#freeagents).tablesorter({ headers: { 7: { sorter: 'digit' }, 8: { sorter: 'digit' }}}); Hope this helps, aquaone On Fri, Jan 29, 2010 at 16:15, mackrider matst...@gmail.com wrote: How do I do that exactly? aquaone wrote: It's detecting it as text then most likely. Force it to sort numeric and you should be fine. On Fri, Jan 29, 2010 at 13:05, mackrider matst...@gmail.com wrote: What's up? This is really odd. One of my columns (HR) is not sorting properly. It is sorting as if there's a decimal point. Please go to http://toiletsurvey.com/free-agents/ and on the first table sort by HR. It sorts the numbers as such: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 10 10 13 13 2 2 2 2 20 24 27 31 4 6 7 7 8 8 Which leads me to believe for this one column, it's treating the numbers as if there's a decimal after the first digit. If I hadd a zero to the cells it sorts properly. I don't want to resort to using leading zero's especially because the numbers can be in triple digits under certain circumstances. Please help! Thanks, Mack -- View this message in context: http://old.nabble.com/All-of-my-columns-are-sorting-fine%2C-except-one%21--It-is-acting-as-if-there%27s-a-decimal-point%21-tp27378273s27240p27378273.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/Tablesorter%3A-All-of-my-columns-are-sorting-fine%2C-except-one%21--It-is-acting-as-if-there%27s-a-decimal-point%21-tp27378273s27240p27380113.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Re: tablesorter line numbers
It'd be cleaner to have this a widget. For the direct matter, give your row a class, remove rows of that class, then append it again as part of the function. aquaone On Mon, Jan 25, 2010 at 19:59, jay jjpri...@gmail.com wrote: Is there any way to get the following code to refresh after every sort? The $(#myTable).each(function(){numbers it, and if I replace it with $(#myTable).bind(sortEnd,function(){ it just adds a new numbered row after every sort (three sorts gets you three columns of numbers). -- $(document).ready(function(){ $(#myTable).each(function(){ if($(this).is('table')){ $('thead th:first-child, thead td:first-child', this).each (function(){ if($(this).is('td')) $(this).before('td#/td'); else if($(this).is('th')) $(this).before('thItem/th'); }); $('tbody td:first-child', this).each(function(i){ $(this).before('td'+(i+1)+'/td'); }); } });
Re: [jQuery] Announce: jQuery Tablesorter 2.0.2 Released
only with using a 2 table hack (one only shows thead, one only shows tbody) and a linked sort trigger... it's a dumb hack but it works. if you're looking for that kind of functionality natively, try one of the other table/grid plugins out there. aquaone On Tue, Jan 5, 2010 at 02:49, Binod K M binod.e...@gmail.com wrote: Hi All, Have any one come up with the fixed header and scrollable rows with tablesorter plugin? Please let me know !!! Thanks in Advance Binod Steffan A. Cline wrote: on 3/14/08 7:17 AM, Christian Bach at christian.b...@polyester.se wrote: Hi list! I finaly got some time to work on tablesorter, here are the main changes in for version 2.0.2 General * Added support for the new metadata plugin * Added support for jQuery 1.2.3 * Added support for decimal numbers and negative and positive digits * Added new Minified version of tablesorter * Updated documentation and website with new examples * Removed packed version. Bug fixes * Sort force (Thanks to David Lynch) Get it all at http://tablesorter.com http://tablesorter.com/ Enjoy! Ps. If you feel that your wish didn't come true with this release, please email me a patch and i will review and add it. Have you thought of or made a means of making the header in a fixed position and the rows scrollable? I like the way the Ext.js does it but for some reason I get further with jQuery than Ext.js Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- -- View this message in context: http://old.nabble.com/Announce%3A-jQuery-Tablesorter-2.0.2-Released-tp16052470s27240p27026571.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Help with dynamicaly created table
You need to trigger the update event for the table for tablesorter to rebuild the cache. At the bottom of your .delete_button click function, add $(#shop_list).update(); and it should fix your problems. For more information, please see http://tablesorter.com/docs/example-ajax.html. aquaone On Fri, Jan 1, 2010 at 18:18, Jahvi javie...@gmail.com wrote: Hi, Im currently using the tablesorter plugin to style a table im using, the code is the following: $(document).ready(function(){ $(#shop_list) .tablesorter({widthFixed: true, widgets: ['zebra'], headers: { 2: { sorter: false }, 3: { sorter: false } } }) .tablesorterPager({container: $(#pager)}); }); As you can see it applies the plugin to the table id 'shop_list' and works fine on page load, I also have buttons on each record of the table that deletes them: $('.delete_button').live('click', function() { var id = $(this).attr(id).split(_); var id_store= id[1]; jConfirm('Delete store?','Confirm', function(r) { if (r==true){ $('#async_div').load('store.async.php? async=4id_store='+id_store); //Delete store $('#table_div').load('store.async.php? async=1'); //Update Table } }); }); store.async.php contains all the php functions for that page and its working fine the problem is that when the table updates with the deleted record off the tableSorter plugin doesn't reapply. I've tried playing with the live function but I havent been able to make it work. Is there any way to do it? Or a better way to update the table without reloading it? Thanks in advance!
Re: [jQuery] how to get current sort order from tablesorter plugin?
I believe tablesorter's internal sort is stored under config.sortList for the table DOM element. It's a multidimensional array of column indices and sort direction, e.g. [[2,0][0,1]]. aquaone On Wed, Dec 23, 2009 at 15:46, vcohen vco...@irvinecompany.com wrote: I'm just starting to use Christian Bach's excellent TableSorter plugin, and I need to get a column's current sort direction. I have several columns: ID Name Category ID and Name are set to non-sortable using headers:{ 0: {sorter: false}, 1: {sorter: false} } I'm adding a click handler on Name so that it fires the sort event on the Category column. Using the example Sort table using a link outside the table (http://tablesorter.com/docs/example-trigger-sort.html), I'm able to get the Name header to fire the Category sort -- but it's hard-coded to sort in one direction. How can I get it to look at the current direction the Category column is currently sorted, and sort in the opposite direction? (I can handle flipping the values; since the sort order is 0 or 1, I can XOR the value to get the opposite, like var sort; sort ^= sort; -- my question is how to get the current value. Here's the code that currently sets the click handler on the Name column: $(#nameCol).click(function() { var sorting = [[2, 0]]; /* sort 3rd col (Category) descending */ $(#SearchResults).trigger(sorton, [sorting] ); /* SearchResults is the ID of the soertable table */ return false; /* cancel default link action on a#nameCol */ }); Cross-posting this to StackOverflow, as well... Thanks! - Val -- View this message in context: http://old.nabble.com/how-to-get-current-sort-order-from-tablesorter-plugin--tp26908861s27240p26908861.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Meta question about this newsgroup
Providing a link to a live site or using a pastebin type site (e.g. http://jsbin.com/) is likely your best bet. aquaone On Tue, Dec 22, 2009 at 10:30, eleven leovange...@gmail.com wrote: Hello, I am new to this Google Group, so forgive me if this is the wrong place to ask this question. I use jquery in a new web application i am developing, and all is going well (using jquery, jquery-ui and jqgrid). The question i have is about representing code in topics in this group. All items I saw contain code that is not preformatted. I would like to be able to do this in my future posts. Any ideas? Regards, Eleven.
Re: [jQuery] odd sorts from tablesorter with commas in the numbers
It doesn't expect numbers to have commas. You need to use your own parser. e.g. // custom parser $.tablesorter.addParser({ id: commaNum, is: function(s) { return /^[\d-]?[\d,]*(\.\d+)?$/.test(s); }, format: function(s) { return s.replace(/,/g,''); }, type: 'numeric' }); On Tue, Dec 8, 2009 at 13:36, Madog ernest.grend...@gmail.com wrote: Hi I am getting odd sorts from tablesorter with commas in the numbers 11,466 11,466 3,673 3,690 4,349 for example, as will as grouping if some of the numbers in the column have a comma and other do not. Maybe the same type of grouping from the 11,466 and 3,673 not sure?? Does anyone know of a work around for this type of behave?? Thx Erny ernest.grend...@gmail.com
Re: [jQuery] Newby question - jquery tablesort demo 2 (forgot link to my site)
You're invoking tablesorter twice. Just keep the second line. script type=text/javascript $(document).ready(function() { $(#tablesorter).tablesorter(); $(#tablesorter).tablesorter( {sortList: [[0,0], [1,0]]} ); }); /script aquaone On Mon, Dec 7, 2009 at 13:25, Don Moore donsmo...@gmail.com wrote: Hello all, I'm an experienced LAMP developer and I am having trouble getting the tablesort demo working. http://tablesorter.com/docs/ I hope this is the correct list to be asking this - if not please advise. I have been attempting to get this to work for a couple hours and the instructions appear to be incorrect and out of date. I am just trying to get the sample table to work with sorting. I have been able to figure out that there is a css for the styles. This seems like a very cool tool - Everyone could probably use it but I cant seem to get it to work. Sometimes it will sort but not both ways (will sort asecneding only not asc/desc) Sometimes the little arrows will show up sometimes not. Its driving me nuts trying to figure this out. Also it looks different in chrome and ie on my test but not on his site. Anyone know about this? Any input will be greatly appreciated. here is my best attempt so far: http://www.donsmoore.com/jquery/test2.php Thanks don
Re: [jQuery] tablesorter + AJAX
try: $('#mainContent').html(data).find('#ratesTable').tablesorter(); On Mon, Nov 9, 2009 at 20:38, sumdog sum.not...@gmail.com wrote: Hey there, I've read through several AJAX+tablesorter posts and am still a little confuzzled on this. I am loading an entire table into a div like so: div id=mainContent pLoading.../p /div script type=text/javascript $(document).ready( function() { $.get('/ajaxRates',{}, function(data) { $('#mainContent').html(data); $('#ratesTable').tablesorter(); }); }); /script The /ajaxRates URL returns the HTML table. I place it into the div using the function right after it. I then call that new table and apply tablesorter() to it. If I do this to an inplace table, it works fine. It's just the AJAX table I'm having trouble with. The new table should be fully in the DOM by the time that function returns correct? Is there some other event I need to wait for or attach somehow in order to get this to work correctly? Thanks Sumit Khanna http://penguindreams.org -- View this message in context: http://old.nabble.com/tablesorter-%2B-AJAX-tp26278194s27240p26278194.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Delay keyup
use clearTimeout and setTimeout w/ callbacks. e.g. from my tablefilter code: // bind text entry $(input, $trInput).each( function(){ $(this).keyup( function(){ var input = this; var timerCallback = function(){ filter( input, cache, $table[0] ); }; clearTimeout( timer ); timer = setTimeout( timerCallback, filterConfig.timerWait ); return false; }); }); On Tue, Oct 20, 2009 at 13:13, wheatstraw psurr...@gmail.com wrote: Hello In the following code, I would like it delay the keyup. Does anyone have an idea? $(#search_query).bind(keyup, function(e){ $(#quickresults).slideDown(fast); $.post(http://www.wesbite.com;, {search_query: $(e.target).val()}, function(result_list){ $(#quickresults *:not(h3)).remove(); $(#quickresults).append(result_list); }); });
[jQuery] Re: Color based on table data
There was a plugin for this that Josh Nathanson wrote a while back called heatcolor (http://www.jnathanson.com/blog/client/jquery/heatcolor/index.cfm). I have a modified version I use locally that addresses stepping and wrapping that I could send to you if you wish (I e-mailed Josh but never received a reply). aquaone On Tue, Oct 13, 2009 at 10:31, Chris caw1...@gmail.com wrote: I have a table of data brought in through lift and in it is a status column. I am wondering if there is an easy way to color a row based on the contents of that column. Any status of broken was red, edited was yellow and finalized was green. It seems like I could write a widget for doing this, but I don't know how it would work and have little experience with creating my own widgets.I don't think linking any of my code would really help the cause, but here is the initialization which includes functions for mouseover color changes. script type=text/javascript $(document).ready(function() { // Adds over class to rows on mouseover $(.tablesorter tr).mouseover(function(){ $(this).addClass(rowHover); }); // Removes over class from rows on mouseout $(.tablesorter tr).mouseout(function(){ $(this).removeClass(rowHover); }); $('.tablesorter selectThisRow').click(function() { $(this).parent('tr').addClass('selected'); }); $(#claims).tablesorter( { sortList:[[4,0],[6,0]], widgets: ['zebra'], headers: { 0: { sorter: false }, 1: { sorter: false }, 2: { sorter: false }, 3: { sorter: false }, 5: { sorter: false }, 7: { sorter: false }, 8: { sorter: false } } }) .tablesorterPager({container: $(#pager)}); }); /script I'm working with scala and lift as well so I'm bringing in the table data from a database when the page loads. Any advice would be helpful here, whether you think a widget is how to make the colors adjust, or creating more JS functions for doing it. Thanks in advance, Chris
[jQuery] Re: listnav functionality applied to tables -- is this possible?
Haven't done anything like that yet. You want it in the URI, not in cookies? Hm, may take some time to make sure the page isn't jumpy. aquaone On Fri, Sep 11, 2009 at 14:07, J. Bobby Lopez bobby.lo...@gmail.com wrote: Aquaone, Like your tablefilter implementation, much simpler than some of the others I've seen. I'm trying to find a way to save (bookmark?) the page with the filters, so that I can come back to the page later with the same filters already in place. Have you done any work in that direction already? Thanks, Bobby On Aug 31, 2:41 pm, aquaone aqua...@gmail.com wrote: like this?http://bluemoon.reverse.net/~aquaone/tablefilter/http://bluemoon.reverse.net/%7Eaquaone/tablefilter/ feel free to grab it. not sure when i'll have the time to finalize it but it's quite full-featured at present. aquaone On Mon, Aug 31, 2009 at 09:07, wshawn sh...@sanityllc.com wrote: I am curious if the devs would be interested in making this same functionality work with tables. I would be interested in seeing similar functionality available via listnav for the first td of a tr. Essentially, grabbing the first character, as a reference for filtering only that later from the nav bar. as you are currently doing for ul/ol and li tags. I have already accomplished this via ajax, but I believe using the concepts in this listnav would reduce overall server load. I am currently using tablesorter to handle a php/ mysql return. I would like to see your plugin filter what table sorter is having to deal with. Any ideas if this is indeed something you would be interested in working on?
[jQuery] Re: jQuery select where attribute ID less than
Then use indexes from the parent and :lt ( http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code: http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: jQuery select where attribute ID less than
*http://www.w3.org/TR/html4/types.html#type-id ID* and *NAME* tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.). On Tue, Sep 1, 2009 at 14:44, Namir namiras...@hotmail.com wrote: Thats a very smart way of doing it. Thanks a lot. Also why is it invalid to start an ID as a number? I'm not receiving any errors by doing it. Should I instead set a custom attribute called msg_id and use that? On Sep 1, 10:21 pm, James james.gp@gmail.com wrote: It doesn't matter if they're missing IDs. You don't need the IDs. (Also, IDs cannot begin with a number. It's not valid.) All you need to know is how many new messages you received on your latest update (to determine how many old ones to remove), and your maximum number of messages to display at once. That is enough info to do what you want. On Sep 1, 11:07 am, Namir namiras...@hotmail.com wrote: wouldnt work, even if I set the index to count the number of messages and subtract 20 and index those as sometimes there may be missing ID's as they may have been deleted. On Sep 1, 9:59 pm, James james.gp@gmail.com wrote: Try using just: $(span.message:lt(100)) If you want to remove elements that are on the bottom, you may want to use gt() instead of lt(). For example, suppose your code looks like: span class=message id=msg5test/span // index 0 span class=message id=msg4test/span // index 1 span class=message id=msg3test/span // index 2 span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 Doing: $(span.message:gt(2)).hide(); will hide: span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 because they have index greater-than 2. On Sep 1, 10:16 am, Namir namiras...@hotmail.com wrote: I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt ( http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namir namiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: listnav functionality applied to tables -- is this possible?
like this? http://bluemoon.reverse.net/~aquaone/tablefilter/ feel free to grab it. not sure when i'll have the time to finalize it but it's quite full-featured at present. aquaone On Mon, Aug 31, 2009 at 09:07, wshawn sh...@sanityllc.com wrote: I am curious if the devs would be interested in making this same functionality work with tables. I would be interested in seeing similar functionality available via listnav for the first td of a tr. Essentially, grabbing the first character, as a reference for filtering only that later from the nav bar. as you are currently doing for ul/ol and li tags. I have already accomplished this via ajax, but I believe using the concepts in this listnav would reduce overall server load. I am currently using tablesorter to handle a php/ mysql return. I would like to see your plugin filter what table sorter is having to deal with. Any ideas if this is indeed something you would be interested in working on?
[jQuery] Re: jQuery select where attribute ID less than
id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50, Namir namiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: jQuery select where attribute ID less than
indeed. there's gotta be a better solution than this. if you can't control it and insist on using this method, $(span.class).each(function(){if($(this).attr('id')x){//do something}}); The performance on that will be crap. Please find an alternate solution e.g. .is(':gt'+x) aquaone On Mon, Aug 31, 2009 at 14:47, Josh Nathanson joshnathan...@gmail.comwrote: Any chance of doing what you need to do on the server, rather than the client? Are you stuck with the naming convention you're using, or can you name the spans a little differently or give them different class names to allow for better selection criteria? Given your current situation you'd have to loop through each span as Aquaone said, but I bet you might be able to think of a different way to approach the problem. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Namir Sent: Monday, August 31, 2009 2:33 PM To: jQuery (English) Subject: [jQuery] Re: jQuery select where attribute ID less than Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50, Namir namiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: Clearing a textarea doesn't work in IE6 using val();
why not use .text('') ? aquaone On Mon, Aug 31, 2009 at 17:54, reach4thelasers kev.m.mul...@googlemail.comwrote: I've just tested it using IETester from http://www.my-debugbar.com/wiki/IETester/HomePage and it does work. However using the Xenobank IE6 browser from http://www.xenocode.com/Browsers/ it doesn't work, throwing the afforementioned error. Anyone know whether it works in an actual version of IE6?
[jQuery] Re: Cannot get columns with rowspan to not be included in sorting (Tablesorter 2.0)
tablesorter.com is the up-to-date site for the source. On Fri, Aug 21, 2009 at 10:53, Robert H. rhor...@rim.com wrote: (Going to post this Here since JQuery Plugins seems Dead) Hello, I've been working on getting a table with a super header and sub headers to only sort by the sub headers. The example at http://lovepeacenukes.com/tablesorter/2.0/docs/ shows this is possible but everytime I try to run the code the items in the top row are used to sort columns starting with 0. I've tried two different versions of jquery and re-downloaded Tablesorter twice now. It seems as if this should be easy and I'm just missing some amazingly simple thing. Code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/ TR/html4/strict.dtd http://www.w3.org/%0ATR/html4/strict.dtd html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 titleRow Span/title link type=text/css href=style.css rel=stylesheet / script type=text/javascript src=jquery-1.1.3.js/ script script type=text/javascript src=jquery.tablesorter-dev.js/ script /head body table class=tablesorter id=rowspan cellspacing=0 thead tr th rowspan=2Name/th th colspan=2General information/th th colspan=4Degree information/th /tr tr thMajor/th thGender/th thEnglish/th thJapanese/th thCalculus/th thGeometry/th /tr /thead tbody tr tdStudent01/td tdLanguages/td tdmale/td td80/td td70/td td75/td td80/td /tr tr tdStudent02/td tdMathematics/td tdmale/td td90/td td88/td td100/td td90/td /tr tr tdStudent03/td tdLanguages/td tdfemale/td td85/td td95/td td80/td td85/td /tr /tbody /table script type=text/javascript $(document).ready(function() { $(#rowspan).tablesorter(); }); /script /body /html Thank you for your time, Robert
[jQuery] Re: Tablesorter dates
It would likely be much less work to change the dates to match a standardized numeric format than to write your own parser. The performance would likely be better as well. If this is not an option, let me know the full date format (I'm not even seeing a year in this) and the language being used, so that I can construct a month array. Again, I would prefer not to do such a thing... but if support is needed I can help. aquaone On Fri, Aug 14, 2009 at 02:08, badtant badt...@gmail.com wrote: Hi! I'm using this plugin http://tablesorter.com/docs/ but have some trouble with sorting my dates. I want to have them show like this: 12 januari 29 januari 12 april 29 april 12 maj 29 maj I've figured I probable need to write a new parser for this but I'm not quite sure how. Anyone good at this that can help? Thanks Niklas
[jQuery] Re: Tablesorter plugin - grouping rows and sorting per group?
I'm sure you can look at the code and find a way to get it working in the general case. What's there was just kinda a quick and dirty hack I wrote for another guy a while ago. I'll leave it as an exercise for the reader though. ;-) aquaone On Wed, Aug 5, 2009 at 14:16, Crazy Serb crazys...@gmail.com wrote: A-ha! That's pretty much what I'd need... Now, is there any slick way of repeating that over and over for different tables (with class names of multisort1, multisort2, etc) in case I have a few of these multi-sort tables on the same page and need to keep them separate? Or would I pretty much have to rewrite that logic and change the class name(s) to the new table's class name every time? Just out of curiosity... Thanks again! On Aug 4, 5:02 pm, aquaone aqua...@gmail.com wrote: Tablesorter doesn't support that. You could do it as separate tables with no gaps between them... but that's as close as you'll get. If you need linked sorting, e.g. clicking the header of one table sorts all tables, you'll need something like this: script type='text/javascript' language='JavaScript' $(document).ready( function(){ $(table.tablesorter).tablesorter(); var $multisort = $(table.multisort); $multisort.addClass( multisort_unsorted ); $multisort.bind( sortStart, function(){ $(this).removeClass( multisort_unsorted ); }); $multisort.filter( .multisort_unsorted ).bind( sortEnd, function(){ var sortOrder = [ this.config.sortList ]; // get sort order $multisort.filter( .multisort_unsorted ).removeClass( multisort_unsorted ).trigger( sorton, sortOrder ); setTimeout( function(){ $multisort.addClass( multisort_unsortedd ); }, 0 ); // avoid retriggering }); }); /script /head body table class=tablesorter multisort thead tr thcol 1/th thcol 2/th thcol 3/th /tr /thead tbody tr td1/td td10/td tdbeef/td /tr tr td1/td td6/td tdsausage/td /tr tr td-3/td td12/td tdham/td /tr tr td-3/td td6/td tdbeef/td /tr tr td4/td td7/td tdpork/td /tr tr td4/td td7/td tdbeef/td /tr /tbody /table table class=tablesorter multisort thead tr thcol 1/th thcol 2/th thcol 3/th /tr /thead tbody tr td11/td td4/td tdpork/td /tr tr td12/td td3/td tdham/td /tr tr td10/td td1/td tdsausage/td /tr tr td4/td td7/td tdpork/td /tr /tbody /table table class=tablesorter multisort thead tr thcol 1/th thcol 2/th thcol 3/th /tr /thead tbody tr td7/td td-2/td tdturkey/td /tr tr td4/td td7/td tdpork/td /tr tr td20/td td-10/td tdbeef/td /tr tr td17/td td6/td tdfish/td /tr /tbody /table On Tue, Aug 4, 2009 at 11:57, Crazy Serb crazys...@gmail.com wrote: In using Tablesorter plugin, I have run into an challenging issue. What I am looking to do is group certain rows in a single table into two different groups, have a blank row between them and be able to sort based on columns that apply to both groups of rows but without the rows from one group actually mixing with the rows from another group. So, basically, I want to have a table like this: TABLE: Group 1 Row 1 Group 1 Row 2 Group 1 Row 3 Group 1 Row 4 - blank row - Group 2 Row 1 Group 2 Row 2 Group 2 Row 3 So any re-sorting on any of the columns would sort the top 4 rows amongst themselves, keep the blank row after that 1st group and then resort the bottom 3 rows amongst themselves too, without any intermingling and mixing of the two groups of rows. Is this possible at all, with some modifications or custom plugin/ code? How would I go about putting this together if so? Thanks!
[jQuery] Re: Need help with table sorter
tfoot http://www.w3schools.com/tags/tag_tfoot.asp On Fri, Jul 31, 2009 at 07:36, Razor M haxor1...@gmail.com wrote: Is it possible to do some changes so that the bottom row will not be included while doing the sorting? Suppose I have totals in the bottom row, so I do not want that row to be sorted while using the table sorter through jquery. Please let me know if it can be done.
[jQuery] Re: Table sorter 2.0 Date format issue
You need to set the dateFormat property to 'uk'. The default is 'us' which is mm/dd/yy(yy). aquaone On Wed, Jul 29, 2009 at 22:04, subhan md.sub...@gmail.com wrote: Hi, I am using the date format dd/mm/yy but it is not working properly, below is the example how it get sort in ascending order 11/09/2007 25/12/2006 10/01/2008 12/07/2008 13/05/2009 14/06/2009 u can notice that the year 2006 is coming after 2007, any one to help methanks in advance -- View this message in context: http://www.nabble.com/Table-sorter-2.0-Date-format-issue-tp24719579s27240p24719579.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: TableFilter Issue
AFAIK there is no option to do that. You could edit the code (in theory) to remove it but I do not believe an option to omit it exists. On Mon, Jul 20, 2009 at 03:33, jazz bharathbhooshan.amb...@gmail.comwrote: Hi Folks, i am using table filter. http://ideamill.synaptrixgroup.com/jquery/tablefilter/tabletest.htm i want to disable the Menu option...how to do this. Regards, Bharath
[jQuery] Re: tablesorter not sorting numbers correctly
Last I checked *sym link* wasn't a number. ;-) aquaone On Thu, Jul 16, 2009 at 09:51, Ian Stokes-Rees ijsto...@alumni.uwaterloo.ca wrote: tablesorter isn't sorting numbers correctly. I have the latest jQuery (1.3.2) and tablesorter (2.0.3). from http://abitibi.sbgrid.org/: script type=text/javascript src=/js/jquery-latest.min.js/ script script type=text/javascript src=/js/ jquery.tablesorter.min.js/script I am turning on tablesorter on *all* tables using: $(document).ready(function() { $(table).tablesorter(); }); Then my tables have no other class or id attributes. I simply use thead/tbody and th elements. You can see an example here: http://abitibi.sbgrid.org/cgi/du.py/opt/osg-local Suggestions regarding how to correct this would be greatly appreciated. Ian
[jQuery] Re: Search Functionality in DataGrid
I've got an incomplete but working project you can use: http://bluemoon.reverse.net/~aquaone/tablefilter/ On Tue, Jul 7, 2009 at 02:54, jazz bharathbhooshan.amb...@gmail.com wrote: Hi Folks, I want search functionality in the grid..i found one link but it is in php...but i donno php :-( i want it in jsp.. Here is the link: http://trirand.com/jqgrid/jqgrid.html#. in this there is a take any exampel which contains search records..it is really very nice. please sort out my problem.. one more link i got for grid but it does nt have the functionality of searching another link:http://tablesorter.com/docs/index.html#Examples can anybody help me in this. Regards, Bharath
[jQuery] Re: Select List With Multiple Selections Hack
What does this have to do with jQuery? O_o What you're talking about is basic PHP. On Mon, Jul 6, 2009 at 07:07, Shrimpwagon shrimpwa...@gmail.com wrote: When using a select combo box that has multiple selections enabled, my server was not seeing it as an array. It was only seeing it as a single variable value. All I did to correct this was add [] and the end of the name attribute. Ex. [code]select name=categories[] id=categories multiple=multiple size=4[/code] Now my LAMP server sees this variable as an array in the $_REQUEST Dunno if this is supposed to work like this. Thank you. ~ Shawn
[jQuery] Re: check/uncheck all checkboxes with specific id
As previously stated classes would be better. Also of note, @ in attribute selectors is deprecated, but better yet, input:checkbox (which is faster than simply :checkbox I've been told). Also, if you insist on doing ids instead of class, it'd be better to use the starts withhttp://docs.jquery.com/Selectors/attributeStartsWith#attributevalue method than .each and a substr. On Tue, Jun 30, 2009 at 09:38, evanbu...@gmail.com evanbu...@gmail.comwrote: I want to check all of my checkboxes in my form that have an id that begins with 'chkEvent'. Thanks script language=Javascript type=text/javascript $(document).ready(function() { $(#toggleEvents).click(function(event){ $('inp...@type=checkbox]').each( function() { // Begin this is where I am lost if($(this).id()=='chkEvent*') // End this where I am lost this.checked = !this.checked; }); }); }); /script a href=# id=toggleEventsToggle Events/a form method=post action= input type=checkbox value=EventAcceleratedOptionVesting id=chkEventAcceleratedOptionVesting / input type=checkbox value=AccountingChanges id=chkEventAccountingChanges / input type=checkbox value=AnnualMeetingChanged id=chkEventAnnualMeetingChanged / input type=checkbox value=AssetSalePurchase id=chkEventAssetSalePurchase / input type=checkbox value=AuditorChange id=chkEventAuditorChange / /form
[jQuery] Re: Potential blind sql injection vulnerability with Superfish JS?
How is Javascript going to do a SQL injection ? On Fri, Jun 19, 2009 at 08:16, NationPress i...@nationpress.com wrote: The client we're building a site for recently had a server wide scan done by SecurityMetrics.com for PCI compliance. This was required by their banks commercial credit card service. The report came back with a Possible blind sql injection vulnerability warning level 4 out of 7 for the Superfish menu javascript. Anything 4 and above keeps them out of compliance. This file is for the Superfish menu. Is there a workaround for this potential issue?
[jQuery] Re: tablesorter doesn't do anything, it doesn't show up, it doesn't create an error. Nothing.
Are you sure it's not working? Often people haven't included the accompanying CSS and don't realize that it is working -- They just don't see the changes because they didn't include the CSS. aquaone On Thu, Jun 11, 2009 at 11:06, sso strongsilent...@gmail.com wrote: I've used tablesorter before. I know its not intended to be complicated, so I assume I'll want to slap myself when I figure out how simple the problem was. when I put other functions in my document.ready they work fine. from the head tag: script type=text/javascript src=js/jquery-1.2.6.min.js/ script script type=text/javascript src=js/jquery-treeview/ jquery.treeview.js/script script type=text/javascript src=js/jquery.tablesorter.min.js/ script script type=text/javascript src=js/ jquery.tablesorter.pager.js/script script type=text/javascript $(document).ready(function(){ $(#myresults).tablesorter(); }); /script From the body: table id=myresults tr td1/td td2/td td3/td /tr tr td1/td td2/td td3/td /tr tr td1/td td2/td td3/td /tr tr td1/td td2/td td3/td /tr /table
[jQuery] Re: When is jQuery available?
No, putting it locally will most likely slow down your application. The browser limits the number of simultaneous fetches per hostname. Additionally, retrieving from a centralized location used by other sites increases the probability it will be cached by the browser. http://developer.yahoo.com/performance/rules.html aquaone On Sat, May 23, 2009 at 11:08, waseem sabjee waseemsab...@gmail.com wrote: Hi There here is tip. instead of using the jquery library script from another URL you should download it and possibly put it on your FTP ( if online ) or filesystem ( if offline) that will really sped the scripts load time up secondly this is how I test for jquery script alert(this is a standard alert); // this alert will fire as the page opens $(function() { alert(The DOM has now completely loaded); // this alert will only fire when the page is fully loaded // if this alert does not fire jquery is not defined }); /script On Sat, May 23, 2009 at 12:58 AM, intrader intra...@aol.com wrote: I am having a problem when loading jSquey from the Google CDN as follows:script src=http://ajax.googleapis.com/ajax/libs/jquery/ 1.3.2/jquery.min.js/script!-- does not work --. I have verified that the URL is correct and ir used in IE, the library is downloaded. I have used in in a site that does not require proxy, and it works fine. Otherwise the code !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head titlejQuery AOP Test/title link rel=stylesheet type=text/css media=screen href=test.css / script src= http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/ jquery.min.js/script!-- does not work -- !-- script src=jquery-1.3.2.js/script --!-- works -- script if(typeof(jQuery)!=undefined){ alert('jQuery available'); }else{ alert('jQuery not available yet'); } /script script src=../src/aop.js/script script src=test.core.js/script script function Init(){ alert('Init starting'); jQuery.aop.after({target:document,method:'getElementById'},function (){alert('Advice for getElementById called');}); var a=document.getElementById('tblError'); } /script /head body onload='Init();' script $(document).ready(function() { alert('Document is ready'); }); /script div id='tblError'pmy error table/p/div /body /html reports jQuery not availale yet and the rest is history as aop.js and the code needs jQuery to be loaded If I use script src=jquery-1.3.2.js/script --!-- works -- locally it works fine. So the question is qhen is jQuery available? I am running in IR8. I have finddled with all the security settings to no avail In Firefox, it just works. Thanks for your help WHat is going
[jQuery] Re: tablesorter bug? How can I use tablesorter plugin to sort float?
You will need to write your own custom parser. The numeric sorter won't detect nor handle scientific notation. aquaone On Thu, May 21, 2009 at 20:22, devdoer devdo...@gmail.com wrote: HI: I found tablesorter plugin failed to sort the float if the float is in scientific notation? Eg. the tablesorter asc sorted result of float list is : [ 7e-06,4e-05,0.051116,0.00518,0.0].
[jQuery] Re: tablesorter plugin help -- getting it to ignore quotation marks
You'll need to write a custom parser. For detection tell it to look for your quote characters at start and end with string characters between. For cache population, use regex to strip the quotes. aquaone On Thu, May 21, 2009 at 22:04, clorentzen carl.lorent...@gmail.com wrote: I'm using the tablesorter plugin, and have run into a small issue I can't figure out how to solve: One of the columns in my table contains titles, some of which are books, others of which are articles or television episodes. The latter two start with a double quote (#8220;)... So, for example, one cell in the column might be: tdemTitle of Book/em/td while another would be: td#8220;Title of Article#8221;/td Tablesorter seems to be factoring these starting double quotes into the sort order for that column, so I end up with a list that is titles without quotes alphabetically first, and then titles with quotes alphabetically second. Is there any way I can get it to ignore the double quote, so that sorting on the column always goes by the first actual letter of the text? Thanks a bunch for any help.
[jQuery] Re: select all a elements whose class attribute does not contain 'myclass'
*= in attribute selectors is useful for when something contains a string. If you explicitly want anchors with a named class, select by the class instead, e.g. $(a.myclass). If you wanted anchors that did not have a specific class, $(a:not(.myclass)). If you explicitly want all anchors where the class attribute does not contain the string myclass (which sounds very odd) you would use $(a:not([class*=myclass])). I'd highly recommend spending some time reading the selectors page, http://docs.jquery.com/Selectors. aquaone On Wed, May 20, 2009 at 17:06, jonathan topcod...@gmail.com wrote: $('a[class*=myclass]') selects all a elements whose class attribute contains 'myclass', how do I do the opposite?
[jQuery] Re: Using a selector recursively
$(test) should be $(#test). aquaone On Wed, May 20, 2009 at 17:44, sean shaha...@gmail.com wrote: I have the following code: div id=test div class=ajaxApplyIgnore spana href=javascript:ajaxApplyAll(); class=Test1/a/ span /div div spana href=/Logout class=Logout/a/span /div /div script var obj = $('test'); // used specific div, as this is in a huge document obj.find('.ajaxApplyIgnore a').addClass('red'); /script The js code above will not select the Test1 link, even though it is found within the div layer with the ajaxApplyIgnore class. It seems that the selector does not work recursively. Does anybody know how to make the script work recursively this? NOTE: I am using Safari 3.
[jQuery] Re: Question about jQuery's filter ability
I know of two possibilities off the top of my head. The first is a shameless plug for my own plugin still in development: http://c3p0.reverse.net/~aquaone/tablefilter/http://c3p0.reverse.net/%7Eaquaone/tablefilter/. Check it out and let me know if it would meet your requirements. The second would be using the uiTableFilter pluginhttp://gregweber.info/projects/uitablefilterwith some wrapping. aquaone On Wed, May 20, 2009 at 13:29, brady brady.god...@gmail.com wrote: I developed a fairly straightforward product filtering tool using Spry and was curious if jQuery could do something similar and if so where I might find an example. The tool can be seen here: http://www.bradygodwin.com/test/rnatoold.html Thanks!
[jQuery] Re: Using a selector recursively
That works, yes, but it would create a new jQuery object, defeating much of the purpose of him creating 'obj' in the first place (memory and processing time of creating new jQuery object). As an aside, many devs find it useful to prefix vars for jQuery objects with $. e.g. var $obj = $(#test); aquaone On Thu, May 21, 2009 at 11:26, waseem sabjee waseemsab...@gmail.com wrote: There was no need to use find() $(function() { }); would be required from jquery (.myclass, obj) is select my class from within my object ( no need to use .find() ) script $(function() { // you need this var obj = (#test); // object refference $(.ajaxApplyIgnore , obj).addClass(red); // select the element in our refference }); // you need this /script On Thu, May 21, 2009 at 8:11 PM, aquaone aqua...@gmail.com wrote: $(test) should be $(#test). aquaone On Wed, May 20, 2009 at 17:44, sean shaha...@gmail.com wrote: I have the following code: div id=test div class=ajaxApplyIgnore spana href=javascript:ajaxApplyAll(); class=Test1/a/ span /div div spana href=/Logout class=Logout/a/span /div /div script var obj = $('test'); // used specific div, as this is in a huge document obj.find('.ajaxApplyIgnore a').addClass('red'); /script The js code above will not select the Test1 link, even though it is found within the div layer with the ajaxApplyIgnore class. It seems that the selector does not work recursively. Does anybody know how to make the script work recursively this? NOTE: I am using Safari 3.
[jQuery] Re: Plugin Best practices?
http://developer.yahoo.com/performance/rules.html ^^ highly recommended reading. aquaone On Thu, May 21, 2009 at 13:10, Donkeybob rip...@gmail.com wrote: I use three or four jquery plugins for a site. What's the best practice in loading all of these files and how much does it slow down an app? Do you reference them from another file to keep the page code clean? Just a couple of questions to find out about . . . . Thanks, Rich
[jQuery] Re: Using a selector recursively
It works fine for me. Does your actual script block contain a $(document).ready(function(){ ... }); ? On Thu, May 21, 2009 at 16:49, sean shaha...@gmail.com wrote: I forgot the '#' sign in the sample code I provided. The problem I am having is that the code does not work. For some reason, If i remove the span tags, it works, but keeping them in makes it not work.
[jQuery] Re: Exclude single td from whole tr
Either you can bind to the td's that don't contain the checkbox or you can delegate and check the target of the clicked event to make sure it's not the td that has the checkbox. The former would be $(tr[link] td:not(:has(:checkbox))) I believe, and is the easiest. Hopefully others can chime in about which is best or perhaps yet another solution. aquaone On Tue, May 19, 2009 at 07:45, heohni heidi.anselstet...@consultingteam.dewrote: I found a good solution to make a complete table row clickable: tr link=/folder/here.php. $(tr[link]).bind(click, function(){ var link = $(this).attr(link); window.location.href = link; }); Only problem in my case: My tbale has as first td a checkbox to select my products. How can I change the jquery above to exclude a td containing a input type=checkbox? Is there a way? Thanks!!
[jQuery] Re: help using parent()
A div will never be a parent of a td. It will be an ancestor but not a direct parent. .parents() http://docs.jquery.com/Traversing/parents#exprwill look for ancestors. In other news, please use classes on your divs instead of pattern matching the id. It's better for a variety of reasons. aquaone On Tue, May 19, 2009 at 10:46, elubin elu...@yahoo.com wrote: I am trying to find the div parent of a td tag. In the following code, I do not understand why the alert shows 0 instead of 1?? script type=text/javascript $(function(){ var x = $('#row_3'); var y = x.parent('div[id^=idSection_]'); alert( y.length ); }); /script div id=idSection_A style=display: block; tabletrtd id=row_1eric 1/td/tr/table /div div id=idSection_B style=display: block; tabletrtd id=row_2eric 2/td/tr/table /div div id=idSection_C style=display: block; tabletrtd id=row_3eric 3/td/tr/table /div
[jQuery] Re: Applying Table Row Sorter to Multiple Tables
this may be what you guys are looking for? dunno, haven't tested it much... I'm sure there's a better way of doing this... but it seems to work. just add a multisort class to every table you want linked. var $multisort = $(table.multisort); $multisort.addClass( msUnsorted ); $multisort.bind( sortStart, function(){ $(this).removeClass( msUnsorted ); }); $multisort.filter( .msUnsorted ).bind( sortEnd, function(){ var sortOrder = [ this.config.sortList ]; // get sort order $multisort.filter( .msUnsorted ).removeClass( msUnsorted ).trigger( sorton, sortOrder ); setTimeout( function(){ $multisort.addClass( msUnsorted ); }, 0 ); // avoid retriggering }); stephen On Wed, May 13, 2009 at 10:01, christopherious christopheri...@gmail.comwrote: Wow, the idea of sorting multiple tables at the same time is interesting. I may check that out, too. Hah, I only just now realized that I totally misunderstood your original post! My users need this because they work with the same data on multiple tables, and don't want to apply sorts on a table-to-table basis. Just need to see a real-world example, and I'm all set. The Triggers sortStart and sortEnd example (http://tablesorter.com/docs/example- triggers.html http://tablesorter.com/docs/example-%0Atriggers.html ) was the closest I could find. On May 12, 6:40 pm, David Blomstrom david.blomst...@gmail.com wrote: Please ignore my last question; I found the thread I was looking for. I'll give the various solutions that were offered another try, and if it still doesn't work, I'll put a live example online. Thanks. On Tue, May 12, 2009 at 6:18 PM, David Blomstrom david.blomst...@gmail.comwrote: Wow, the idea of sorting multiple tables at the same time is interesting. I may check that out, too. In the meantime, thanks for the tip, aquaone. I'm now able to place multiple sortable tables on a page. Now I just have to fix one other problem - numerals with commas don't sort properly. I asked about that in another thread and got several responses - none of which worked for me - but I can't find that thread now. Is there a way to find all threads in this group I've started on the Internet? I'm using GMail, and I have a lot of threads to sort through. Thanks. -- David Blomstrom Writer Web Designer (Mac, M$ Linux)www.geobop.org
[jQuery] Re: tablesorter messing with other tables
Tablesorter will sort them like any other content, which may not be what you intend. If you want to be able to nest table structures, another plugin may be better suited. On Mon, May 11, 2009 at 18:21, PaulGCES paulruder...@gmail.com wrote: Hello-- Does tablesorter support nested tables? I'm only trying to sort the outer table, but tablesorter seems confused by tables nested within my td's. Is it a known issue that tablesorter cannot handle nested tables? Many thanks!
[jQuery] Re: Applying Table Row Sorter to Multiple Tables
You should be able to bind to the sortEnd events to force sorting on all tables based on the sort order of that table... On Tue, May 12, 2009 at 16:48, christopherious christopheri...@gmail.comwrote: I share David's requirement to sort globally on the page. When users click a column header for a given table, I want all tables on that page to sort by that column rather than for just the table where the user clicked the header. My JS: script type=text/javascript charset=utf-8 $(document).ready(function() { // extend the default setting to always sort on the first column $.tablesorter.defaults.sortList = [[0,0]]; // call the tablesorter plugin $(table.tablesorter).tablesorter({ widgets: ['zebra'] }); }); /script My table tag: table class=tablesorter cellspacing=1 Thanks in advance. On May 1, 5:39 pm, David Blomstrom david.blomst...@gmail.com wrote: Sorry it took me so long to reply. I thought my posts weren't showing up on this forum. Anyway, thanks for the tip. I understand it now. Unfortunately, it isn't working for some reason. Is there a way to instead designate multiple ID's - like myTable, myTable2 and myTable3? Thanks. On Thu, Apr 30, 2009 at 1:41 PM, aquaone aqua...@gmail.com wrote: IDs are unique for a document. A document containing multiple elements with the same ID is invalid. Use a class instead and invoke tablesorter on all tables with that class. e.g. table class=tablesorter ... /table and $(table.tablesorter).tablesorter({ widgets: ['zebra'] }); On Wed, Apr 29, 2009 at 20:35, David Blomstrom david.blomst...@gmail.comwrote: I'm using jQuery's tablesorter.js to create tables with sortable rows, as applied to tables with the ID myTable. I just wondered if there's a way to make it work with multiple tables on a single page. I created two tables and gave each of them the ID myTable, but only the first table worked. I can't remember if the specific ID is required for my Zebra widget (alternate row colors), too, or not, but I would guess it is. I posted my JS links below, to show you my setup. Thanks for any tips. * * * * * script src=http://MySite/js/jquery-1.3.1.min.js; type=text/javascript/script script src=http://MySite/js/tablesorter/jquery.tablesorter.js; type=text/javascript/script script language=JavaScript type=text/JavaScript $(document).ready(function() { $(#myTable).tablesorter({ widgets: ['zebra']} ); $(#triggerMS).click(function(){ $(#menuMS).show(); return false; }); $(#menuMS).click( function(){ $(#menuMS).hide(); return true; }); $(#triggerReg).click(function(){ $(#menuReg).show(); return false; }); $(#menuReg).click( function(){ $(#menuReg).hide(); return true; }); $(#triggerKids).click(function(){ $(#menuKids).show(); return false; }); $(#menuKids).click( function(){ $(#menuKids).hide(); return true; }); $(#triggerLinks).click(function(){ $(#menuLinks).show(); return false; }); $(#menuLinks).click( function(){ $(#menuLinks).hide(); return true; }); $(#triggerBooks).click(function(){ $(#menuBooks).show(); return false; }); $(#menuBooks).click( function(){ $(#menuBooks).hide(); return true; }); } ); /script -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org -- David Blomstrom Writer Web Designer (Mac, M$ Linux)www.geobop.org
[jQuery] Re: JQuery - Tablesorter - move the last line to firt line
What is meant by this? I'm assuming that a sort is being performed that is forcing that row to move based on the content of the td. If you do not wish content at the bottom of your table to be sorted, why not place those rows in the tfoot instead of in the tbody? stephen On Sun, May 10, 2009 at 06:44, Danielrq.net danie...@gmail.com wrote: Any sugestion? Danielrq.net wrote: Hi guys, We´re use the table sorter script in our systemsbut now we note a problem. After the data load in table...the last line goes to the firt line... You did see this any time? Can help? -- View this message in context: http://www.nabble.com/JQuery---Tablesorter---move-the-last-line-to-firt-line-tp23451697s27240p23470231.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: sorting a table
tablesorter does not support this. You will need to use a different plugin or change the structure of your table (e.g. move the edit functionality to another td in the same tr). On Fri, May 8, 2009 at 19:40, williamstam aws...@gmail.com wrote: each rowhas a row beneath it with a menu part to edit / view the record etc. using css the menu is set to display:none. when a user clicks the record jquery does a .show() on the menu row is it posible to sort the columns preserving the record row and menu row (maybe grouping them with a class or something) the sort to not read the menu row. and if you click on ID / Client / Cm on any of the sections (Display / Classifieds) it sorts that colum for the whole table... so say i click on cm under classifieds it also orders the colum acordingly for display i checked out tablesorter but its not quite working... help? table structure demo http://www.press-store.co.za/store/adbookerv4/tablesorter.asp
[jQuery] Re: JQuery - Tablesorter - move the last line to firt line
... no. tfoot is the same level as thead and tbody. it does not belong inside the tbody. it should be a child of the table. stephen On Mon, May 11, 2009 at 11:52, Daniel Queiroz danie...@gmail.com wrote: I tried to do this Put all rows inside the tbodytfoot/tfoot/tbody but in this case the tablesorter don´t work more and crash the javascript.. :S On Mon, May 11, 2009 at 3:29 PM, aquaone aqua...@gmail.com wrote: What is meant by this? I'm assuming that a sort is being performed that is forcing that row to move based on the content of the td. If you do not wish content at the bottom of your table to be sorted, why not place those rows in the tfoot instead of in the tbody? stephen On Sun, May 10, 2009 at 06:44, Danielrq.net danie...@gmail.com wrote: Any sugestion? Danielrq.net wrote: Hi guys, We´re use the table sorter script in our systemsbut now we note a problem. After the data load in table...the last line goes to the firt line... You did see this any time? Can help? -- View this message in context: http://www.nabble.com/JQuery---Tablesorter---move-the-last-line-to-firt-line-tp23451697s27240p23470231.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- Em 6 dias Deus criou o universo com a aparência de bilhões de anos de existência. OU será que Adão foi criado sendo um bebezinho? Se um homem pode ser criado adulto, o universo também pode...
[jQuery] Re: listnav, but for tables?
alternatively, there's a plugin i'm working on here: http://bluemoon.reverse.net/~aquaone/tablefilter/ On Sat, May 2, 2009 at 00:46, Tor torgeir.ve...@gmail.com wrote: I'm looking for a plugin like the listnav plugin (demo: http://www.ihwy.com/Labs/Demos/Current/jquery-listnav-plugin.aspx), but for tables? I'd like to filter / select rows in a table based on the first letter of one of the rows in the table. The listnav plugin is exactly what I'm after, but it works on ol/ul only, and I need to use it with tables.
[jQuery] Re: Applying Table Row Sorter to Multiple Tables
IDs are unique for a document. A document containing multiple elements with the same ID is invalid. Use a class instead and invoke tablesorter on all tables with that class. e.g. table class=tablesorter ... /table and $(table.tablesorter).tablesorter({ widgets: ['zebra'] }); On Wed, Apr 29, 2009 at 20:35, David Blomstrom david.blomst...@gmail.comwrote: I'm using jQuery's tablesorter.js to create tables with sortable rows, as applied to tables with the ID myTable. I just wondered if there's a way to make it work with multiple tables on a single page. I created two tables and gave each of them the ID myTable, but only the first table worked. I can't remember if the specific ID is required for my Zebra widget (alternate row colors), too, or not, but I would guess it is. I posted my JS links below, to show you my setup. Thanks for any tips. * * * * * script src=http://MySite/js/jquery-1.3.1.min.js; type=text/javascript/script script src=http://MySite/js/tablesorter/jquery.tablesorter.js; type=text/javascript/script script language=JavaScript type=text/JavaScript $(document).ready(function() { $(#myTable).tablesorter({ widgets: ['zebra']} ); $(#triggerMS).click(function(){ $(#menuMS).show(); return false; }); $(#menuMS).click( function(){ $(#menuMS).hide(); return true; }); $(#triggerReg).click(function(){ $(#menuReg).show(); return false; }); $(#menuReg).click( function(){ $(#menuReg).hide(); return true; }); $(#triggerKids).click(function(){ $(#menuKids).show(); return false; }); $(#menuKids).click( function(){ $(#menuKids).hide(); return true; }); $(#triggerLinks).click(function(){ $(#menuLinks).show(); return false; }); $(#menuLinks).click( function(){ $(#menuLinks).hide(); return true; }); $(#triggerBooks).click(function(){ $(#menuBooks).show(); return false; }); $(#menuBooks).click( function(){ $(#menuBooks).hide(); return true; }); } ); /script -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org
[jQuery] Re: Zebra (stripes) Widget vs Colgroups (CSS)
tr style is overriding the colgroup style. Perhaps this diagram will explain it well. http://www.w3.org/TR/CSS21/tables.html#table-layers aquaone On Wed, Apr 29, 2009 at 20:30, David Blomstrom david.blomst...@gmail.comwrote: I'm using jQuery and the Zebra widget to produce alternately colored rows on my tables. It works great but it kills my CSS colgroup functions. For example, the following code... table class=sortphp id=myTable colgroup style=background: #0ff;/colgroup colgroup style=background: #ff0;/colgroup thead ...should produce a table where every cell in the first column is aqua, every cell in the second yellow. But if my Zebra widget dictates that alternate rows are gray and white, then EVERY cell in every row and column is either gray and white. Does anyone know if there's a way to reverse the relationship, so that colgroups trump alternate row colors? It isn't absolutely critical, as I could probably accomplish my goal by simply assigning each cell a class (e.g. td class=red), but I'd prefer to use colgroups for bigger tables. I posted my JavaScript links below. Thanks. * * * * * script src=http://MySite/js/jquery-1.3.1.min.js; type=text/javascript/script script src=http://MySite/js/tablesorter/jquery.tablesorter.js; type=text/javascript/script script language=JavaScript type=text/JavaScript $(document).ready(function() { $(#myTable).tablesorter({ widgets: ['zebra']} ); $(#triggerMS).click(function(){ $(#menuMS).show(); return false; }); $(#menuMS).click( function(){ $(#menuMS).hide(); return true; }); $(#triggerReg).click(function(){ $(#menuReg).show(); return false; }); $(#menuReg).click( function(){ $(#menuReg).hide(); return true; }); $(#triggerKids).click(function(){ $(#menuKids).show(); return false; }); $(#menuKids).click( function(){ $(#menuKids).hide(); return true; }); $(#triggerLinks).click(function(){ $(#menuLinks).show(); return false; }); $(#menuLinks).click( function(){ $(#menuLinks).hide(); return true; }); $(#triggerBooks).click(function(){ $(#menuBooks).show(); return false; }); $(#menuBooks).click( function(){ $(#menuBooks).hide(); return true; }); } ); /script -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org
[jQuery] Re: tablesorter.js vs Numerals with Commas
There are two simple ways of fixing this: having a hidden span or similar element appearing within your td prior to the value or better to define your own parser. e.g. $.tablesorter.addParser({ id: commaNum, is: function(s) { return /^[\d-]?[\d,]*(\.\d+)?$/.test(s); }, format: function(s) { return s.replace(/,/g,''); }, type: 'numeric' }); aquaone (yes, you could use a more precise regex...) On Wed, Apr 29, 2009 at 20:41, David Blomstrom david.blomst...@gmail.comwrote: I'm using jQuery's tablesorter.js to create tables with sortable rows. It works fine on both text and numerals - but only if they have no commas. For example, the following column would sort properly: 2 18 401 3 15 But this column... 1,200 408 26,048 ...would sort like this: 1,200 26,048 408 Does anyone know how to fix this? I'm using PHP and MySQL to derive my data from a database table, using the following code: $Area = number_format($row[Area]); Then I simply insert $Area in a dynamic table cell, like so... td$Area/td I posted my JavaScript links below. Thanks for any tips! * * * * * script src=http://MySite/js/jquery-1.3.1.min.js; type=text/javascript/script script src=http://MySite/js/tablesorter/jquery.tablesorter.js; type=text/javascript/script script language=JavaScript type=text/JavaScript $(document).ready(function() { $(#myTable).tablesorter({ widgets: ['zebra']} ); $(#triggerMS).click(function(){ $(#menuMS).show(); return false; }); $(#menuMS).click( function(){ $(#menuMS).hide(); return true; }); $(#triggerReg).click(function(){ $(#menuReg).show(); return false; }); $(#menuReg).click( function(){ $(#menuReg).hide(); return true; }); $(#triggerKids).click(function(){ $(#menuKids).show(); return false; }); $(#menuKids).click( function(){ $(#menuKids).hide(); return true; }); $(#triggerLinks).click(function(){ $(#menuLinks).show(); return false; }); $(#menuLinks).click( function(){ $(#menuLinks).hide(); return true; }); $(#triggerBooks).click(function(){ $(#menuBooks).show(); return false; }); $(#menuBooks).click( function(){ $(#menuBooks).hide(); return true; }); } ); /script -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org
[jQuery] Re: Table sorter.
some rows or some columns? if columns, then the link Remon provided is correct. If rows, I'm not entirely sure I understand what you mean. If you need them at the top, have them in your thead. if you need them at the bottom, put them in your tfoot. if you want to sort within specific groups, the plugin does not support it. if you're trying to have content appended for repeating headers or similar, consider pagination or create your own repeat headers widget like the sample: http://tablesorter.com/docs/example-widgets.html aquaone On Fri, Apr 24, 2009 at 08:10, Mazi m.ug...@gmail.com wrote: Hallo all. I'm using this plugin and I consider it fantastic. I need in a table to ignore some rows from ordering. Is it possibile to accomplish a task like this? Kind regards Massimo On Apr 21, 1:26 pm, MorningZ morni...@gmail.com wrote: Why not base your use/non-use of a plugin based on features and application for your usage? I don't see any plugins out there stamped jQuery Official Plugin... need something done, there's probably 20+ different plugins out there that will do it As for TableSorter... i use it pretty extensively, and the users of my site love it On Apr 21, 6:47 am, m.ugues m.ug...@gmail.com wrote: I was searching for a table sorter plugin and I found this onehttp:// tablesorter.com/docs/ Is the official plugin for this purpose or there is something else. Kind regards Massimo
[jQuery] Re: How can I freeze the title row in a table?
There are hacks but none that work well cross-browser without additional hacks. Some plugins use the two table solution, some don't use tables at all and replace them with divs. Have you considered using pagination instead of a fixed thead hack? aquaone On Wed, Apr 8, 2009 at 07:53, Matt Wilson m...@tplus1.com wrote: I have a table with lots of rows, and when I scroll down, I can't see the row with the column titles. How can I freeze that row in place so I can still see it as I scroll down?
[jQuery] Re: tablesorter - Force Null / Empty Cells to the Bottom?
impressive but has some flaws (large numbers, sorting w/o clicking headers, etc). not a complete fix but definitely a 95+% solution -- neat! aquaone On Tue, Mar 24, 2009 at 00:00, MorningZ morni...@gmail.com wrote: Not the prettiest code i've ever written, but: 1) It works :-) 2) Didn't touch one single character in tablesorter.js http://paste.pocoo.org/show/109306/ (Make sure you are viewing it in Firefox with FireBug going, or comment out the console.log-s and set Tablesorter's option of debug to false) On Mar 24, 12:30 am, Flight553 flight...@gmail.com wrote: you were on the right track with the .addParser method but there's no need to edit it inside the core code Ok, I'll bite. How? addParser() just lets you determine one value that goes to sortnumeric(a, b) or sorttext(a, b). Those methods are designed to put a value on top when sorting one direction, and on bottom when sorting the other direction. How can you get a value to always be sorted to the bottom using addParser? I know the patching I offered sucked, but don;t know how else to do it with the tablesorter.js code as exists. Suggestions?
[jQuery] Re: tablesorter - Force Null / Empty Cells to the Bottom?
You could define your own parser to do this. Are you looking for a basic numeric sort with nulls on bottom? lexicographical sort? ..? stephen On Thu, Mar 12, 2009 at 11:52, Big Mad Kev bigmad...@gmail.com wrote: Good Morning / Afternoon / Evening, Using the tableSorter does anyone know if it's possible to all ways force null / empty / 0 Digit cells to always be at the bottom, The solution I have is to have additional columns with either 0/1 for ASC / DEC Sorts and sorting on that first. But I need a more elegant way, I'm sure it's possible but I have tried everything I can think off. Any help is appreacited TIA Kev
[jQuery] Re: tablesorter doesn't sort negative currency properly
alternatively, write your own parser, or store the value as a float in a hidden span that appears before the displayed value. default behavior of tablesorter is to sort on the first child dom node with a text node... stephen On Wed, Mar 4, 2009 at 15:26, donb falconwatc...@comcast.net wrote: Add a hidden column with the values unformatted, as float values. Sort on that column On Mar 4, 4:36 pm, novotny novo...@gridsphere.org wrote: Hi, I have a column with values $4.50, $127.00, -$130.00, -15.76 and the sorting doesn't work. It works fine if all values are positive, however. Does anyone have any idea how to fix this? For now I just have to eliminate the $ in order for it to work. Thanks, Jason -- View this message in context: http://www.nabble.com/tablesorter-doesn%27t-sort-negative-currency-pr... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: tablesorter doesn't sort negative currency properly
the format for the currency parser is: return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),)); It will not handle negative values for currency. You will have to write your own parser. stephen On Sun, Mar 1, 2009 at 23:12, jason jason.novo...@gmail.com wrote: Hi, I have a column with values $4.50, $127.00, -$130.00, -15.76 and the sorting doesn't work. It works fine if all values are positive, however. Does anyone have any idea how to fix this? For now I just have to eliminate the $ in order for it to work. Thanks, Jason
[jQuery] Re: TableSorter Plugin Question
as long as you trigger the update event after adding content you should be fine. http://tablesorter.com/docs/example-ajax.html On Sun, Mar 1, 2009 at 21:49, chobo2 mhub...@gmail.com wrote: Hi I am wondering I want to use jquery to add some rows when a person say adds some stuff. I would like to know if I add it like this(through jquery javascript) will the tablesorter be able to figure out how to sort it(ie when some presses the header columns will this new value get stored) or do I to do something to get it to work? -- View this message in context: http://www.nabble.com/TableSorter-Plugin-Question-tp22282466s27240p22282466.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: remove live events from all children
jQuery(#id).find(*).die(); ? On Fri, Feb 20, 2009 at 18:46, Pappy helga...@gmail.com wrote: Well, while 'children' only gets me immediate descendants, I figured let's try jQuery(.specific_class).parent().children().die() for the heck of it and still no luck. It looks like the code does some pattern matching and doesn't like it if you are using significantly different selectors to 'live' and 'die'. On Feb 20, 6:12 pm, James james.gp@gmail.com wrote: How about: jQuery(#id).children().die(); On Feb 20, 3:44 pm, Pappy helga...@gmail.com wrote: I am trying to remove live events from all children of an element (specifically, the element is a dialog window). jQuery(#id *).die() There's an Invalid Quantifier exception when creating the namespace RegExp in the remove function (line 2431, jquery.js v1.3.1). The asterisk is never escaped and is causing the exception. That said, looking through the code, it looks like '*' is simply not supported. True? If so, am I missing something else easy? I really like to not go through each event and remove it (yes, I'm lazy) :) Worst case, I'll add a class (eg. 'dialog_event') to each element.
[jQuery] Re: Using variables in selectors? $(input[name=x])
($input[name=+x+]) On Wed, Feb 18, 2009 at 13:56, Zaliek zali...@gmail.com wrote: I haven't found any mention of this in the documentation. Can you use a variable in place of a string when using a selector to match an element in a page? If so, what is the syntax? x = foobar $(input[name=x])
[jQuery] Re: how to zebra stripe divs?
your colon is in the wrong place. (how often does one get to say that?) $(div.postSummary-teaser:odd).addClass(odd); stephen On Mon, Feb 16, 2009 at 15:31, morktron m...@digiflip.tv wrote: Hi I'm just wondering whether it is possible to zebra stripe alternate divs with the same class name? The class name is .postSummary-teaser, I tried this: script type=text/javascript window.onload = function(){ $(div:.postSummary-teaser(odd)).addClass(odd); }; /script but no joy. I'm no Javascript programmer but it was easy to stripe alternate rows with a tutorial on the jQuerey site. There seems to be nothing about using divs? The page in question is in development here: http://www.digiflipconcepts.com/digiflip-v3/Rant-and-Rave Can anyone help? thanks -- View this message in context: http://www.nabble.com/how-to-zebra-stripe-divs--tp22048135s27240p22048135.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Tablesorter plugin - lazy caching
you could have the intiial page give a class to the th (or thead w/ closest/delegation) and bind a click event to that class that would enable tablesorter and remove the class, stephen On Wed, Feb 4, 2009 at 05:28, petrillodavide davide.petri...@gmail.comwrote: Hello everybody, I'm developing an application in which the users will deal with a big table (600+ rows). One target for the application is that it has to show up as fast as possible; anyway, applying the tablesorter on the table, the initial caching steals more than one second to the process. Do anybody knows if it's possible to run the cache initialization only when the user clicks on one of the table's headers? Thanks in advance! Davide. -- View this message in context: http://www.nabble.com/Tablesorter-plugin---lazy-caching-tp21830458s27240p21830458.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Making Web Game- Need Hitpoint XP histogram/line graph
you could also check out Raphael or Processing. stephen On Sat, Jan 31, 2009 at 13:16, seasoup seas...@gmail.com wrote: flot http://code.google.com/p/flot/ On Jan 31, 7:06 am, TrixJo tri...@gmail.com wrote: Hi there, I have been using Yahoo UI for the past couple of years and finally jumped ship and have come over to JQuery mainly because of all of the amazing things I am seeing! I am making a simple web game. Users can level their avatars and engage in combat. Therefore, I require a horizontal histogram for the player's health meter and XP meter. Stats are stored in mySQL (LAMP) I have googled for a number of plugins and haven't been able to find a simple one that allows for horizontal line bars for the situation I require. Anyone know of any? thanks
[jQuery] Re: A beautiful diagram
I don't know of anything in jQuery but I'd highly recommend looking into the graphviz tool if you haven't already. It would require some server-side code and a lot of Ajax, especially for zooming... but it may be possible. If you do find some kind of package for this, let me know. I have a personal project that could use it that I've put on hold due to lack of availability of a solution and poor ROI for me to impliment it myself right now. stephen On Wed, Dec 31, 2008 at 03:39, vlain rudi.ver...@gmail.com wrote: Hi to everybody (happy 2009), I have to create a diagram (a view from some data). The diagram includes objects (rectangle, rounded rectangle, ellipse...) and connection beetween objects (different kind of lines). Each object have to display some informations as clickable text and image. Diagram has to allow simple cute effects (zoom_in, zoom_out, highlight...) for example on mouse hover and so on. Any hints for a library/plugin above jQuery?
[jQuery] Re: Select all even row in table that are not with a specified class.
Sure. $(table.font_quotazioni tr:even:not('.midlight'))... http://docs.jquery.com/Selectors/not#selector stephen On Tue, Dec 23, 2008 at 10:01, m.ugues m.ug...@gmail.com wrote: Hallo all. I got a table like this table class=font_quotazioni thead tr th title=Data Contabile class=chars4Nome/th /tr /thead tbody tr class=midlight tdfoo/td /tr tr tdfoo/td /tr tr tdfoo/td /tr /tbody /table In my document.ready I set a class on even rows $(table.font_quotazioni tr:even).addClass(even); I would like to exclude all the rows that got a certain class (e.g tr class=midlight ) Is it possible?
[jQuery] Re: Cross domain Ajax without Proxy
Tangent question: 1. If someone was to add an iframe to a page, would cookies be sent to the page within the iframe? I'm working on an app where we need to scrape content from multiple pages that all use a common login scheme that creates a cookie for a central server, despite the application being different domains. I'm trying to find every solution I can, client and server-side... 2. If cookies are sent, I could theoretically fetch the content of the iframe and send it back to the server, yes? stephen On Wed, Dec 10, 2008 at 10:32, ricardobeat [EMAIL PROTECTED] wrote: I believe you have already answered that to yourself but was hoping for a misteryous miraculous solution right? :) No, there isn't, you'll have to do it server-side. Or if you're not playing with the remote page's content use an iframe. cheers, - ricardo On Dec 10, 8:17 am, Roy M [EMAIL PROTECTED] wrote: Hello, Is it possible to get remote contents if page is in another domain, without use of proxy? E.g. div id=test/div script type=text/javascript $(#test).load(http://www.google.com;); alert( $(#test).html() ); /script Thanks.
[jQuery] Re: Auto Refresh of Ajax load(url,parameters,callback) command
google for: setInterval On Mon, Dec 8, 2008 at 16:19, Raghu [EMAIL PROTECTED] wrote: Hi, I want to load content of a div using ajax load(url,parameters,callback) command and then to refresh content of that div in each minute using ajax load command. How do I achieve this? Any thoughts... Thanks Raghu
[jQuery] Re: Fixed div, content scrolls under it
do you mean something other than: div id='nav'.../div div id='content' style='overflow-y:scroll'.../div Sounds like a CSS question, not a jQuery one... stephen On Tue, Dec 2, 2008 at 14:38, Andy Matthews [EMAIL PROTECTED]wrote: I'm looking at the possibility of having navigation at the top of the page, pinned to the top. I'd like for the content to scroll UNDER the container. I've seen it before, but forgot to bookmark it to see how it was done. Does anyone have a plugin for this, or know how it's accomplished and can point me to an example? andy
[jQuery] Re: jquery tablesorter and exclude a href from sort
You will likely need to define your own textExtraction function. http://tablesorter.com/docs/example-option-text-extraction.html stephen On Mon, Nov 24, 2008 at 09:21, tjones [EMAIL PROTECTED] wrote: Hello, I have just started to use the jquery tablesorter and really like it. Since I'm really new to jquery can someone tell me if there is a parser or something that will allow me to sort a column which has a href... in it. Thanks, tom Example... tda href=index.cfm?groupinfo=#name#img src=images/info.png height=16 width=16 align=texttop/a#name#/td
[jQuery] Re: Js traditional to jquery syntax.... how?
$(select).val(value); // for simple select $(select).val([value1,value2]); // for select multiple stephen On Wed, Nov 19, 2008 at 10:15, Andrea - Aosta [EMAIL PROTECTED] wrote: i Have this traditional style js script function Select_Value_Set(SelectName, Value) { eval('SelectObject = document.' + SelectName + ';'); for(index = 0; index SelectObject.length;index++) { if(SelectObject[index].value == Value) SelectObject.selectedIndex = index; } } simply set the index of a select to value choosed. In jquery it is possible to do this? How? Thank you
[jQuery] Re: sorting a table as a list?
You can just write your own parser for tablesorterhttp://www.tablesorter.com/ . stephen On Mon, Nov 17, 2008 at 09:54, magoldfish [EMAIL PROTECTED] wrote: Hi, I'm learning jquery and I'm stumped on a table sorting problem. I have inherited a web page with an HTML table of contact info (e.g., a mailing list) that I need to be able to sort by state or name, but it's displayed like a two-column list (see below). Any suggestions on how I might do this using jquery? Company Name and State: Central New Jersey FooBars, New Jersey City: Rosy Thorn Company President: Major Hinton nbsp; Company Name and State: Conoco Valley Corkboard, California City: Rabadon Company President: Marsha Brady -- View this message in context: http://www.nabble.com/sorting-a-table-as-a-list--tp20533650s27240p20533650.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: TableSorter not correctly sorting GridViews
I'm not sure what a GridView is but if it's a table, are you sure it's formatted correctly? In cases where it's sorting lexicographically instead of numerically, something must be throwing it off. Do you have tds in that colgroup with non-numeric values? You can force numeric sorting of a colgroup by explicitly defining your parser for that column. stephen On Wed, Nov 12, 2008 at 08:59, Damien [EMAIL PROTECTED] wrote: Hello, I have a GridView, and applied to this GridView is the TableSorter jQuery Plug-in. As mentions it does not seem to be sorting correctly! Especially in the case of number where it sometimes using the first number to sort. Thus 70 is considered higher than 100! I am not sure what's causing this so any ideas would be helpful :). Some elements of the set up: The GridView's data is done programatically in code-behind Tablesorter is across 3 gridviews using a css selector for each. But I tried applying it to one table only and the bug still occurred. Thanks
[jQuery] Re: Tablesorter advice required - row level filtering based on inputs?
would this help? http://www.compulsivoco.com/2008/08/tablesorter-filter-results-based-on-search-string/ On Fri, Nov 7, 2008 at 19:31, rich [EMAIL PROTECTED] wrote: Hello. I'm here for advice on which approach to take with this problem. I am using the wonderful tablesorter 2 plugin (http:// tablesorter.com/). I have a table that contains data. I'd like to provide an input field above the table so that a user can filter rows based on a string matched from one particular column. Is this something I could implement as an add-on to tablesorter or am I better off keeping this functionality altogether separate. Hope that makes sense. Thanks for reading Richard
[jQuery] Re: Tablesorter, sorting dates in format dd.m.yyyy
Yes but it may be better to change your separator. I haven't tested this but it should work... $.tablesorter.addParser({ id: dotDate, is: function(s) { return /\d{1,2}\.\d{1,2}\.\d{2,4}/.test(s); }, format: function(s,table) { s = s.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/, $1/$2/$3); return $.tablesorter.formatFloat(new Date(s).getTime()); }, type: numeric }); stephen On Wed, Nov 5, 2008 at 11:53, Josip Lazic [EMAIL PROTECTED] wrote: Is it possible to sort column with dates in dd.mm. format?
[jQuery] Re: Tablesorter, sorting dates in format dd.m.yyyy
ack, just realized you're doing dd.mm so gotta change it to s = s.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/, $2/$1/$3); i think? stephen On Wed, Nov 5, 2008 at 13:50, aquaone [EMAIL PROTECTED] wrote: Yes but it may be better to change your separator. I haven't tested this but it should work... $.tablesorter.addParser({ id: dotDate, is: function(s) { return /\d{1,2}\.\d{1,2}\.\d{2,4}/.test(s); }, format: function(s,table) { s = s.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/, $1/$2/$3); return $.tablesorter.formatFloat(new Date(s).getTime()); }, type: numeric }); stephen On Wed, Nov 5, 2008 at 11:53, Josip Lazic [EMAIL PROTECTED] wrote: Is it possible to sort column with dates in dd.mm. format?
[jQuery] Re: tablesorter wrong ordering
Because it's not choosing numeric as the sorter for that column I'd wager. '.00' may be triggering it to sort alphabetically instead. set the parser to be numeric explicitly: script type=text/javascript $(document).ready(function() { $(.tablesorter).tablesorter({ sortList: [[1,0]], headers: 1 { sorter: 'numeric' } }); }); /script I'm doing this from memory so I can't guarantee that's the right syntax but hopefully it helps. I'd recommend using '0.00' instead of '.00' though. stephen On Fri, Oct 3, 2008 at 04:43, flopp [EMAIL PROTECTED] wrote: I have installed the tablesorter plugin. I use the following code to initialize it: script type=text/javascript $(document).ready(function() { $(.tablesorter).tablesorter( {sortList: [[1,0]]} ); } ); /script So it is going to sort the second field (Navn). But when I click Antall, 120 comes under 1102. Why? See attachment http://www.nabble.com/file/p19796169/tablesorter.JPG tablesorter.JPG -- View this message in context: http://www.nabble.com/tablesorter-wrong-ordering-tp19796169s27240p19796169.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: tablesorter (highlighting columns by appling td class=sorted )
When you sort it applies a class to the th of either headerSortUp or HeaderSortDown I believe. You should be able to do something using the triggers (http://tablesorter.com/docs/example-triggers.html) to determine which headers have either of those classes, then add that class to equally positioned tds in each tr. It's a hack but it would work... stephen On Tue, Sep 16, 2008 at 11:33 AM, chovy [EMAIL PROTECTED] wrote: Is there a way to apply a class to the table cells of the sorted column? I want to have the sorted column to have a class=sorted on each of it's table data cells.
[jQuery] Re: tablesorter data excepts
look into the repeat headers example widget. it should give you a good starting place. stephen On Mon, Sep 1, 2008 at 9:43 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hi guys, i'm using the tablesorter plugin. Does anybody know how to exclude table rows. because i habe a table like this tr th class=head1/th th class=head2/th /tr /tbody tr class=basicinfo td/td td/td /tr tr class=subhead td/td td/td /tr tr class=details td/td td/td /tr rows with class subhead an details are hidden an can be toggles by clicking on basicinfo. but now i dont want that these two rows are sortable Only tr basicinfo must be sortable. my first idea was to write a widget which collects al classes (subhead an details) removes them from table and appends it after sorting... but i'm not sure about this approach.. any ideas how to solve this problem? i look forward seeing your approaches
[jQuery] Re: Adding Values (Sum) of TD.
you should be able to .append a tfoot, then iterate through the tbody's trs and tds to populate an array, then use that to populate some fresh td's in the tfoot. i'd write it for ya but i gotta go to the opera. ^_^ stephen On Sat, Aug 23, 2008 at 10:12 AM, Scott Phillips [EMAIL PROTECTED]wrote: I am trying to do a footer at the bottom of the table, and I would love to use jquery to provide a total in the footer, something like this: 1 | 1 | 3 2 | 1 | 4 -- 2 | 2 | 7 (JQuery added the TDs above) Is it possible? And can anyone point me in the right direction.
[jQuery] Re: How to set background image when file name contains a space?
You'll need to urlencode it then. Spaces are usually replaced with %20. stephen On Thu, Aug 21, 2008 at 12:15 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I agree, but sadly the file naming situation is beyond my control. I'm forced to work with these poorly named files. - Dave On Aug 21, 1:10 pm, Andy Matthews [EMAIL PROTECTED] wrote: Spaces in file names for web apps are asking for trouble. Any way of getting around having the spaces ? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 21, 2008 2:03 PM To: jQuery (English) Subject: [jQuery] How to set background image when file name contains a space? Hi, I have an image with path '/documentengine/user/xhuntertest/ Uploaded_Documents/Toad Getting Started Guide1_thumb.jpg'. When I try and set this as the background of my DIV using $('#frontside').css('backgroundImage','url(' + img +')'); where img contains the offending name, nothing appears. I figure this has something to do with the space in the file name as other images without a space appear just fine. Grateful for any advice, - Dave- Hide quoted text - - Show quoted text -
[jQuery] Re: Issue Related to Interface.js plugin with on jQuery 1.2.6 in Internet Explorer.6
Interface has not been supported for a long time. Use jQuery UI ( http://ui.jquery.com/) instead. stephen On Wed, Aug 20, 2008 at 9:59 AM, AQuery [EMAIL PROTECTED] wrote: Hi, I am planning to use Interface.js (http://interface.eyecon.ro/) as we have some requirement as in we have to create portal having portlets and also supporting drag and drop , this is where I see interface plug providing me all that I need. Now the problem :- Interface.js works on jquery 1.1.2 but fails when used with jQuery 1.2.6 in Internet Explorer 6. Drag and drop works but once a item is dropped it can not be dragged again in IE-6. (check the demo related to sort on http://interface.eyecon.ro/ to reproduce the issue) So now that we have been using jquery 1.2.6 already in the application. This issue is making it difficult for me to convince the my superiors on using it. Please help me. Thanks Amit
[jQuery] Re: Tablesorter plugin and zebra striping
Tablesorter comes with a zebra-striping widget. $(table).tablesorter({ widgets: ['zebra'] }); stephen On Wed, Jun 18, 2008 at 6:34 AM, Ken [EMAIL PROTECTED] wrote: I have the following in my $(document).ready: $(document).ready(function() { $(.zebra tr:not([th]):even).addClass(even); $(.zebra tr:not([th]):odd).addClass(odd); $(table#sorttable).tablesorter(); )}; This allows my table to sort columns by clicking on the column headers and works great. What I need to be able to do, is have the zebra striping happen after each table sort. Is there a way to set this up? Thanks, Ken
[jQuery] Re: help with array for flot
$('#plot').click(function() { var d1 = []; $('#curveData tbody tr').each(function() { tr = $(this); pair = []; tr.find('input.qty').val() tr.find('input.price').val() pair.push( tr.find('input.qty').val(), tr.find('input.price').val() ) d1.push( pair ); }); $.plot($(#graphHolder), [ { color: #bb, data: d1, points: { show: true }, lines: { show: true } } ]); });
[jQuery] Re: How to find a table cells value?
Monica wrote: Newbie here... I have a table $(#searchDataTable), each row has an unique id. What is the JQuery code to get the value(text) of particular cell in this table? $(#rowId td:nth-child(x)).text(); where #rowId is the id of the particular row, x is the column number. stephen
[jQuery] odd behavior with toggle
I've had a minor issue with a function I'm using to toggle a large number of rows (200+) in a large table (300+ rows, 20+ columns). Initially I tried the following code (forgive any typos, typing this at home, not work, so I may have some minor issues) am am curious why it doesn't work the way I'd expect: // d = detail // w = wait... // t = #tableid tbody function toggleZero(d,w,t) { d.hide(); w.show(); $(tr:not(.nonZero),t).toggle(); w.hide(); d.show(); }; I'd expect it to do those operations in that order but oddly the d.hide and w.show do not happen until the same time that the toggle() resolves, causing them to flash and disappear in a fraction of a second (the toggle takes 10 seconds). I find this odd. Can someone explain why this happens? I worked out a workaround today with some support from #jQuery on freenode: function toggleZero(d,w,t) { d.hide(); w.show(); setTimeout( function() { $(tr:not(.nonZero),t).toggle(); w.hide(); d.show(); }, 100 ); }; I'm glad to have a workaround but am still curious, why doesn't the first function work the way I think it should? aquaone
[jQuery] Re: How do I run a function on my selected items?
http://docs.jquery.com/Utilities/jQuery.each $(.myClassName).each(function(){alert($(this).attr('id'));}); I believe... aquaone [EMAIL PROTECTED] wrote: Here is my selection: $(.myClassName) Here is my function: function myFunction { alert( $ (this).attr('id'); } So, foreach selected element in my selection I want to run myFunction on it. Does that make sense? Thanks!
[jQuery] Re: Tablesorter and numbers formatted with commas
I ran into the same problem. I just wrote my own parser. It may not be as efficient as it could be though. I'm no expert. Still, here it is: $.tablesorter.addParser({ id: commaNum, is: function(s) { return false; }, format: function(s) { return s.replace(/,/g,''); }, type: 'numeric' }); On Nov 6, 2007 12:14 PM, rsmolkin [EMAIL PROTECTED] wrote: Hi All, Does anyone know how to get the Tablesorter to properly sort numbers some of which have a comma separating the thousands. What I mean is I have a range of numbers anywhere from 0 to 10,000, and I want 958 to be above 1,104 but by default it's not. Any suggestions appreciaged. Thanks, -Roman
[jQuery] tablesorter, zebra and row highlighting
Hopefully someone can answer this quickly. :-) I have a table. I want every other row to be an alternate style (the 'zebra' widget) unless the final td for that row contains a specific value (in my case, non-zero). For rows matching that criteria I need them to use a different style, whether they are even or odd. I'm relatively new to jQuery and tablesorter so forgive me if this is a simple widget. Can someone please help? -- View this message in context: http://www.nabble.com/tablesorter%2C-zebra-and-row-highlighting-tf4537485s15494.html#a12950537 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: tablesorter, zebra and row highlighting
Michael Geary wrote: Where does this table come from? For the prototype I'm making it's just static content. For the final version it'll be dynamically built using AJAX. The best way to do this is to assign appropriate classes to your table rows and use CSS to style them. If you can generate the code this way in the first place, then you don't even need JavaScript, much less jQuery: Perhaps I didn't emphasize missed that this is within the tablesorter plugin. The tablesorter plugin will reorder the table, sorting by specific columns. The rows would no longer be accurate after the reordering. The zebra widget for tablesorter handles this by the following code: $.tablesorter.addWidget({ id: zebra2, format: function(table) { $(tr:visible,table.tBodies[0]) .filter(':even') .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]) .end().filter(':odd') .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]); } }); I'm wondering how I get this not to take action for certain tr and/or td elements. -- View this message in context: http://www.nabble.com/tablesorter%2C-zebra-and-row-highlighting-tf4537485s15494.html#a12950760 Sent from the JQuery mailing list archive at Nabble.com.