[jQuery] Re: Tablesorter dateFormat
Thanks Christian!! That worked out great. Thanks again for your time and the plugin, of course. On Dec 20, 3:02 am, Christian Bach [EMAIL PROTECTED] wrote: Hi Jay, There was a small bug in the parser. This works as expected: $.tablesorter.addParser({ // set a unique id id: 'dates', is: function(s) { // return false so this parser is not auto detected return false; }, format: function(s) { // split var a = s.split('-'); // get month num a[1] = this.getMonth(a[1]); // glue and return a new date return new Date(a.reverse().join(/)).getTime(); }, getMonth: function(s) { var m = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'] var l = m.length; for(var i=0; i l; i++) { if(m[i] == s.toLowerCase()) { return (i+1); } } }, // set type, either numeric or text type: 'numeric' }); /Christian 2007/12/19, Jay Fallon [EMAIL PROTECTED]: Hi Christian, thanks for the follow up, I implemented the script as you described and it's still not sorting correctly: http://jayfallon.net/tablesorter/tablesorter.html On Dec 19, 1:21 pm, Christian Bach [EMAIL PROTECTED] wrote: Hi Jay, This will solve your problem: // add parser through the tablesorter addParser method $.tablesorter.addParser({ // set a unique id id: 'dates', is: function(s) { // return false so this parser is not auto detected return false; }, format: function(s) { // split var a = s.split('-'); // get month num a[1] = this.getMonth(a[1]); // glue and return a new date return new Date(a.join(/)).getTime(); }, getMonth: function(s) { var m = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'] var l = m.length; for(var i=0; i l; i++) { if(m[i] == s.toLowerCase()) { return (i+1); } } }, // set type, either numeric or text type: 'numeric' }); /christian 2007/12/18, Jay Fallon [EMAIL PROTECTED]: It's easy to write a parser to convert the months to a sortable value, but the days and years are trickier. the current code is as follows: // add parser through the tablesorter addParser method $.tablesorter.addParser({ // set a unique id id: 'dates', is: function(s) { // return false so this parser is not auto detected return false; }, format: function(s) { // format your data for normalization return s.toLowerCase ().replace(/dec/,12).replace(/nov/, 11).replace(/oct/,10).replace(/sep/,09).replace(/aug/,08).replace(/ jul/,07).replace(/jun/,06).replace(/may/,05).replace(/apr/, 04).replace(/mar/,03).replace(/feb/,02).replace(/jan/,01); }, // set type, either numeric or text type: 'numeric' }); $(function() { $.tablesorter.defaults.widgets = ['zebra']; $(#announcements).tablesorter({ headers: { 0: {sorter:'dates'},1: {sorter:false},2: {sorter:false},3: {sorter:false} } }); }); On Dec 18, 2:06 pm, Jay Fallon [EMAIL PROTECTED] wrote: I need to sort a table based on the date format: 10-Dec-2007. Does anyone know if this is possible with Tablesorter? I've tried us, uk iso to no avail. Thanks, Jay
[jQuery] tablesorter - hidden TD's
Does anyone know if it's possible to sort a table, using tablesorter, based on the content inside hidden TD's. I'm trying to write a parser that will make date format dd-mon- read as dd/mm/ and I'm running out of viable options. If anyone knows if this can be done, I'd sure appreciate a pointer or two. Thanks.
[jQuery] Re: Tablesorter dateFormat
Hi Christian, thanks for the follow up, I implemented the script as you described and it's still not sorting correctly: http://jayfallon.net/tablesorter/tablesorter.html On Dec 19, 1:21 pm, Christian Bach [EMAIL PROTECTED] wrote: Hi Jay, This will solve your problem: // add parser through the tablesorter addParser method $.tablesorter.addParser({ // set a unique id id: 'dates', is: function(s) { // return false so this parser is not auto detected return false; }, format: function(s) { // split var a = s.split('-'); // get month num a[1] = this.getMonth(a[1]); // glue and return a new date return new Date(a.join(/)).getTime(); }, getMonth: function(s) { var m = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'] var l = m.length; for(var i=0; i l; i++) { if(m[i] == s.toLowerCase()) { return (i+1); } } }, // set type, either numeric or text type: 'numeric' }); /christian 2007/12/18, Jay Fallon [EMAIL PROTECTED]: It's easy to write a parser to convert the months to a sortable value, but the days and years are trickier. the current code is as follows: // add parser through the tablesorter addParser method $.tablesorter.addParser({ // set a unique id id: 'dates', is: function(s) { // return false so this parser is not auto detected return false; }, format: function(s) { // format your data for normalization return s.toLowerCase ().replace(/dec/,12).replace(/nov/, 11).replace(/oct/,10).replace(/sep/,09).replace(/aug/,08).replace(/ jul/,07).replace(/jun/,06).replace(/may/,05).replace(/apr/, 04).replace(/mar/,03).replace(/feb/,02).replace(/jan/,01); }, // set type, either numeric or text type: 'numeric' }); $(function() { $.tablesorter.defaults.widgets = ['zebra']; $(#announcements).tablesorter({ headers: { 0: {sorter:'dates'},1: {sorter:false},2: {sorter:false},3: {sorter:false} } }); }); On Dec 18, 2:06 pm, Jay Fallon [EMAIL PROTECTED] wrote: I need to sort a table based on the date format: 10-Dec-2007. Does anyone know if this is possible with Tablesorter? I've tried us, uk iso to no avail. Thanks, Jay
[jQuery] Tablesorter dateFormat
I need to sort a table based on the date format: 10-Dec-2007. Does anyone know if this is possible with Tablesorter? I've tried us, uk iso to no avail. Thanks, Jay
[jQuery] Re: Tablesorter dateFormat
It's easy to write a parser to convert the months to a sortable value, but the days and years are trickier. the current code is as follows: // add parser through the tablesorter addParser method $.tablesorter.addParser({ // set a unique id id: 'dates', is: function(s) { // return false so this parser is not auto detected return false; }, format: function(s) { // format your data for normalization return s.toLowerCase().replace(/dec/,12).replace(/nov/, 11).replace(/oct/,10).replace(/sep/,09).replace(/aug/,08).replace(/ jul/,07).replace(/jun/,06).replace(/may/,05).replace(/apr/, 04).replace(/mar/,03).replace(/feb/,02).replace(/jan/,01); }, // set type, either numeric or text type: 'numeric' }); $(function() { $.tablesorter.defaults.widgets = ['zebra']; $(#announcements).tablesorter({ headers: { 0: {sorter:'dates'},1: {sorter:false},2: {sorter:false},3: {sorter:false} } }); }); On Dec 18, 2:06 pm, Jay Fallon [EMAIL PROTECTED] wrote: I need to sort a table based on the date format: 10-Dec-2007. Does anyone know if this is possible with Tablesorter? I've tried us, uk iso to no avail. Thanks, Jay
[jQuery] Re: If I'm using toggle, how do I check if it's shown or hidden?
this one has worked for me: http://groups.google.com/group/jquery-en/browse_thread/thread/f5d695b6a2fb2059/56b2de173e480263?lnk=gstq=jay+fallon#56b2de173e480263 On Dec 17, 12:09 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm using the toggle method to show/hide divs $('#giftMsg').toggle(); But how do I check if a div is currently displayed or not? I've discovered that there is no such thing as a shown() or hidden() method. - Dave
[jQuery] Miomi
Came across this timeline-inspired site using lots and lots of scripting, including jQuery. http://beta.miomi.com/
[jQuery] Re: Vexed with SuckerFish Flash
Yes, that is my issue, but we're using swfObject for the flash piece. It had wmode=transparent as a parameter, but now I believe that it wasn't configured correctly as it was interferring with two other scripts I had on the page (show/hide tooltops) but only in IE6, so I was experimenting with jMedia and jquery.flash. It's one of these great projects where I'm working on site with bad requirements and another developer is working offsite doing the flash and his own thing. It's very enjoyable to work like that. On Nov 27, 4:17 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: Jay, Not totally sure what the problem is, but is sounds like you are saying the flash is staying on to of divs, if this is the case doing wmode=transparent on the embed tag and creating a param wmode=transparent I may be mistaken on your issue, if so, can you rephrase? On 11/27/07, Jay Fallon [EMAIL PROTECTED] wrote: Awhile ago I implemented a basic menu based on jQuery/Suckerfish(a href=http://be.twixt.us/jquery/suckerFish.php;/a), and I never realized the implications of the menu appearing behind a flash object until said object became available. I've read though the posts and I've seen some talk about solutions, but as of yet I haven't seen anything that worked in the wild. My current implementation uses the latest jQuery.js and I've tried to implement the flash object using swfObject.js (which causes a conflict with other scripts), jMedia.js and jquery.flash.js, along with bgiframe.js but as of yet I have not been successful. Has anyone been able to overcome this problem? I don't have access to the Flash IDE at the moment, so I'll try and get it working with a transparent background, but if anyone has actually implemented a fix, I'd be really appreciative. Thanks. -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com
[jQuery] Re: Vexed with SuckerFish Flash
Turns out that the swfobject config was wrong to begin with, thus it was causing multiple problems. Both scripts, swfobject.js and superfish.js are able to work seamlessly and on top of that, swfobject.js will not cause any conflicts, and still perfom flash detection, if you wrap it in a factory function: $(document).ready(function(){ var so = new SWFObject(flash/promo_area.swf, sotester, 706, 155, 7, false); so.addParam(menu, false); so.addParam(wmode, transparent); so.addParam(FlashVars, xml_path=/flash/xml_files/my.xml); so.addVariable(pageContent, location.href); so.write(promo_area); });
[jQuery] Vexed with SuckerFish Flash
Awhile ago I implemented a basic menu based on jQuery/Suckerfish(a href=http://be.twixt.us/jquery/suckerFish.php;/a), and I never realized the implications of the menu appearing behind a flash object until said object became available. I've read though the posts and I've seen some talk about solutions, but as of yet I haven't seen anything that worked in the wild. My current implementation uses the latest jQuery.js and I've tried to implement the flash object using swfObject.js (which causes a conflict with other scripts), jMedia.js and jquery.flash.js, along with bgiframe.js but as of yet I have not been successful. Has anyone been able to overcome this problem? I don't have access to the Flash IDE at the moment, so I'll try and get it working with a transparent background, but if anyone has actually implemented a fix, I'd be really appreciative. Thanks.
[jQuery] Re: Vexed with SuckerFish Flash
Very nice, thank you. I think the swfObject wasn't implemented correctly and that is why I strayed from it. Thanks. On Nov 27, 4:22 pm, bbuchs [EMAIL PROTECTED] wrote: I just finished up a site that used SuperFish and swfObject (and Cycle and idTabs and Accordion...), although I'm using jQuery 1.1.4 still. You don't need to re-output the SWF to get the transparent background, you just need to add a paramater to the swfObject setup code: so.addParam(wmode, transparent); That should be enough to ensure that your CSS layers appear on top of the SWF. I did run into a problem with Firefox on Mac that had to do with an Opacity bug. That's an issue with the plugin, and not jQuery/ Superfish. Here's a link to the Superfish plugin: http://users.tpg.com.au/j_birch/plugins/superfish And here's a blog post about the FF Flash bug: http://jakeo.org/blog/2007/03/16/css-opacity-and-flash-transparency-i... Oh, and if anyone is interested in a two relaunched sites using jQuery: http://www.laphil.comhttp://www.hollywoodbowl.com - bry On Nov 27, 2:04 pm, Jay Fallon [EMAIL PROTECTED] wrote: Awhile ago I implemented a basic menu based on jQuery/Suckerfish(a href=http://be.twixt.us/jquery/suckerFish.php;/a), and I never realized the implications of the menu appearing behind a flash object until said object became available. I've read though the posts and I've seen some talk about solutions, but as of yet I haven't seen anything that worked in the wild. My current implementation uses the latest jQuery.js and I've tried to implement the flash object using swfObject.js (which causes a conflict with other scripts), jMedia.js and jquery.flash.js, along with bgiframe.js but as of yet I have not been successful. Has anyone been able to overcome this problem? I don't have access to the Flash IDE at the moment, so I'll try and get it working with a transparent background, but if anyone has actually implemented a fix, I'd be really appreciative. Thanks.
[jQuery] Re: toggle hide show function not working (code provided)
That's even better. Thanks! On Nov 23, 1:03 pm, Wizzud [EMAIL PROTECTED] wrote: var bang = $('.bang').hide(); $('a.collapse').click(function(){ var vis = bang.is(':visible'); bang[ vis ? 'hide' : 'show' ](); $(this).text( vis ? '(+)' : '(-)' ); }); On Nov 23, 5:18 pm, mdrisser [EMAIL PROTECTED] wrote: Jay, Your code works great, but adds a couple of extra steps. Its not necessary to empty the html first, if you call .html() with an argument containing what you want to appear there, jQuery will clear the exisiting html for you and then replace it with what you had desired. // Works, but adds an extra step $('#myID').html('').append('pSomething I want to appear in myID/ p'); // Does the same thing, but with less typing ;-) $('#myID').html('pSomething I want to appear in myID/p'); Just a tip for those of us 'Lazy' Programmers ;-) On Nov 21, 11:16 am, Jay Fallon [EMAIL PROTECTED] wrote: You need to clear your HTML first. remove() does nothing. script type=text/javascript $(document).ready(function(){ $('div.bang').addClass('hide'); $('a.collapse').toggle(function(){ $('div.bang').show(); $('a.collapse').html().append((-)); }, function(){ $('div.bang').hide(); $('a.collapse').html().append((+)); });}); /script On Nov 21, 1:35 pm, FrankTudor [EMAIL PROTECTED] wrote: script type=text/javascript $(document).ready(function(){ $('.bang').hide(); $(a.collapse).toggle(function() { $('.bang').show(); $('a.collapse').remove((-)).append((+)); },function(){ $('.bang').hide(); $('a.collapse').remove((+)).append((-));}); }); /script head body a href= class=collapse(-)/a div class=bang Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean at magna nec erat tincidunt sollicitudin. Phasellus eu est. Aenean diam elit, laoreet sed, suscipit eget, hendrerit vel, lorem. Suspendisse nec turpis ullamcorper urna accumsan sollicitudin. /div Can someone put a set of eyes on the above code...It doesn't seem to work and I am not sure why. Thanks, Frank
[jQuery] Re: toggle hide show function not working (code provided)
You need to clear your HTML first. remove() does nothing. script type=text/javascript $(document).ready(function(){ $('div.bang').addClass('hide'); $('a.collapse').toggle(function(){ $('div.bang').show(); $('a.collapse').html().append((-)); }, function(){ $('div.bang').hide(); $('a.collapse').html().append((+)); }); }); /script On Nov 21, 1:35 pm, FrankTudor [EMAIL PROTECTED] wrote: script type=text/javascript $(document).ready(function(){ $('.bang').hide(); $(a.collapse).toggle(function() { $('.bang').show(); $('a.collapse').remove((-)).append((+)); },function(){ $('.bang').hide(); $('a.collapse').remove((+)).append((-));}); }); /script head body a href= class=collapse(-)/a div class=bang Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean at magna nec erat tincidunt sollicitudin. Phasellus eu est. Aenean diam elit, laoreet sed, suscipit eget, hendrerit vel, lorem. Suspendisse nec turpis ullamcorper urna accumsan sollicitudin. /div Can someone put a set of eyes on the above code...It doesn't seem to work and I am not sure why. Thanks, Frank
[jQuery] Re: SITE: http://www.bankofamerica.com/
Dream on. I used to work with a guy who heads up one of their interactive departments here in Boston and see where he's using it. I'm working for a bank now as well, and yes, jQuery will be making an appearance on a new website for Australia that we're rolling out. Nothing high- end unfortunately, as I only got to do the front end and I decided rather late in the game to go with jQuery for the minimal implementation needed. Now I wished I'd gone with jQuery right from the start, using it to implement the CSS. Would've saved me a lot of headaches. On Nov 9, 11:17 pm, John Resig [EMAIL PROTECTED] wrote: Woah! Maybe they won't charge me all my overdraft fees now :-x One can dream! --John On Nov 9, 2007 9:36 PM, Andy Matthews [EMAIL PROTECTED] wrote: HOLY CRAP! My wife was in our BoA account this evening and they had some nice AJA and JS based interaction going on. So I thought it would be interestting to see what they were using. Sure enough, good old jQuery, right there behind the scenes. That's amazing as jQuery is one of the biggest banks in the world. Good on you John!