[jQuery] Re: File inputs
On Jan 30, 2008, at 6:11 AM, Steffan A. Cline wrote: Well, I tried many variations of .click() with FF and according to this link: http://www.quirksmode.org/dom/inputfile.html Yes, it is not possible to programmatically trigger click event on file input. But still, I would suggest you provide example page. I still do not understand what you are trying to do :) -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: File inputs
Ah, I see. Maybe have a look at the uploader plugin? Otherwise, I think you're stuck :/ On Jan 30, 5:11 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/29/08 7:58 PM, Hamish Campbell at [EMAIL PROTECTED] wrote: Some code would be useful - you've said that .click() doesn't work in FF, but it probably isn't the .click() bit that isn't working. One suggestion (untested) is that you include both the normal button and the new image, but hide the image with CSS by default. This means that if JS is disabled, the user can still click the normal button. Then with jQuery, hide the button and show the image on document.ready. Then apply a trigger to the image that fires the normal button action. It means you shouldn't need to code anything special - just piggy-back on the usual action of the button. Eg: $(#myImage).click(function () { $(#fileButton).trigger('click'); }); On Jan 30, 8:01 am, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote: On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote: I know there is a plug-in for styling file inputs but what about using a custom image instead? I need to do something where I have an ADD and a DELETE button side by side. I tried this using .click() and it worked flawlessly but alas FF does not support it! How stupid!. What are you trying to achieve? What does ADD and DELETE buttons do? -- Mika Tuupola http://www.appelsiini.net/ The add button would simply pop up the file selector as clicking on the actual file button would do. The delete button would set a hidden flag to remove the stored file. See the previous thread .click() This described the previous method which I gave up on. Thanks Steffan Well, I tried many variations of .click() with FF and according to this link: http://www.quirksmode.org/dom/inputfile.html reads: The click() method allows you to simulate a click on a form field. Checkboxes get toggled, radios selected, and so on. Unfortunately Mozilla and Opera haven't added this method to file upload fields. I wonder why, adding it is not really a security risk since the worst that can happen is that the file selection window pops up. So unfortunately we cannot use this simple solution. I hadn't tried your trigger method. Did you test it in FF? I just did and unfortunately as said on quirksmode that does not work :( but it does on everything else. What else do you suggest? 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 [EMAIL PROTECTED] Phoenix, Azhttp://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] there is a conflict ui.resizable.js and ajaxpro
resizable will not be able when using ajaxpro,the javascript error: c[0] has no properties code: for(var i in this.options.modifyThese) { var c = this.options.modifyThese[i]; c[0].css({ width: modifier.width ? modifier.width+c[1] : nw+c[1], height: modifier.height ? modifier.height+c[2] : nh+c[2] }); }
[jQuery] Validation plugin - spinner while validating field?
There is a label.error and a label.checked but does anyone know how I would display a label.pending (perhaps with a spinner) while the validation (especially a remote request) is happening? Thanks.
[jQuery] jquery's drawing library problem
Hey! I'm having a problem using drawLine of the drawinglibrary plugin. here is my code: http://pastebin.com/m54c8d5c8 What I'm trying to do is when a user clicks on an image, it draws a line connecting these points. See that at first I'm saving the first coordinates because there are no previous coordinates. It works on IE6 But not on FF 2.0.0.11 I've been over checking it but didn't find the problem. Thanks in advance, Eitan
[jQuery] Re: New and better demos
Wow, you rocks, I would ever not even imagined that solution... :P I will try to implement it. But, what do you mean with //check the settings? Thanks again. On Jan 30, 1:20 am, Ariel Flesler [EMAIL PROTECTED] wrote: Ugh.. (function( $ ){ var last = 0, $pane = $('#container'), $items = $pane.find('li'); $('#next').bind('click', +1, handler ); $('#prev').bind('click', -1, handler ); function handler( e ){ var next = last + e.data; if( $items[next] ){ last = next; $pane.scrollTo( $items[next], ... );//check the settings } }; })( jQuery ); Ariel Flesler On 29 ene, 22:15, Ariel Flesler [EMAIL PROTECTED] wrote: Hi caruso, your situation remainds me of this:http://www.freewebs.com/flesler/jQuery.ScrollShow/ It's a plugin that actually uses ScrollTo. It's called ScrollShow:http://plugins.jquery.com/project/ScrollShow I kinda abandoned the plugin and it stayed in beta stage, but it automatically does what you are saying. If you use it, set the setting 'navigationMode' to 's' instead of 'sr', to release the click on the items, also set 'wrappers' to '', you don't need that. It can also be done with a small snippet that remembers the last, something like: (function( $ ){ nbsp;nbsp;var last = 0, nbsp;nbsp;nbsp;nbsp;$pane = $('#container'), nbsp;nbsp;nbsp;nbsp;$items = $pane.find('li'); nbsp;nbsp;$('#next').bind('click', +1, handler ); nbsp;nbsp;$('#prev').bind('click', -1, handler ); nbsp;nbsp;function handler( e ){ nbsp;nbsp;nbsp;nbsp;var next = last + e.data; nbsp;nbsp;nbsp;nbsp;if( $items[next] ){ nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;last = next; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; $pane.scrollTo( $items[next], ... );//check the settings nbsp;nbsp;nbsp;nbsp;} nbsp;nbsp;}; })( jQuery ); I checked the syntax was correct, but not that it works, I hope it does :) Thanks for you reply. Cheers Ariel Flesler As for adding that to LocalScroll... that plugins handles anchor, this is different. Maybe ScrollShow is the solution. On 29 ene, 18:57, caruso_g [EMAIL PROTECTED] wrote: Thanks Ariel, I didn't be able to use it for the following project (http://www.bonsai-studio.net/clients/lamoy/wessel02/albums/page2/inde... ) so I had to make some code to the ground up (think about I am just a designer... :P ). So here I am, I have a feature request! Can you implement a function to just use two links (left | right in the example above) to make the content scroll to the previous or the next item into the container? It would be great! I imagine the code I wrote should be horrible to your eyes, but that should make the idea of the feature I am talking about. It would be great if at the end of the items it could show again the first item, like Coda website, and so on. Thanks in advace. On Jan 29, 6:08 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Hi all Thanks a lot for your replies! @Jack I don't fully understand what you mean, could you explain it some more ? or maybe find an example (can be flash or anything). @caruso ScrollTo can scroll to any kind of element, not only LIs. Check the old demo, the first input field uses a CSS class based selector, with an :eq filter. You can use any kind of selector, but you must make sure it matches at least 1 DOM element. The first one will be taken into account. @Alexandre I really liked your comment, I also loved the psychodelic squares, but I realized the demo wasn't very useful in the end. So I started over. Thanks again, I'm open to new features for any of both plugins. Just beware not to go far away from the scope of the plugin. Cheers. Ariel Flesler On 29 ene, 14:48, Alexandre Plennevaux [EMAIL PROTECTED] wrote: in fact i just looked at the old demo and i find it quite nice looking too! (me love colours :) at least it's not webtwooish, which is a quality in my eyes :)http://www.freewebs.com/flesler/jQuery.ScrollTo/index.old.html On Jan 29, 2008 4:56 PM, caruso_g [EMAIL PROTECTED] wrote: Hi, thanks a lot for these great plugins. They are awesome. But I would make you a feature request, if possible, and, when you can. It would be great to be able to scroll to any kind of elements into the containner, and not only list items. Sometimes it happens that one can't know in advance which kind of elements will be putted by the client into the container, so allowing to scroll to anything inside it would solve a lot of problems! Thanks lot anyway for your great works, and I would like to thanks all other developers out there for your wonderful work and your friendly support. On Jan 29, 3:54 am, Jack Killpatrick [EMAIL PROTECTED] wrote: Thanks for the additional demos, they opened my eyes to
[jQuery] Reusing XMLHttpRequest
Reusing XMLHttpRequest is possible in jQuery? in IE $.ajax on my computer is taking 1sec - 3 sec. only call of this function. In jquery code there is: var xml = window.ActiveXObject ? new ActiveXObject(Microsoft.XMLHTTP) : new XMLHttpRequest(); i suppose this is the problem. Please give me some suggestions.
[jQuery] Re: jquery VS internet explorer
Validating with XHTML 1.0 strict it works correctly, thanks for all!!!
[jQuery] Re: Is it possible to do this with Jquery?
Even better from Giovanni Carlo Mingati: http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html Simpler, and just do what you need. You must simply put the images inside a link inside lists. On Jan 28, 3:14 pm, Matt Quackenbush [EMAIL PROTECTED] wrote: http://plugins.jquery.com/project/cycle On Jan 27, 2008 11:07 PM, cameron wrote: I'm wondering if this is possible to do with jquery. An example of what I'm looking for can be found at the top of this page; http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=687 The images are scrolling horizontally in a loop. On mouseover the scroll pauses, on mouseout, it starts again. Each image can be a link. Is it possible to do this with a ul of images and some jquery?
[jQuery] Rolodex plugin anyone?
Check this out: http://devcenter.yesmail.com/com.yesmail.magellan.gwt.rolodexdemo.RolodexDemoApp/RolodexDemoApp.html Does someone feels like porting this to jquery? I would love to, but that's far beyond my reach for the moment. Besides, i'm actively working on jquploader2 in my scarce free time. Alexandre
[jQuery] Upgrading from jQuery 1.2.1 to 1.2.2 - What happened to nodeType attribute selector, e.g. not('[nodeType=1]') in IE?
All, in jQuery 1.2.1 I was using the following snippet, which I actually more or less took from the documents example page: $('p').contents().not('[nodeType=1]').replaceWith(' '); I used this to empty out some text nodes I couldn't control otherwise but leave other HTML elements alone. That wasn't working in IE any longer after I upgraded to jQuery 1.2.2. The following is: $('p').contents().filter('[nodeType=3]').replaceWith(' '); Is this a bug or is one not supposed to use not with such internal attributes anyway (I noticed that the example has been removed from the docs). --Klaus
[jQuery] Re: [ANN] Lily, javascript visual programming tool
The minVersion in the install.rdf is 2.0.0 I changed to 2.0.0.* and it installed On Jan 29, 2008 9:33 PM, Bill Orcutt [EMAIL PROTECTED] wrote: Thanks for the useful feedback on the site. I've added another download link and will implement some of the other suggestions as I find time. I hope once you've had a chance to have a look at the program, you'll consider joining the user group- http://groups.google.com/group/lily-users. -Bill On Jan 29, 4:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Jörn Zaefferer schrieb: BillOrcuttschrieb: [...] Have a look at the demo applications below to get a feel for some of what Lily can do: [...] More information about Lily is available on the website: http://www.lilyapp.org/ Wow. Thats amazing stuff, I love the svg/javascript sound demos. Using interactive visuals to create music is so much fun. Now I just need to take a closer look how Lily enbales stuff like that, so most likey more feedback coming soon from here. Okay, some things: You need a Getting Started section and make that awfully obvious to find on the lilapp.org front page. Currently its difficult to find the download or even the wiki (which doesn't help in that respect). Along the link to the download should be the content of the readme file, avoid the need to download the package before being able to understand what and how to install. I found the download link only on the Public Beta 1 release post, which isn't even on the front page anymore. I also wonder if that couldn't be installed directly from the page - its just a firefox extension, isn't it? That way I wouldn't need to save anything on my disk and unpacking it. The included examples and demos could be provided via the page/wiki. Ah. After writing all that I discovered the top navigation bar, including the download link. You may want to make that a bit more obvious... Jörn -- http://morglog.alleycatracing.com Lets make up more accronyms! http://www.alleycatracing.com LTABOTIIOFR! ROFL! ROFL! ROFL! Upcoming alley cats, reviews, touring logs, and a general congregation of bike nerdity.
[jQuery] Re: link stops working in fragment returned from ajax depending on select
Hey thanks. I tried this but not sure where to put it. This doesn't work. [code] $document.ready(function() { $(#wrapBA).hide(); $(select#ba).livequery('change',(function() { var ba = $(select#ba).val(); $.ajax({ type: POST, url: not_working_overlay_info.php, data: ba= + ba, dataType: html, cache: false, error: function(){ alert('Error loading BA start files'); }, success: function(data) { $(#wrapBA).html(data); $(#BAModelName).html(BA - +ba).show().addClass(BAModelName); $(#wrapBA).slideDown('slow'); } }); return false; })); }); [/code] On 29 Jan, 18:21, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Once your data is loaded into the page your bind events are not bound anymore, since you replaced the DOM information. You can either rebind events with running a rebind function, or you can use live jQueryhttp://brandonaaron.net/docs/livequery/ Should fix your problem. -Kyle On Jan 29, 6:08 am, K Bouton [EMAIL PROTECTED] wrote: I have two dropdown boxes, which, when clicked, return via ajax some information in a div. Inside that information is are multiple links. When I click on the left select- the links in the div below work fine. If I refresh and click on the right select- the links in the div below work fine. So each individual select box works as I would expect it. But... if I refresh and click on the left select, then click on the right select - the link for that right select work fine but the links from the left select no longer work? The links for the right select always work, regardless Seehttp://ncas-cms.nerc.ac.uk/data/startFiles/not_working_anim_overlay.php Any ideas what is going wrong? abbreviated code below for the form - hand typed in so there may be typos [code] $(document).ready(function() { $(#wrapBA).hide(); $(#wrapMO)).hide(); $(select#ba).change(function() { var ba = $(select#ba).val(); //var ba = $ (this).children(option:selected).attr(value); $.ajax({ type: POST, url: not_working_overlay_info.php, data: ba= + ba, dataType: html, cache: false, error: function(){ alert('Error loading BA start files'); }, success: function(data) { $(#wrapBA).html(data); $(#BAModelName).html(BA - +ba).show().addClass(BAModelName); $(#wrapBA).slideDown('slow'); } }); return false; }); $(select#mo).change(function() { var mo = $(select#mo).val(); $.ajax({ type: POST, url: not_working_overlay_info.php, data: mo= + mo, dataType: html, cache: false, error: function(){ alert('Error loading MO start files'); }, success: function(data) { $(#wrapMO).html(data); $(#MO_ModelName).html(MO - +mo).show().addClass(MO_ModelName); $(#wrapMO).slideDown('slow'); } }); return false; }); }); div class=BAModelName id=BAModelNameNo BA Model Chosen/div div id=wrapBA/div div class=MO_ModelName id=MO_ModelNameNo MO Model Chosen/div div id=wrapMO/div [/code] abbreviate relevant not_working_overlay_info.php - [code] for ($m=1;$m=12;$m++) { echo 'div class=availableBADC_'.$m.' a href=test.php'.$m.'/ a/div';} [/code]
[jQuery] Issue with IE and dom injection
We have just finalized an upgrade of all our code and jquery plug-ins to the new jquery 1.2.2 migrating from 1.1.3. We are heavily using ajax to build highly interactive web sites. Since the upgrade, we face a major issue with IE (we only tested IE 7, not IE 6 yet). While initially suspecting that it was an ajax issue, we found out all ajax requests were successfull. The loaded content correctly shows up in responseText as displayed by an alert(responseText) issued by an ajax succes callback. But we can't get it to show in the target div. Looking into the target div with the IE developper toolbar DOM inspector shows that the target div is empty. Using the CSD javascript debugger, we isolated that the issue seems to be in the jquery append function without being able to understand why. Did also the test with yesterday nightly build without success ? Failing DOM injection is the result of using the ajaxSubmit plug-in function or the ui.tabs remote load as well as ajaxContent plug-in not cde that we have written. Works fine in Opera 9.25 (Win and Mac), Firefox 2.0.0.11 (Win and Mac), Safari 3.0.4 (Mac) but fails on IE 7 Help welcome ! -- Robert Ernens HTCBA Consulting - Web-à-la-Carte®
[jQuery] Re: New and better demos
I meant that you need to replace the '...' with the duration/settings that you want. If you have doubts, the demo exemplifies the settings pretty well. $pane should be the container that you scroll, $items the pictures, don't forget to set the 'overflow' of the $pane to 'hidden' or 'auto'. Cheers Ariel Flesler On 30 ene, 08:37, caruso_g [EMAIL PROTECTED] wrote: Wow, you rocks, I would ever not even imagined that solution... :P I will try to implement it. But, what do you mean with //check the settings? Thanks again. On Jan 30, 1:20 am, Ariel Flesler [EMAIL PROTECTED] wrote: Ugh.. (function( $ ){ var last = 0, $pane = $('#container'), $items = $pane.find('li'); $('#next').bind('click', +1, handler ); $('#prev').bind('click', -1, handler ); function handler( e ){ var next = last + e.data; if( $items[next] ){ last = next; $pane.scrollTo( $items[next], ... );//check the settings } }; })( jQuery ); Ariel Flesler On 29 ene, 22:15, Ariel Flesler [EMAIL PROTECTED] wrote: Hi caruso, your situation remainds me of this:http://www.freewebs.com/flesler/jQuery.ScrollShow/ It's a plugin that actually uses ScrollTo. It's called ScrollShow:http://plugins.jquery.com/project/ScrollShow I kinda abandoned the plugin and it stayed in beta stage, but it automatically does what you are saying. If you use it, set the setting 'navigationMode' to 's' instead of 'sr', to release the click on the items, also set 'wrappers' to '', you don't need that. It can also be done with a small snippet that remembers the last, something like: (function( $ ){ nbsp;nbsp;var last = 0, nbsp;nbsp;nbsp;nbsp;$pane = $('#container'), nbsp;nbsp;nbsp;nbsp;$items = $pane.find('li'); nbsp;nbsp;$('#next').bind('click', +1, handler ); nbsp;nbsp;$('#prev').bind('click', -1, handler ); nbsp;nbsp;function handler( e ){ nbsp;nbsp;nbsp;nbsp;var next = last + e.data; nbsp;nbsp;nbsp;nbsp;if( $items[next] ){ nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;last = next; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; $pane.scrollTo( $items[next], ... );//check the settings nbsp;nbsp;nbsp;nbsp;} nbsp;nbsp;}; })( jQuery ); I checked the syntax was correct, but not that it works, I hope it does :) Thanks for you reply. Cheers Ariel Flesler As for adding that to LocalScroll... that plugins handles anchor, this is different. Maybe ScrollShow is the solution. On 29 ene, 18:57, caruso_g [EMAIL PROTECTED] wrote: Thanks Ariel, I didn't be able to use it for the following project (http://www.bonsai-studio.net/clients/lamoy/wessel02/albums/page2/inde... ) so I had to make some code to the ground up (think about I am just a designer... :P ). So here I am, I have a feature request! Can you implement a function to just use two links (left | right in the example above) to make the content scroll to the previous or the next item into the container? It would be great! I imagine the code I wrote should be horrible to your eyes, but that should make the idea of the feature I am talking about. It would be great if at the end of the items it could show again the first item, like Coda website, and so on. Thanks in advace. On Jan 29, 6:08 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Hi all Thanks a lot for your replies! @Jack I don't fully understand what you mean, could you explain it some more ? or maybe find an example (can be flash or anything). @caruso ScrollTo can scroll to any kind of element, not only LIs. Check the old demo, the first input field uses a CSS class based selector, with an :eq filter. You can use any kind of selector, but you must make sure it matches at least 1 DOM element. The first one will be taken into account. @Alexandre I really liked your comment, I also loved the psychodelic squares, but I realized the demo wasn't very useful in the end. So I started over. Thanks again, I'm open to new features for any of both plugins. Just beware not to go far away from the scope of the plugin. Cheers. Ariel Flesler On 29 ene, 14:48, Alexandre Plennevaux [EMAIL PROTECTED] wrote: in fact i just looked at the old demo and i find it quite nice looking too! (me love colours :) at least it's not webtwooish, which is a quality in my eyes :)http://www.freewebs.com/flesler/jQuery.ScrollTo/index.old.html On Jan 29, 2008 4:56 PM, caruso_g [EMAIL PROTECTED] wrote: Hi, thanks a lot for these great plugins. They are awesome. But I would make you a feature request, if possible, and, when you can. It would be great to be able to scroll to any kind of elements into the containner, and not only list items. Sometimes it happens that one can't know in
[jQuery] Is this the best way?
Hi, I was just wondering if there is any better way to accomplish that. Some divs has 'level' attribute, with a number. If that number is bigger than X, will remove the div. var x=4; // simulating level=parseFloat($this.attr('level')); $('.qualif').each(function() { if ($(this).attr('level')x) $(this).remove(); }); I don't know if we can set a filter in $('') to look at a custom attribute, should be simpler than Feij
[jQuery] Re: Rolodex plugin anyone?
Check this out: http://devcenter.yesmail.com/com.yesmail.magellan.gwt.rolodexdemo.RolodexDe moApp/RolodexDemoApp.html Does someone feels like porting this to jquery? I would love to, but that's far beyond my reach for the moment. Besides, i'm actively working on jquploader2 in my scarce free time. That's pretty slick. I was wondering if they did the image tilting using SVG (which is what I was hoping they'd somehow done) but instead they're using a PNG sprite: http://devcenter.yesmail.com/com.yesmail.magellan.gwt.rolodexdemo.RolodexDem oApp/547E629F750EB2A5E83A06E31D0649F6.cache.png -Dan
[jQuery] Re: tableSorter question: how to disable the last header?
Great. Perfect. Thanks. On Jan 25, 11:57 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi. I tried to use Widget or variable but without result. Than i edit table sorter plugin. It is very easy. In buildHeaders method after $tableHeaders = $(thead th,table); add this // set negative numbers like positive totalCols = $tableHeaders.length; for (var number in table.config.headers) { number = parseInt(number); if (number 0) table.config.headers[(totalCols + number)] = table.config.headers[number]; } and now numbering can be negative, but ONLY like string '-1': {sorter:false} On Jan 17, 10:13 pm, Leandro Vieira Pinho [EMAIL PROTECTED] wrote: Hi Guys, I would like to know, how to disable thelastheader. I don´t thelastcolumnwith the option to sort. I have tried it (see below) but withou success. var totalHeaders = ( $('table th').length - 1); $('table').tablesorter({ headers: { totalHeaders : { sorter: false } }, widgets: ['zebra'] }); OR $('table').tablesorter({ headers: { -1 : { sorter: false } }, widgets: ['zebra'] }); Some suggestion? Regards
[jQuery] Re: Is this the best way?
Hi Feijó, Not sure if I understand, but I'll have a go at it: var x = 4; $('.qualif').filter(function() { return parseFloat( $(this).attr('level') ) x; }).remove(); Joel Birch.
[jQuery] Re: Not a plugin but code for anyone trying to have collapse-able menu with cookies
that's awesome, Jörn! Thanks for sharing that code. I'm looking forward to playing around with it. Cheers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 29, 2008, at 6:49 PM, Jörn Zaefferer wrote: Karl Swedberg schrieb: Sorry for the repeat posts, but this is the first time I've looked at this sort of thing. I just realized that we can get up to 100 items by changing that bigIndex function -- just pad values less than 10 and append a delimiter to each one: [...] The serialization I've used for the treeview plugin works a bit different, but may be applied here, too. The relevant code is this: function serialize() { function binary(arg) { return arg ? 1 : 0; } var data = []; branches.each(function(i, e) { data[i] = $(e).is(:has(ul:visible)) ? 1 : 0; }); $.cookie(settings.cookieId, data.join() ); } function deserialize() { var stored = $.cookie(settings.cookieId); if ( stored ) { var data = stored.split(); branches.each(function(i, e) { $(e).find(ul)[ parseInt(data[i]) ? show : hide ](); }); } } Branches is the jQuery object containing all list items that contain nested lists in the tree. For each I add 1 or 0 to an array, depending on the visibility (:visible) of the nested list (is(:has(ul:visible))). That array is joined with no seperator and stored into the cookie. settings.cookieId is treeview by default and can be customized to enable storage of more then one tree on a single page. The deserialization works the other way round, splititing the ones/ zeros and showing and hiding the branches accordingly. This scales pretty well, the size of the tree doesn't matter, and the cookie is quite small, keeping the bandwith overhead rather low. Jörn
[jQuery] Re: Is this the best way?
Thats it! Nice code Thanks Joel Feijó Joel Birch escreveu: Hi Feijó, Not sure if I understand, but I'll have a go at it: var x = 4; $('.qualif').filter(function() { return parseFloat( $(this).attr('level') ) x; }).remove(); Joel Birch.
[jQuery] simplemodal and datepicker
Hi, I want to enable datepicker in the modal window that opens...datepicker works fine for itself but i cannot get it to work in modal. Any ideas? Modal window is loaded through ajax...
[jQuery] Re: JQuery Size YUI Compressor mod_deflate/GZIP
Haha, you cracked me up :) I'm not sure of the figures for processing the packed version, however this would need to be done for every page of your site that the user visits because the JS is cached in packed form. This means that whatever the overhead is for unpacking the packed version, the delay is applied to every page of your site. For this reason, even if the regular minified (non-packed) version was even a bit larger than it is, I'd definitely lean towards using it as this can be cached once and used without delay on all subsequent pages. Yahoo released a paper about the time they release YSlow--which indicated that, much to everyone's surprise, browsers are not caching content as much as we might think they are. http://yuiblog.com/blog/2007/01/04/performance-research-part-2/ 40-60% of Yahoo!'s users have an empty cache experience and ~20% of all page views are done with an empty cache. To my knowledge, there's no other research that shows this kind of information. And I don't know about you, but these results came to us as a big surprise. It says that even if your assets are optimized for maximum caching, there are a significant number of users that will always have an empty cache. This goes back to the earlier point that reducing the number of HTTP requests has the biggest impact on reducing response time. The percentage of users with an empty cache for different web pages may vary, especially for pages with a high number of active (daily) users. However, we found in our study that regardless of usage patterns, the percentage of page views with an empty cache is always ~20%. I found this really informative and a little surprising (especially since I think most people who use Yahoo use it on a fairly frequent basis.) -Dan
[jQuery] Re: .clone not work in FF or IE, please help
jQuery.clone(true) will only clone the events that it knows about ... in other words ... it clones the events it bound. -- Brandon Aaron On Jan 29, 10:35 am, chrismarx [EMAIL PROTECTED] wrote: should clone also work for behaviors that were not added by jquery? (like a google map?) i tried to clone a div with a google map, and although clone successfully copied all the elements, the behaviors were lost. append did the job for a workaround. should clone(true) be able to also grab all the associated behavior from child elements? On Jan 29, 10:13 am, Eridius [EMAIL PROTECTED] wrote: my code: var append_to = self.element.children('.cr_tab_content'); var clone_element = self.element.children('#' + id).clone(true) $(clone_element).appendTo(append_to); When I do this my element is still empty but should be filled with the cloned element var append_to = self.element.children('.cr_tab_content'); var clone_element = self.element.children('#' + id).clone(true) $(append_to).append(element.html()); work fine but I want to make sure and events are carried over. any help please? -- View this message in context:http://www.nabble.com/.clone-not-work-in-FF-or-IE%2C-please-help-tp15... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: JQuery Size YUI Compressor mod_deflate/GZIP
40-60% of Yahoo!'s users have an empty cache experience and ~20% of all page views are done with an empty cache. To my knowledge, there's no other research that shows this kind of information. And I don't know about you, but these results came to us as a big surprise. It says that even if your assets are optimized for maximum caching, there are a significant number of users that will always have an empty cache. This goes back to the earlier point that reducing the number of HTTP requests has the biggest impact on reducing response time. The percentage of users with an empty cache for different web pages may vary, especially for pages with a high number of active (daily) users. However, we found in our study that regardless of usage patterns, the percentage of page views with an empty cache is always ~20%. I found this really informative and a little surprising (especially since I think most people who use Yahoo use it on a fairly frequent basis.) On a related note: I did some testing with Yslow a few months back and I noticed that it does not always correctly report what is cached and what is not. It's been the primary reason why I've avoided trusting it blindly when optimizing pages. This happened when we introduced full image caching on one of our heavy-traffic sites. I was struggling for quite a while when it seemed that no matter what we did, not all stuff got cached, according to Yslow. Turning Yslow off and using a web proxy (Charles) to check for traffic we noticed that actually the images were cached as they should, although Yslow reported otherwise. I could investigate this a bit more and provide a demo page when I find the time for that. Of course the numbers above where propably generated from server logs so they should be correct - and equally alarming. Just a heads up. -- Suni
[jQuery] changing content for span tag on the fly
Hi Can someone please tell me how i can change the text between span tags on the fly using jQuery I have tag like this span id=scrollStats style=font-size: 70%; width: 80px; text- align: center; position: absolute; bottom: 392px; left: 15px;/span i have tried these but none seem to work $(#scrollStats).val(im here!!); $(#scrollStats).setText(works?); Thanks!
[jQuery] Re: Not a plugin but code for anyone trying to have collapse-able menu with cookies
Hi ty, If I understand your question correctly..I think you mean that if this menu was used throughout the site and your pages would be doing an include on this js file, will the menu stay the same from page to page with user selections. The answer is yes (i think), because it is using cookies. Thanks -bhaarat On Jan 30, 9:23 am, Ty (tzmedia) [EMAIL PROTECTED] wrote: IF the menu were used as an include and it was the sitewide navigation would the menu be persistent then? In other words, the menu will leave open the accordion button for the section the user is visiting? It seems like the solution that this is? thanks. On Jan 29, 4:53 pm, Karl Swedberg [EMAIL PROTECTED] wrote: No problem, Bhaarat! Glad you like it. Actually, the way I set it up, mine was limited to 10 or fewer links. But we can increase that number by calling a function that returns, for example, a base-32 string instead of index: function bigIndex(inival) { return (inival).toString(32); } The updated demo can be found, still, athttp://test.learningjquery.com/cookie-menu.html Good luck with your test page! --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 29, 2008, at 4:08 PM, Bhaarat Sharma wrote: Hi Karl, Thanks a lot! your solution is obviously much better and not dependent on how many links there are. since you are using 'each' function. I had the concept with me but not the power of ins and outs of jQuery :) Next i'll be trying to makehttp://www.coldfusionjedi.com/demos/sharp/ajaxLoadOnScroll/test.cfm in jQuery+jsp (not PHP for a change) will keep you posted! Thanks -bhaarat On Jan 29, 3:56 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Bhaarat, You've done a nice job here! I was wondering, though, if we could take advantage of the index value of the links, so I re-factored your code a bit (still using Klaus's cookie plugin). Here is what it looks like: $(document).ready(function() { $('#menu li ul').hide(); var cookieValue = $.cookie('menuCookie') || ''; $('#menu li a').each(function(index) { var $this = $(this), $checkElement = $this.next('ul'); if (cookieValue.indexOf(index) -1) { $checkElement.show(); } $this.click(function() { if ($checkElement.is(':hidden')) { $checkElement.slideDown(); cookieValue = cookieValue + index; $.cookie('menuCookie', cookieValue); } else { $checkElement.slideUp(); cookieValue = cookieValue.replace(index,''); $.cookie('menuCookie', cookieValue); } return false; }); }); }); I put up a little demo page here: http://test.learningjquery.com/cookie-menu.html On the demo page, I also added a little function to show the value of the cookie and called the function onready and onclick: function showCookie() { if (!$('#jar').length) { $('div id=jar/div').appendTo('body'); } $('#jar').text(document.cookie); } Cheers, --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 29, 2008, at 1:41 PM, Bhaarat Sharma wrote: Hi, I took the code from jQuery Accordion menu and am using the cookie plugin. while searching for a collapse-able menu I saw that a lot of people were looking for this but with cookies so when user refreshes..the collapse/expand state stay the same. I am new to jQuery and even javascript. But here I have jotted down something which is working for me. Experts out there: if you would like to add some suggestions on how to better do this..i'd appreciate it. I dont like the fact that i am different cookies for different menu items... function initMenu() { $('#menu ul').hide(); if ($.cookie('the_cookie1')=='a'||$.cookie('the_cookie2')=='b'|| $.cookie('the_cookie3')=='c'|| $.cookie('the_cookie4')=='d') { if ($.cookie('the_cookie1')=='a') $(a).filter(.a).next().slideDown('fast'); if ($.cookie('the_cookie2')=='b') $(a).filter(.b).next().slideDown('fast'); if ($.cookie('the_cookie3')=='c') $(a).filter(.c).next().slideDown('fast'); if ($.cookie('the_cookie4')=='d') $(a).filter(.d).next().slideDown('fast'); } $('#menu li a').click( function() { var checkElement = $(this).next(); if((checkElement.is('ul')) (checkElement.is(':visible'))) { removeCookie($(this).attr('class')); checkElement.slideUp('fast'); } if((checkElement.is('ul')) (!checkElement.is(':visible'))) { setCookie($(this).attr('class')); checkElement.slideDown('fast'); return false; } }); /*$('#menu li a').click( function() { setCookie($(this).attr('class'));
[jQuery] Re: changing content for span tag on the fly
Try $(#scrollStats).html(im here!!); Bhaarat Sharma wrote: Hi Can someone please tell me how i can change the text between span tags on the fly using jQuery I have tag like this span id=scrollStats style=font-size: 70%; width: 80px; text- align: center; position: absolute; bottom: 392px; left: 15px;/span i have tried these but none seem to work $(#scrollStats).val(im here!!); $(#scrollStats).setText(works?); Thanks!
[jQuery] Re: changing content for span tag on the fly
*dope* $(#scrollStats).html(someting); that works. ...should visit the api's more often... On Jan 30, 10:55 am, Bhaarat Sharma [EMAIL PROTECTED] wrote: Hi Can someone please tell me how i can change the text between span tags on the fly using jQuery I have tag like this span id=scrollStats style=font-size: 70%; width: 80px; text- align: center; position: absolute; bottom: 392px; left: 15px;/span i have tried these but none seem to work $(#scrollStats).val(im here!!); $(#scrollStats).setText(works?); Thanks!
[jQuery] Re: changing content for span tag on the fly
oh haha thanks. we replied at the same time :) On Jan 30, 11:11 am, Bhaarat Sharma [EMAIL PROTECTED] wrote: *dope* $(#scrollStats).html(someting); that works. ...should visit the api's more often... On Jan 30, 10:55 am, Bhaarat Sharma [EMAIL PROTECTED] wrote: Hi Can someone please tell me how i can change the text between span tags on the fly using jQuery I have tag like this span id=scrollStats style=font-size: 70%; width: 80px; text- align: center; position: absolute; bottom: 392px; left: 15px;/span i have tried these but none seem to work $(#scrollStats).val(im here!!); $(#scrollStats).setText(works?); Thanks!
[jQuery] Re: Not a plugin but code for anyone trying to have collapse-able menu with cookies
On Jan 30, 2008, at 10:57 AM, Bhaarat Sharma wrote: Hi ty, If I understand your question correctly..I think you mean that if this menu was used throughout the site and your pages would be doing an include on this js file, will the menu stay the same from page to page with user selections. The answer is yes (i think), because it is using cookies. That's right. The cookies work at the domain level, unless otherwise specified. On my test page (http://test.learningjquery.com/cookie-menu.html), I put a link to another page with the same script and menu so you can see the persistence of the expand/collapse state. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: changing content for span tag on the fly
Or, if you know that you'll be using just text (no html tags), you could do this: $(#scrollStats).text(someting); --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 30, 2008, at 11:11 AM, Bhaarat Sharma wrote: *dope* $(#scrollStats).html(someting); that works. ...should visit the api's more often... On Jan 30, 10:55 am, Bhaarat Sharma [EMAIL PROTECTED] wrote: Hi Can someone please tell me how i can change the text between span tags on the fly using jQuery I have tag like this span id=scrollStats style=font-size: 70%; width: 80px; text- align: center; position: absolute; bottom: 392px; left: 15px;/ span i have tried these but none seem to work $(#scrollStats).val(im here!!); $(#scrollStats).setText(works?); Thanks!
[jQuery] inserting adsense
Hello, I am trying to insert adsense code as follows: var ads = $(this).text(); /// the adsense code goes here $(tr).append( 'td colspan=5' + ads + '/td' ) ; $(tr).addClass('ads'); $('table#' + tablename + ' tr.header').after(tr); Nothing happens. If I put some other html code into scalar ads, it works. Any idea? Thank you, Felipe
[jQuery] Re: How to insert google adsense with after()
hi, did you find how to do it? thank you On 30 dez 2007, 20:10, Jirka [EMAIL PROTECTED] wrote: I try to add googleadsenseafter first paragraph of an article. Here is my code: $('.article p:eq(0)').after('script type=text/javascript ...GOGLEADSENSECODE... /script'); But it looks that tag script shouldnt be add into the DOM like this. Can anybody show me the right way?
[jQuery] Re: Tab Effect
Thanks, ocyrus! That helped! ...it does take dismayingly long for posts to show up here. On Jan 29, 1:49 pm, ocyrus [EMAIL PROTECTED] wrote: I recently solved this solution this way, $(document).ready(function(){ $('#profile-nav').children().each(function(){ $(this).click(function(){ toggleTabs($(this)); return false; }); }); }); function toggleTabs(tab) { tab.siblings().children().removeClass('on'); tab.children().addClass('on'); var div = tab.attr('class'); div = div.split('-'); div = div[1]; $('#'+div).parent().children().each(function(){ $(this).hide(); }); $('#'+div).show(); } and my html looks like this. ul id=profile-nav class=clearfix li class=tab-biographya href=# class=onBiography/a/li li class=tab-backgrounda href=#Background/a/li li class=tab-contacta href=#Contact/a/li /ul with three divs later div id=biography class=pro-tabInfo/div div id=background class=pro-tabInfo/div div id=contact class=pro-tabInfo/div On Jan 29, 9:46 am, studiobl [EMAIL PROTECTED] wrote: I have a set of tabs that use the sliding doors technique. The tabs are built on an unordered list, with each tab being a list item containing an anchor. Each tab is decorated by placing a graphic in the background of its list item for the left part of the tab, and the background of the anchor for the right side of the tab. These graphics then need to be switched out to display the active view. The actual html page is not changed. This tab navigation just triggers the visibility of various areas of the page. I'm trying to use jQuery to switch out the graphics. The problem I'm having is in selecting the list item that contains the clicked-on anchor. There are a number of techniques for selecting children, but none for selecting parents. One question I have is if there is any way to reference a previously selected element in a jQuery selector statement. Like this: $(.tabs a).click(function(){ //Now you can reference the clicked on anchor as this $(.tabs li:has(this)).doSomething(); }); I doubt that this is possible, I haven't tested it yet, but I can't think of too many other options. Any suggestions?
[jQuery] [validate] Validation Plugin - how to remove a control form validation
Hi there I'm building a login form, with a Forgot password link. When clicked, I need to unset some validation options to successfully submit the form. The code I'm running does this: 1 - remove the validation constraints from the password field 2 - hide any error messages that were displayed for the password field 3 - submit the form using form.submit() However, I can't seem to do either properly. Here's the code I'm using: $('#password').attr('validation', '') $('label.error[for=password]').hide() $(#login).validate() The problems are: 1 - form.submit() seems to bypass any of the validation 2 - if I click the submit button manually, the initial validation kicks in and the password error is re-displayed Can anyone shed any light on what I should be doing. I'm not sure if there are already options for this, alrthough I've looked through the docs several times over. Thanks, Dave
[jQuery] $.get and $.getJSON
Hi, i encounter problems with the getJSON method when i do that: $.getJSON(http://localhost/jas/www/rmt.php5?action=airport_state;, {country: $(this).val()}, function(json) { $.log(json); }); nothing happends. there is even no connection trace in firebug but $.get(http://localhost/jas/www/rmt.php5?action=airport_state;, {country: $(this).val()}, function(json) { eval(var a = +json); $.log(a); }); works fine php sends header(Content-type: application/json); so thats fine to. jquery version is 1.2.2 Any suggestions? Martin
[jQuery] Re: Is this the best way?
Hi Felix, I would have thought doing an attribute selector like you suggest was better. something like ... $('.qualif[level]).each ... to at least get rid of anything that doesn't have the level attribute. Also if you use the same tag name for all of these attributes its worth adding that as it also helps with efficiency, i.e. jquery only has to check those tags for level attribute. Depending on the exact use of the level attribute you might be able to get just the ones you want by using [attribute!=value] selectors. i.e. if you want greater than 4 and start at 0 $('.qualif[level!=0], .qualif[level!=1], .qualif[level! =2], .qualif[level!=3], qualif[level!=4]').remove(); Hope that helps. Also if any more expert on jquery knows more am keen to know better also. Cheers, Pete On Jan 30, 12:56 pm, Feijó [EMAIL PROTECTED] wrote: Hi, I was just wondering if there is any better way to accomplish that. Some divs has 'level' attribute, with a number. If that number is bigger than X, will remove the div. var x=4; // simulating level=parseFloat($this.attr('level')); $('.qualif').each(function() { if ($(this).attr('level')x) $(this).remove(); }); I don't know if we can set a filter in $('') to look at a custom attribute, should be simpler than Feijó
[jQuery] UI.TABS - how to load content when tab is selected
I have a tab that I don't want the content (generated from a separate .php file) to load untilt he user selects the tab. How can I do this? TIA
[jQuery] Re: [ANN] Lily, javascript visual programming tool
Thanks Morgan- I'll make that change On Jan 29, 10:58 pm, Morgan Allen [EMAIL PROTECTED] wrote: The minVersion in the install.rdf is 2.0.0 I changed to 2.0.0.* and it installed On Jan 29, 2008 9:33 PM, Bill Orcutt [EMAIL PROTECTED] wrote: Thanks for the useful feedback on the site. I've added another download link and will implement some of the other suggestions as I find time. I hope once you've had a chance to have a look at the program, you'll consider joining the user group- http://groups.google.com/group/lily-users. -Bill On Jan 29, 4:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Jörn Zaefferer schrieb: BillOrcuttschrieb: [...] Have a look at the demo applications below to get a feel for some of what Lily can do: [...] More information about Lily is available on the website: http://www.lilyapp.org/ Wow. Thats amazing stuff, I love the svg/javascript sound demos. Using interactive visuals to create music is so much fun. Now I just need to take a closer look how Lily enbales stuff like that, so most likey more feedback coming soon from here. Okay, some things: You need a Getting Started section and make that awfully obvious to find on the lilapp.org front page. Currently its difficult to find the download or even the wiki (which doesn't help in that respect). Along the link to the download should be the content of the readme file, avoid the need to download the package before being able to understand what and how to install. I found the download link only on the Public Beta 1 release post, which isn't even on the front page anymore. I also wonder if that couldn't be installed directly from the page - its just a firefox extension, isn't it? That way I wouldn't need to save anything on my disk and unpacking it. The included examples and demos could be provided via the page/wiki. Ah. After writing all that I discovered the top navigation bar, including the download link. You may want to make that a bit more obvious... Jörn --http://morglog.alleycatracing.com Lets make up more accronyms! http://www.alleycatracing.com LTABOTIIOFR! ROFL! ROFL! ROFL! Upcoming alley cats, reviews, touring logs, and a general congregation of bike nerdity.
[jQuery] Re: Manipulation of select objects
Nevermind. I got it to work. Thanks for the tips. They helped. On Jan 29, 6:20 pm, Josh Nathanson [EMAIL PROTECTED] wrote: Basically you can do this: $('select').each(function() { $(this).doWhatever() // will run the method doWhatever on the currently iterating select }); -- Josh - Original Message - From: RyanMC [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Tuesday, January 29, 2008 3:38 PM Subject: [jQuery] Manipulation of select objects I am working on a site where various dynamic content will be created each session. There will end up being between 1 and a very large number of select boxes on the page. Users are able to add items that need to be inserted into each select box. I found a plugin that allows me to addOption and adjust a select, but I can't seem to make it run through all select boxes on the page. I am quite new to jquery and any assistance would be very appreciated. Basically I need to know what selector to use to run through all selects. And if anyone is familiar with the addOption plugin and knows if it will work across multiple selects that would be fantastic too. If it won't anyone that can point me in the right direction to hand writing out the code for the select manipulation would be great. I will end up removing items from the select as well.
[jQuery] jQuery in the wild: www.engenderhealth.org
EngenderHealth, a nonprofit organization, just redesigned its web site. They use jQuery in several places: menus, SIFR page titles, subpage related info links (in places), and even on its donation page. http://www.engenderhealth.org (Note: some Flash on the site, though I don't think it is required.) Anyway, looks pretty cool.
[jQuery] Selector Containing Variable
I'm having trouble with a jQuery selector that contains a variable. I'm trying to target an element that has a class of orderInfo and an id of billy So, I set a variable: var tabText = billy; ...and it works if I use the string: $(.orderInfo[id='billy']; ...but not the variable: $(.orderInfo[id=tabTest]; ...but of course I need it to work with a variable {insert appropriate emoticon here}
[jQuery] Re: Manipulation of select objects
I will give that a try thanks. On Jan 29, 6:20 pm, Josh Nathanson [EMAIL PROTECTED] wrote: Basically you can do this: $('select').each(function() { $(this).doWhatever() // will run the method doWhatever on the currently iterating select }); -- Josh - Original Message - From: RyanMC [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Tuesday, January 29, 2008 3:38 PM Subject: [jQuery] Manipulation of select objects I am working on a site where various dynamic content will be created each session. There will end up being between 1 and a very large number of select boxes on the page. Users are able to add items that need to be inserted into each select box. I found a plugin that allows me to addOption and adjust a select, but I can't seem to make it run through all select boxes on the page. I am quite new to jquery and any assistance would be very appreciated. Basically I need to know what selector to use to run through all selects. And if anyone is familiar with the addOption plugin and knows if it will work across multiple selects that would be fantastic too. If it won't anyone that can point me in the right direction to hand writing out the code for the select manipulation would be great. I will end up removing items from the select as well.
[jQuery] JQuery UI and ExtJS
Hi there, I tried to nest an ExtJS TreePanel into an Accordion menu (provided by jQueryUI) like this : -Header1 -Header2 MyTree -Header3 When I click on Header2, the TreePanel works fine (on FF only, IE doesn't seems to work). If I click on another header and come back to Header2, the the accordion doesn't seem to adapt his size to the tree : some of my child nodes are hidden. Any idea to fix that? Thanks for your help.
[jQuery] Re: simplemodal and datepicker
On Jan 30, 6:13 am, rayfidelity [EMAIL PROTECTED] wrote: Hi, I want to enable datepicker in the modal window that opens...datepicker works fine for itself but i cannot get it to work in modal. Any ideas? Can you clarify what you mean by cannot get it to work in modal? Modal window is loaded through ajax... Do you have a page or code that we/I can view? -Eric
[jQuery] [SITE SUBMISSION] Sapitot Creative
Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation. Check it out: www.sapitot.com
[jQuery] jQuery.Validation - Is there a way to display a spinner while validating field?
On Jan 30, 5:40 am, Rus Miller [EMAIL PROTECTED] wrote: There is a label.error and a label.checked but does anyone know how I would display a label.pending (perhaps with a spinner) while the validation (especially a remote request) is happening? Thanks.
[jQuery] Re: Manipulation of select objects
Apparently the addOption() plugin doesn't like using $(this). I thought I had tried that loop before, that was the reason. I am sure there is a way to add and remove options without that plugin. Any pointers on where to start there? On Jan 29, 6:20 pm, Josh Nathanson [EMAIL PROTECTED] wrote: Basically you can do this: $('select').each(function() { $(this).doWhatever() // will run the method doWhatever on the currently iterating select }); -- Josh - Original Message - From: RyanMC [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Tuesday, January 29, 2008 3:38 PM Subject: [jQuery] Manipulation of select objects I am working on a site where various dynamic content will be created each session. There will end up being between 1 and a very large number of select boxes on the page. Users are able to add items that need to be inserted into each select box. I found a plugin that allows me to addOption and adjust a select, but I can't seem to make it run through all select boxes on the page. I am quite new to jquery and any assistance would be very appreciated. Basically I need to know what selector to use to run through all selects. And if anyone is familiar with the addOption plugin and knows if it will work across multiple selects that would be fantastic too. If it won't anyone that can point me in the right direction to hand writing out the code for the select manipulation would be great. I will end up removing items from the select as well.
[jQuery] Datepicker showon link click
Hi, Does anyone know how to make the Datepicker (calendar) be displayed by clicking on a link next to a textfield. I know it has a button option and a focus option, but our old calendar used to be launched by a link, so users are used to that. Does anyone know how to do that? Thanks, -Roman
[jQuery] Re: Tab Effect
Hey no problem, and yea. I think they are moderated On Jan 30, 2008 7:23 AM, studiobl [EMAIL PROTECTED] wrote: Thanks, ocyrus! That helped! ...it does take dismayingly long for posts to show up here. On Jan 29, 1:49 pm, ocyrus [EMAIL PROTECTED] wrote: I recently solved this solution this way, $(document).ready(function(){ $('#profile-nav').children().each(function(){ $(this).click(function(){ toggleTabs($(this)); return false; }); }); }); function toggleTabs(tab) { tab.siblings().children().removeClass('on'); tab.children().addClass('on'); var div = tab.attr('class'); div = div.split('-'); div = div[1]; $('#'+div).parent().children().each(function(){ $(this).hide(); }); $('#'+div).show(); } and my html looks like this. ul id=profile-nav class=clearfix li class=tab-biographya href=# class=onBiography/a/li li class=tab-backgrounda href=#Background/a/li li class=tab-contacta href=#Contact/a/li /ul with three divs later div id=biography class=pro-tabInfo/div div id=background class=pro-tabInfo/div div id=contact class=pro-tabInfo/div On Jan 29, 9:46 am, studiobl [EMAIL PROTECTED] wrote: I have a set of tabs that use the sliding doors technique. The tabs are built on an unordered list, with each tab being a list item containing an anchor. Each tab is decorated by placing a graphic in the background of its list item for the left part of the tab, and the background of the anchor for the right side of the tab. These graphics then need to be switched out to display the active view. The actual html page is not changed. This tab navigation just triggers the visibility of various areas of the page. I'm trying to use jQuery to switch out the graphics. The problem I'm having is in selecting the list item that contains the clicked-on anchor. There are a number of techniques for selecting children, but none for selecting parents. One question I have is if there is any way to reference a previously selected element in a jQuery selector statement. Like this: $(.tabs a).click(function(){ //Now you can reference the clicked on anchor as this $(.tabs li:has(this)).doSomething(); }); I doubt that this is possible, I haven't tested it yet, but I can't think of too many other options. Any suggestions?
[jQuery] Re: •.¸¸.•´´¯`••._.• ((((º How To Create Wealth????
User is banned. -js On 1/30/08, ++ Corn Square ++ [EMAIL PROTECTED] wrote: Most Forex traders loose money, don't be one of them Forex made easy is as simple as you would want it to be. ... Forex can be made easier for beginners to understand it and here's how:- http://tiniuri.com/c/u7
[jQuery] Re: [validate] Validation Plugin - how to remove a control form validation
Dave Stewart schrieb: Hi there I'm building a login form, with a Forgot password link. When clicked, I need to unset some validation options to successfully submit the form. The code I'm running does this: 1 - remove the validation constraints from the password field 2 - hide any error messages that were displayed for the password field 3 - submit the form using form.submit() However, I can't seem to do either properly. Here's the code I'm using: $('#password').attr('validation', '') $('label.error[for=password]').hide() $(#login).validate() The problems are: 1 - form.submit() seems to bypass any of the validation 2 - if I click the submit button manually, the initial validation kicks in and the password error is re-displayed Can anyone shed any light on what I should be doing. I'm not sure if there are already options for this, alrthough I've looked through the docs several times over. Could you post an example page of your setup? For submitting the form it may help to not use jQuery, eg. $(#myform)[0].submit() instead of calling jQuery's submit method. Jörn
[jQuery] Re: Validation plugin - spinner while validating field?
Rus Miller schrieb: There is a label.error and a label.checked but does anyone know how I would display a label.pending (perhaps with a spinner) while the validation (especially a remote request) is happening? Thanks. You can still use jQuery's ajax events to display a busy-indicator: http://docs.jquery.com/Ajax_Events I acutally considered a pending state for remote-validated-fields, but dropped the idea in favor of a lack of those useless spinner icons. I found the goal to make the remote validation as unobtrusive as possible to the user a more worthwhile goal. Jörn
[jQuery] Re: Selector Containing Variable
On Jan 30, 2008, at 10:24 AM, studiobl wrote: I'm having trouble with a jQuery selector that contains a variable. I'm trying to target an element that has a class of orderInfo and an id of billy So, I set a variable: var tabText = billy; ...and it works if I use the string: $(.orderInfo[id='billy']; ...but not the variable: $(.orderInfo[id=tabTest]; ...but of course I need it to work with a variable {insert appropriate emoticon here} Hi there, The trick here is to concatenate the variable with the selector string. Something like this should work: $(.orderInfo[id= + tabTest + ]); --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Is this the best way?
Hi Cabbite Thanks for your 0.02 Its possible to simple use like this? $('.qualif[level3]').remove(); if level bigger then 3, remove it :) My code is dynamic, I cant just wrote all numbers I dont need to remove, like your example. Has to use a condition. Feijó cabbiepete escreveu: Hi Felix, I would have thought doing an attribute selector like you suggest was better. something like ... $('.qualif[level]).each ... to at least get rid of anything that doesn't have the level attribute. Also if you use the same tag name for all of these attributes its worth adding that as it also helps with efficiency, i.e. jquery only has to check those tags for level attribute. Depending on the exact use of the level attribute you might be able to get just the ones you want by using [attribute!=value] selectors. i.e. if you want greater than 4 and start at 0 $('.qualif[level!=0], .qualif[level!=1], .qualif[level! =2], .qualif[level!=3], qualif[level!=4]').remove(); Hope that helps. Also if any more expert on jquery knows more am keen to know better also. Cheers, Pete On Jan 30, 12:56 pm, Feijó [EMAIL PROTECTED] wrote: Hi, I was just wondering if there is any better way to accomplish that. Some divs has 'level' attribute, with a number. If that number is bigger than X, will remove the div. var x=4; // simulating level=parseFloat($this.attr('level')); $('.qualif').each(function() { if ($(this).attr('level')x) $(this).remove(); }); I don't know if we can set a filter in $('') to look at a custom attribute, should be simpler than Feijó
[jQuery] Re: Shadowbox Media Viewer
;) I thought you'd like that. Michael On Jan 29, 2008, at 12:17 PM, Aaron Heimlich wrote: And you got my extensible file extension -- plugin mappings request in there too! Woot! On Jan 29, 2008 4:29 AM, Michael J. I. Jackson [EMAIL PROTECTED] wrote: Hi all, Just wanted to let you all know that the jQuery adapter has been updated to include the kind of sweet jQuery functionality that Mike is talking about in this email. Head on over and give it a shot if you haven't already. http://mjijackson.com/2008/01/22/shadowbox-js-media-viewer-1-0-beta/ Thanks, Michael On Jan 25, 2008, at 4:20 PM, Mike Alsup wrote: I'm putting the finishing touches on a media viewer application that I coded up recently (think Thickbox). It can be used with jQuery or any other library. I created an adapter for jQuery, and I thought that somebody on this list might be interested. Michael, I really love what you've done with shadowbox. But I dislike having to add specific markup to drive the behavior. And as a jQuery user I really want to invoke it like this (for example): $('a[href$=swf]').shadowbox(); So if you're open to suggestion, I'd love to see a minor modification. Here's what I changed to make it more amendable to the jQuery calling style. 1. Added this method to shadowbox.js (just below the current setup fn): Shadowbox.setup2 = function(links){ for(var i = 0, len = links.length; i len; ++i) setupLink(links[i]); }; 2. Added this to shadowbox-jquery.js: jQuery.fn.shadowbox = function() { Shadowbox.setup2(this); }; Now I can call it like this without having to change any markup anywhere, so it becomes a drop-in replacement: $(function() { var options = { /* whatever */ }; Shadowbox.init(options); $('a[href$=swf]').shadowbox(); }); Of course there are more restrictions than one might expect from a traditional jQuery plugin (like not being able to pass options on a per-call basis), but it's a pretty minor change. Food for thought. Mike -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com
[jQuery] Re: [SITE SUBMISSION] Sapitot Creative
Love it! On 1/30/08, motob [EMAIL PROTECTED] wrote: Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation. Check it out: www.sapitot.com
[jQuery] Re: Not Submit [validate]
Marcos Aurélio schrieb: Ok, see: Join http://www.animeschool.com.br/example/. First test: Put in login AAA and name bbb click the button and submit it. Second test: First click the button. He acknowledge the mistakes, all ok. Now fill in the fields with AAA and bbb and click the button. He did not submit. Thanks for the testpage and description, that helped a lot. The easiest way to solve this issue is to include the ajaxQueue plugin (see lib/jquery.ajaxQueue.js in the download package). To prevent the issue to come up again I'll make the ajaxQueue plugin required for remote validation. Currently I've got no better idea then just display a completely annoying alert when the ajaxQueue plugin isn't included. Other ideas are welcome. Regards Jörn
[jQuery] Re: [SITE SUBMISSION] Sapitot Creative
Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation. Check it out: www.sapitot.com Overall it looks good. A couple of comments: 1) I'd change the URL each time one of the tabs is clicked--that way users can cut-n-paste the URLs and e-mail them. If possible, it'd also use meaningful hashes (like #store, #web, #print, #about, etc.) 2) Occasionally I was able to get the Loading... message that appears when you've clicked on a category to never go away. It seems to happen if you click on another menu option before the last animation has finished. (I suspect you're using a global variable to reset the value and this is getting overwritten.) -Dan
[jQuery] Re: [SITE SUBMISSION] Sapitot Creative
Looks really nice, but I would second Dan's comments and would probably suggest you implement the history plugin. Being in the DC area, 508 compliance is a big sell. On 1/30/08, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation. Check it out: www.sapitot.com Overall it looks good. A couple of comments: 1) I'd change the URL each time one of the tabs is clicked--that way users can cut-n-paste the URLs and e-mail them. If possible, it'd also use meaningful hashes (like #store, #web, #print, #about, etc.) 2) Occasionally I was able to get the Loading... message that appears when you've clicked on a category to never go away. It seems to happen if you click on another menu option before the last animation has finished. (I suspect you're using a global variable to reset the value and this is getting overwritten.) -Dan -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com http://www.benjaminsterling.com
[jQuery] Re: Too many autocompleter plugins
This was a major reason for moving to YUI on a current project I'm working on. Eric On Jan 27, 10:12 am, Christoph Haas [EMAIL PROTECTED] wrote: Fellow earthicans... A year ago I needed an autocompleter and tried Dylan Verheul's plugin (http://www.dyve.net/jquery/?autocomplete). I found that it lacked a few things and had some bugs I can't remember any more. Later I stumbled across a derived version athttp://www.pengoworks.com/workshop/jquery/autocomplete.htm. It was a bit better but I couldn't switch off subset matching properly. Example... Pengoworks code: options.matchSubset = options.matchSubset || 1; My patch: options.matchSubset = options.matchSubset || 0; I'm not sure I'm right here but I couldn't pass on matchSubset:0 because the || 1 would re-enable it. Or was I missing anything? Now I'm stuck with my hacked version of a hacked version of an autocomplete plugin that may have fixed a few things. Can anybody enlighten me which autocomplete plugin can decently be used? Thanks. Kindly Christoph -- [EMAIL PROTECTED] www.workaround.org JID: [EMAIL PROTECTED] gpg key: 79CC6586 fingerprint: 9B26F48E6F2B0A3F7E33E6B7095E77C579CC6586
[jQuery] Inline hover menu needed
Hi, I'm looking for (likely) a plugin that will allow text/images to overlay a small menu when hovered on, disappearing onMouseOut after a second or two. Example: http://www.medhelp.org/posts/show/418157 Something similar to the ContextMenu plugin would be great, if you could set the trigger to onMouseover versus right-click. Any ideas? Thanks, SEAN O www.sean-o.com -- View this message in context: http://www.nabble.com/Inline-%22hover-menu%22-needed-tp15191011s27240p15191011.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: there is a conflict ui.resizable.js and ajaxpro
On Jan 30, 9:10 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: resizable will not be able when using ajaxpro,the javascript error: c[0] has no properties code: for(var i in this.options.modifyThese) { var c = this.options.modifyThese[i]; c[0].css({ width: modifier.width ? modifier.width+c[1] : nw+c[1], height: modifier.height ? modifier.height+c[2] : nh+c[2] }); } Just a guess, but these kind of errors occur if other libraries/ scripts modify the base Object, e.g. adding properties to its prototype. A for-in loop then loops over these properties as well giving you unexpected results. Doing this is considered bad practice for obvious reasons. --Klaus
[jQuery] Re: simplemodal and datepicker
I've had a lot of questions about modal windows and UI Datepicker, so I created a demo example using thickbox: http://marcgrabanski.com/code/ui-datepicker/extras/thickbox-datepicker I hope that helps. On Jan 30, 10:55 am, Eric Martin [EMAIL PROTECTED] wrote: On Jan 30, 6:13 am, rayfidelity [EMAIL PROTECTED] wrote: Hi, I want to enable datepicker in the modal window that opens...datepicker works fine for itself but i cannot get it to work in modal. Any ideas? Can you clarify what you mean by cannot get it to work in modal? Modal window is loaded through ajax... Do you have a page or code that we/I can view? -Eric
[jQuery] Re: Inline hover menu needed
You may want to have a look at: cluetip: http://plugins.learningjquery.com/cluetip/demo/ On Jan 30, 12:15 pm, Sean O [EMAIL PROTECTED] wrote: Hi, I'm looking for (likely) a plugin that will allow text/images to overlay a small menu when hovered on, disappearing onMouseOut after a second or two. Example:http://www.medhelp.org/posts/show/418157 Something similar to the ContextMenu plugin would be great, if you could set the trigger to onMouseover versus right-click. Any ideas? Thanks, SEAN O www.sean-o.com -- View this message in context:http://www.nabble.com/Inline-%22hover-menu%22-needed-tp15191011s27240... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Is this the best way?
On 31/01/2008, Feijó [EMAIL PROTECTED] wrote: Its possible to simple use like this? $('.qualif[level3]').remove(); I don't think there is a way to do that unfortunately. Pete had a good point about optimising your selector for speed though. For example, if you know all the .qualif elements are divs and are all within a particular parent that has an id, say 'content', then you should write the selector with greater specificity like so: $('#content div.qualif').filter( ... Joel Birch.
[jQuery] Re: inserting adsense
var ads = $(this).html(); On Jan 30, 9:06 pm, felipe [EMAIL PROTECTED] wrote: Hello, I am trying to insert adsense code as follows: var ads = $(this).text(); /// the adsense code goes here $(tr).append( 'td colspan=5' + ads + '/td' ) ; $(tr).addClass('ads'); $('table#' + tablename + ' tr.header').after(tr); Nothing happens. If I put some other html code into scalar ads, it works. Any idea? Thank you, Felipe
[jQuery] [validate] Require with more then one selector
Pardon the mixing of comment formats. // must be non-blank - values are digits select name=port id=port class={required: true} .../select // Port not found in previous list - values are strings select name=country id=country class={required: '#port[value=-1]'}.../select // Port not found in previous list - value is a string input name=new_port id=new_port class={required: '#port[value=0]'}/ // Port not found AND Country not found - how do I require both? input name=new_country id=new_country class={required: '#country[value=]'}/ Can I do this as a class definition? Sud.
[jQuery] Re: UI.TABS - how to load content when tab is selected
Look at the Ajax Tabs section of the Tabs demo page (http:// stilbuero.de/jquery/tabs_3/) On Jan 30, 9:14 am, carvingcode [EMAIL PROTECTED] wrote: I have a tab that I don't want the content (generated from a separate .php file) to load untilt he user selects the tab. How can I do this? TIA
[jQuery] random option for Cycle not working?
For some reason, Cycle is not randomizing the order of my blurbs. script type=text/javascript $(document).ready(function(){$('#blurbs').cycle({fx:'turnDown',random: 1,timeout:1});}); /script Anyone know why this might be?
[jQuery] Re: Shadowbox Media Viewer
Does it work with an imagemap? Blaise
[jQuery] JQuery - Interface question
Hi all, I just built out a search page using the Jquery Interface plug-in. Specifically the slider function. You can view it on this page: http://www.totalbeauty.com/reviews/product_finder Unfortunately, the prices do not update as you slide the sliders. They update when you stop and unclick. I used one of the demos as a base, and did some minor tweaking. So, I have no idea why the prices aren't updating on the fly. Here's the demo I used: http://interface.eyecon.ro/demos/slider_minmax.html Any help would be greatly appreciated. Jason Cole
[jQuery] Fighting a closure
This code works... $(#port0).click(function() {bigchart(0)}); $(#port1).click(function() {bigchart(1)}); $(#port2).click(function() {bigchart(2)}); $(#port3).click(function() {bigchart(3)}); $(#port4).click(function() {bigchart(4)}); Naturally, I want to do this: var portname=#port+i;
[jQuery] Fighting a closure
I think I submitted a half-done version of this message by accident a few minutes ago. Sorry. This works: $(#port0).click(function() {bigchart(0)}); $(#port1).click(function() {bigchart(1)}); $(#port2).click(function() {bigchart(2)}); $(#port3).click(function() {bigchart(3)}); $(#port4).click(function() {bigchart(4)}); I try to roll it up like this: for (i=0;i5;i++) { $(#port+i).click(function() {bigchart(i)}); } But the closure gets me. When the function is called, i is 5 for any of the buttons. What is the elegant solution here?
[jQuery] onClick prepend
I am trying to make the on-click event of any element optional depending on what the user decides. The only functions I see out there append a function to the on-click event. I have played with the browser bubbling / catching stuff too. That worked in Firefox but not in IE 7. It seems I can't access the on-click function if it was defined within the element's onclick= attribute. Here are my two approaches. Tell me if you have a better idea. b1) eval() /b// I guess IE doesn't like us using this. Firefox doesn't care. script type=text/javascript $(document).ready(function() { var onClickAttr = $('#clickTester').attr('onclick'); $('#clickTester').removeAttr('onclick').click(function(){ if (confirm('Perform Original Action?')) { eval(onClickAttr); } } }); /script input type=button id=clickTester onclick=alert('Original Action Performed.'); value=Do It! b2) Bubbling /b// Again, IE problems while Firefox works just fine. script type=text/javascript $(document).ready(function() { var $span = $('lt;spangt;lt;/spangt;').attr('onclick', $('#clickTester').attr('onclick')); $('#clickTester').removeAttr('onclick').wrap($span); $('#clickTester').click(function(event){ if (!confirm('Perform Original Action?')) { event.stopPropagation(); } }); }); /script input type=button id=clickTester onclick=alert('Original Action Performed.'); value=Do It!
[jQuery] Re: Not Submit [validate]
Thanks for the answer! I think you should put your validate / delegate / ajaxQueue in the same file. In my case, and the majority, only use these two plugins to run validate, and for this reason we have to include 3 files. Make a package, all built. Bye! On 30 jan, 15:48, Jörn Zaefferer [EMAIL PROTECTED] wrote: Marcos Aurélio schrieb: Ok, see: Joinhttp://www.animeschool.com.br/example/. First test: Put in login AAA and name bbb click the button and submit it. Second test: First click the button. He acknowledge the mistakes, all ok. Now fill in the fields with AAA and bbb and click the button. He did not submit. Thanks for the testpage and description, that helped a lot. The easiest way to solve this issue is to include the ajaxQueue plugin (see lib/jquery.ajaxQueue.js in the download package). To prevent the issue to come up again I'll make the ajaxQueue plugin required for remote validation. Currently I've got no better idea then just display a completely annoying alert when the ajaxQueue plugin isn't included. Other ideas are welcome. Regards Jrn
[jQuery] Re: [SITE SUBMISSION] Sapitot Creative
Also, you could dim the first view and thumbnail on the print and web pages to show that they're currently displayed. A beautiful site, though! I was actually planning on doing the same drop-down effect on my site redesign (which should be done sometime in '09). Stole my thunder! On Jan 30, 3:04 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: Looks really nice, but I would second Dan's comments and would probably suggest you implement the history plugin. Being in the DC area, 508 compliance is a big sell. On 1/30/08, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation. Check it out:www.sapitot.com Overall it looks good. A couple of comments: 1) I'd change the URL each time one of the tabs is clicked--that way users can cut-n-paste the URLs and e-mail them. If possible, it'd also use meaningful hashes (like #store, #web, #print, #about, etc.) 2) Occasionally I was able to get the Loading... message that appears when you've clicked on a category to never go away. It seems to happen if you click on another menu option before the last animation has finished. (I suspect you're using a global variable to reset the value and this is getting overwritten.) -Dan -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com
[jQuery] Loading GIF Slideshow w/o Modal
I'm looking for a jQuery slideshow plugin, and I can't seem to fond one that does all I need. Cycle and jCarousel come close. But my problem is I have multiple galleries on one page, and they all have large images. So, since they load all the images in every gallery and then hide them, the page totals over 4000KB. I need something like Litebox or Thickbox that calls the next/prev image and loads it as needed, with a loading gif. But I don't want a pop-up modal. It would be nice if I could just put one image from each gallery in the HTML and have the prev/next buttons load and fade to the prev/next image. Any suggestions?
[jQuery] Re: [SITE SUBMISSION] Sapitot Creative
I had some trouble getting that history plugin to corporate with ui.tabs. I'll take another stab at it, maybe there are some updated documentation in that area. I had not run into that Loading... issue when I was running thru it, but I always waited until the transition finish. Ah the beauty of having other developers test. The loading... feature is automatic in the ui.tabs plugin. I'll see if I can use one of the callback functions to double check if the tab stuck on loading... and change it back to normal. Thanks Dan and Ben! Brian On Jan 30, 3:04 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: Looks really nice, but I would second Dan's comments and would probably suggest you implement the history plugin. Being in the DC area, 508 compliance is a big sell. On 1/30/08, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Sapitot Creative is a Design firm that recently redesigned their website. jQuery is being used to enhance page transitions and to give a little flair to the print and web portfolio sections. What is real interesting is the unconventional use of jQuery-ui.tabs plugin for the main navigation. Check it out:www.sapitot.com Overall it looks good. A couple of comments: 1) I'd change the URL each time one of the tabs is clicked--that way users can cut-n-paste the URLs and e-mail them. If possible, it'd also use meaningful hashes (like #store, #web, #print, #about, etc.) 2) Occasionally I was able to get the Loading... message that appears when you've clicked on a category to never go away. It seems to happen if you click on another menu option before the last animation has finished. (I suspect you're using a global variable to reset the value and this is getting overwritten.) -Dan -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com
[jQuery] Re: [validate] Email validation broken in plugin v1.2?!
Is there a way to change that? Or, what part of the email regex could I modify? I would think that most people would agree with me that @localhost wouldn't really be a valid email for production use. If I am wrong, then tell me, however, could you point me in the right direction to not allow a valid email without a .com, .net, etc, etc. Thanks. Regards, Seth On Jan 28, 3:10 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Yuval schrieb: Thisemail [EMAIL PROTECTED] validates perfectly on v1.2. No .com nothing... Is it broken or is it done on purpose? I tried it on my site AND on the remember-the-milk demo... Nope. Its perfectly valid, just as something like [EMAIL PROTECTED] is valid. Jörn
[jQuery] Re: Validation plugin - spinner while validating field?
My issue is that remote requests, especially those involving an external server, can take a second or two. It's nice to give the user an indication that something is happening, which is why a spinner isn't 'useless'. It would be great if someone could give me a push in the right direction. Also, I noticed that even though the 'Check URL' field on my form (http://monovisiondesign.com/client/jquery/validate-url/form.php) is not required, it still performs a remote call and a label.checked is applied to the field when it's left empty. Am I doing something wrong or is there a way to prevent that? On Jan 30, 1:17 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Rus Miller schrieb: There is a label.error and a label.checked but does anyone know how I would display a label.pending (perhaps with a spinner) while the validation (especially a remote request) is happening? Thanks. You can still use jQuery's ajax events to display a busy-indicator:http://docs.jquery.com/Ajax_Events I acutally considered a pending state for remote-validated-fields, but dropped the idea in favor of a lack of those useless spinner icons. I found the goal to make the remote validation as unobtrusive as possible to the user a more worthwhile goal. Jörn
[jQuery] Re: Selector Containing Variable
Hi, as Karl said...and you could also make things a little bit shorter by using multiple selector: var tabText = 'billy'; $('.orderInfo#'+tabText]; -- Bohdan -- View this message in context: http://www.nabble.com/Selector-Containing-Variable-tp15188162s27240p15194100.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Multiple Superfish on the same page problems
I am trying to have 3 different vertical lists that have flyouts for navigation. Here is the site (I know it is a mess right now): http://visitpalmbeach-com.alivedns.com/default.aspx Problem is the second and third menus get displayed horizontally. The flyouts works but the display is borked. If you mouse over the Kayak Tours Rentals you will see the fly out in the first menu. If you mouse over Attractions Arts you will see another menu working just displayed crazy. Thanks for any help!
[jQuery] change on select not working
$(select).change(function(){ alert(Selected: + this.value); }); Is there any reason why this wouldn't be working on all the selects on my page. I create the selects dynamically, but this is up in the $ (document).ready(function() { block of my code.
[jQuery] Re: Selector Containing Variable
you can try $('#' + tabtext) since the id is unic you don't need the class. On Jan 30, 7:24 am, studiobl [EMAIL PROTECTED] wrote: I'm having trouble with a jQuery selector that contains a variable. I'm trying to target an element that has a class of orderInfo and an id of billy So, I set a variable: var tabText = billy; ...and it works if I use the string: $(.orderInfo[id='billy']; ...but not the variable: $(.orderInfo[id=tabTest]; ...but of course I need it to work with a variable {insert appropriate emoticon here}
[jQuery] idle.slashdot.org uses jQuery
Not much activity on the site yet (its new), but its nice to see that they appreciate and use a great javascript library
[jQuery] Problem with sortables plugin (interface.js)
Please, help! I can't understand. I'm using plugin interface.js - sortables. I have 2 dropables fields and some sortables elements. It's works in FireFox and Opera, but in IE, once I grag one element, next time it's can not be dragged: http://test.mkechinov.ru/rc/rc.htm - dont worry about symbols - it's Russian. Try to drag one element, drop it and then drag again. What is wrong in code?
[jQuery] hi, im looking for some jcarousel help. more than one on same page?
http://groups.google.com/group/jquery-en/browse_thread/thread/7e44db31deae3703/8909400f98de18c8#8909400f98de18c8
[jQuery] Re: Multiple jCarousel 's on one page
help. On Jan 25, 10:37 am, Josh V [EMAIL PROTECTED] wrote: hi. On Dec 19 2007, 3:02 pm, Josh V [EMAIL PROTECTED] wrote: help. On Nov 30, 4:55 pm, Josh V [EMAIL PROTECTED] wrote: anybody? On Nov 29, 5:03 pm, Josh V [EMAIL PROTECTED] wrote: hi. i have a site where i need two different carousels on the same page. each carousel has a different purpose with different items and different controls. how can i go about getting this done? it seems to me there would be a css conflict issue with the jquery.jcarousel.css file. how do i specify 2 different css files for each carousel?
[jQuery] Re: Multiple Superfish on the same page problems
Hi there, It looks like you just need to add a width to your .nav rule. try width:183px; to begin with as this worked for me via Firebug. Joel Birch.
[jQuery] Re: Loading GIF Slideshow w/o Modal
Ange, Have a look at one of these plugins: http://benjaminsterling.com/category/jquery-plugin/ On 1/30/08, Ange [EMAIL PROTECTED] wrote: I'm looking for a jQuery slideshow plugin, and I can't seem to fond one that does all I need. Cycle and jCarousel come close. But my problem is I have multiple galleries on one page, and they all have large images. So, since they load all the images in every gallery and then hide them, the page totals over 4000KB. I need something like Litebox or Thickbox that calls the next/prev image and loads it as needed, with a loading gif. But I don't want a pop-up modal. It would be nice if I could just put one image from each gallery in the HTML and have the prev/next buttons load and fade to the prev/next image. Any suggestions? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com http://www.benjaminsterling.com
[jQuery] Re: [validate] Require with more then one selector
Sudrien schrieb: Pardon the mixing of comment formats. // must be non-blank - values are digits select name=port id=port class={required: true} .../select // Port not found in previous list - values are strings select name=country id=country class={required: '#port[value=-1]'}.../select // Port not found in previous list - value is a string input name=new_port id=new_port class={required: '#port[value=0]'}/ // Port not found AND Country not found - how do I require both? input name=new_country id=new_country class={required: '#country[value=]'}/ Can I do this as a class definition? In that I highly recommend just using a custom method. See http://docs.jquery.com/Plugins/Validation/Validator/addMethod and the billingRequired method here: http://jquery.bassistance.de/validate/demo/marketo/mktSignup.js Jörn
[jQuery] Re: random option for Cycle not working?
What version of the plugin? On Jan 30, 2008 1:26 PM, ZAP [EMAIL PROTECTED] wrote: For some reason, Cycle is not randomizing the order of my blurbs. script type=text/javascript $(document).ready(function(){$('#blurbs').cycle({fx:'turnDown',random: 1,timeout:1});}); /script Anyone know why this might be?
[jQuery] Re: Superfish 1.4.1 update released
Hi Joel, I'll try to give you some feedback. First some remarks and questions and then a bug report : You may change some filenames. For instance helperPlugin.js to hoverIntent.js or vertical.css to superfish-vertical.css I think it would be nice to put an exemple menu at the top of the superfish homepage so that a new user can immediatelly see what it about. About the callbacks. Would they enable us to write for instance this code outside of superfish ? http://www.klaasse.net/superfish-ext/superfish.html I have a link that you may have a look to. The HTML is not very neat and it lacks accessibility but the transparency handling is really impressive: http://www.myluckystar.lu/pwc/My-job/Find-your-Lucky-Star/Find-your-Lucky-Star Do you think it could be done using superfish and its callbacks ? #Bug report using http://users.tpg.com.au/j_birch/plugins/superfish/vertical-example/ on my 1024x768 laptop 1.Small css issue in FF, Opera,IE6 when the submenu deploys the right border moves 1px to the right. In FF it can be fixed with the following change: .nav li ul { top:-999em; position:absolute; width:10.*5*5em; } 2.Persistant area bug in Opera If you hover and then move away, the is a blue rectangle that persists where the bottom of the submenu was. I have no fix for this. 3.Opera, very minor, but hovering the first pixel row of an item triggers the change of background color but not the display of the submenu. 4.another subtle unwanted behavior: At the end of the display animation of the submenus of the second and forth item, the text and the bottom border of the first of the submenu has a 1px movement to the bottom. It seems weird, I dont know anybody else can reproduce it. Personally it tend to believe that it is linked to some em calculations, and maybe that my computer is rather slow, so I have the time to see it. 5. similar to #4 on http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal-example/ the d submenu item behaves oddly. Thank for this release, its getting better and better ! Olivier Joel Birch wrote: Hi everyone, Just a quick announcement to help keep interested parties up-to-date on the progress of the Superfish menu plugin. I just released version 1.4.1. In addition to some code optimisations, some notable changes are: - more optional callback functions to hang your enhancements off. I'm hoping this will mean that if you have ideas for new functionality that do not justify being in the core itself, you can now add it via the callbacks leaving the core lean and easily update-able. - version 1.4.1 is now fully compatible with jQuery versions going right back to 1.1.2 so you can use the latest Superfish release even if you are stuck using an old version of jQuery. Just set the new 'oldJquery' setting to 'true' for jQuery versions prior to 1.2 - you can set the new 'disableHI' setting to 'true' to make Superfish ignore the presence of the hoverIntent plugin for the rare cases when you want a long hoverIntent delay, for Cluetip for example, at the price of no delay for your Superfish menu. - finally resolved a long-standing bug whereby, when using the pathClass option (see the two-tiered-horizontal navbar example page), the path to the current page was not being restored after using the keyboard to navigate through the links. I'm very happy with this release - it seems really bulletproof. I've thoroughly tested it on all the usual browsers and platforms, but if you notice any odd behaviour I would really appreciate the feedback! Thanks for your time. http://users.tpg.com.au/j_birch/plugins/superfish/ Joel Birch.
[jQuery] jScrollPane: hide an arrow at end of content?
i was wondering if anyone has a quick and easy way to hide an arrow if you are at the beginning or end of the scrollable content. for instance i would want the top arrow to not be visible at first, because there is no content above it. and when i reach the end of the content, i would like the down arrow to disappear. I know enough to just set the position of the arrow object to some place so that it's not visible, but i don't know enough jQuery or how jScrollPane works to figure out how too do this. Is there an event that is triggered by jScrollPane when scrolling stops that reports the position? thanks for any help.
[jQuery] Re: Is this the best way?
Yeah, its all div and within a particular parent!! I'm alreading having that kind of care, adding specificity for all my selectors. It should improve performance, I bet :) Thanks Joel Joel Birch escreveu: On 31/01/2008, Feijó [EMAIL PROTECTED] wrote: Its possible to simple use like this? $('.qualif[level3]').remove(); I don't think there is a way to do that unfortunately. Pete had a good point about optimising your selector for speed though. For example, if you know all the .qualif elements are divs and are all within a particular parent that has an id, say 'content', then you should write the selector with greater specificity like so: $('#content div.qualif').filter( ... Joel Birch.
[jQuery] Re: Fighting a closure
Instead of binding five times, you can do it dynamically: $([id^=port]).click(function() { bigchart( this.id.charAt(this.id.length-1) ); }); Something close to that should do it. Although if you end up with 10 or more clickables you'll have to change your naming scheme a bit. -- Josh - Original Message - From: timothytoe [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, January 30, 2008 12:10 PM Subject: [jQuery] Fighting a closure I think I submitted a half-done version of this message by accident a few minutes ago. Sorry. This works: $(#port0).click(function() {bigchart(0)}); $(#port1).click(function() {bigchart(1)}); $(#port2).click(function() {bigchart(2)}); $(#port3).click(function() {bigchart(3)}); $(#port4).click(function() {bigchart(4)}); I try to roll it up like this: for (i=0;i5;i++) { $(#port+i).click(function() {bigchart(i)}); } But the closure gets me. When the function is called, i is 5 for any of the buttons. What is the elegant solution here?
[jQuery] Re: Another IE Sliding bug, the weirdest (some elements disappear and others not on SlideDown)
Any suggestions? On 27 jan, 18:45, Arkilus [EMAIL PROTECTED] wrote: While building my application with jQuery I found out this really weird internet explorer bug: Applying SlideDown to elements that are relative positioned or that have relative positioned parents, some elements just disappears. This behaviour may be checked athttp://www.arkilus.blogspot.comand a clean html athttp://paste.lymas.com.br//?q=22246 Performing some tests i found out some actions that bring that elements back: - Edit ANY css property live with IE Devoloper Toolbar - Fade effects in any part of the page - While the slider is sliding up This is so far the weirdest IE bug I could notice.
[jQuery] Parsing external XML files - Events Format
Hi! Im working in a project that needs to parse like 10 external XML or RSS resources of events. Some of this XML resources uses this format: http://web.resource.org/rss/1.0/modules/event/ ev:startdate ev:enddate ev:location ev:organizer ev:type Other resources are not using this standard tags, they use tags in different languages like: titulo fechainicio fechafinal categoria another example: title description startdate Some of this events have description others dont. Some events are Google Calendar XML format. My question to you is not about to do my homework, is about standards and the best way to design or parse something that can have a lot of differents formats. There exist a way to parse an xml file with different formats and indentation of tags using Jquery? Now im going to investigate: http://blog.reindel.com/2007/09/24/jquery-and-xml-revisited/ http://ajaxian.com/archives/ajaxian-featured-tutorial-parsing-xml-with-jquery http://cgaskell.wordpress.com/2006/11/02/jquery-ajax-call-and-result-xml-parsing/ http://ajaxian.com/archives/ajaxian-featured-tutorial-parsing-xml-with-jquery Thanks in advance.