Re: [jQuery] Interface: Draggable Ghost should only show the border
I have to update my window plugin some time.. All those nice jQuery releases make my life so much easier! Thanx you guys for activly devving this!! Stefan Petre wrote: floepi wrote: Hi all, i was wondering how i can set my draggable options so that while dragging a copy of the element is made which shows only the border dimensions of it's parent element. Gilles window plugin (http://gilles.jquery.com/window/) does that really nicely. My problem is, that the modal divs i want to drag around contain a lot of data like forms and such. While dragging the browser update is really bad and i get this stutter effect, which makes the overall feel quite bad. Hope somebody can give me a hint. Cheers Phil Hi Phill, I change draggables so now you can drag only a frame by setting option 'frameClass' with the name for the frame's class. This will be released at the end of the week. Stefan ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [jquery] what if the button wasn't there when the page loaded?
$('#myButton').click(function() { $('#myTarget').load('myfile.html' function() { alert('my callback'); }); }); The above says: when myButton is clicked, load myfile.html into myTarget and alert me when it's done. And then you can rebind any event handlers you want, but do this only on the #myTarget, else the events get binded twice to the other elements allready binded. Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery selecting one row on link click
Or, don't add an ID; (PSEUDO, UNTESTED CODE ALERT) script type=text/javascript jQuery(document).ready(function() { jQuery(a).click(function() { // Get all current highlighted rows, of THIS table. objCurrent = jQuery(tr.highlight, jQuery(this).parents(table)[0]); // Did we have a previous selection? blnChanged = (objCurrent.length 0); // Remove old clases if (blnChanged) { objCurrent.removeClass(highlight); // .. ajax call to remove selection .. e.g. serialize it ?? } // Select new row(s) jQuery(this).parents(tr).addClass(highlight); if (blnChanged) { // .. ajax call here .. } } }); /script ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery-modalContent Plugin 0.11 released
Gavin M. Roy wrote: I've released 0.11 of the jquery-modalContent plugin with the following changes: 2006-12-19 patch from Tim Saker [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 1) Keyboard events are now only permitted on visible elements belonging to the modal layer (child elements). Attempting to place focus on any other page element will cause focus to be transferred back to the first (ordinal) visible child element of the modal layer. 2) The modal overlay shading now covers the entire height of the document except for a small band at the bottom, which is the height of a scrollbar (a separate thread to be opened on this problem with dimension.js). 3) I removed the code that disables and reenables the scrollbars. This is just a suggestion really, realizing it could be one of those little things that causes fellow developers to become unnecessary foes ;=). Personally, I found it an annoying behaviour to remove a visible scrollbar causing the page elements to shift right upon modal popup, then back after closure. If the intent was to prevent scrolling it doesn't anyway since you can still page down with the keyboard. Maybe it should be a boolean option passed in the function signature? Nice work Gavin, In my submodal plugin, (thesame functionality as your plugin, but extended with a content div), i also had to tackle points 2 and 3. Here's how i tackled those 2 points. Set the width of the div to 100%, this covers the width part. Now comes the tricky part, the height. We have to make sure it covers the entire content below it. You can't just leave some space empty for a scrollbar, since some people have scrollbars that are 50px high (i hate those windows themes). This means that it has to be as large as the document, except if the document is smaller then the viewport, then it has to be as high as the viewport. *You also have to take changes to the document into consideration.* And this is important. With this i mean that it could be possible that the div you show over the modal can grow in height, say with 600px. Then, if you'd scroll down you would see a lot of white space. To tackle the height problem, i use this code, but you really only need the height part: --[ snip ]-- // Get document size var intDocumentWidth, intDocumentHeight; var intPageWidth, intPageHeight; if (document.documentElement document.documentElement.clientWidth) { // Explorer 6 Strict Mode intDocumentWidth = document.documentElement.clientWidth; intDocumentHeight = document.documentElement.clientHeight; intPageWidth = document.documentElement.scrollWidth; intPageHeight = document.documentElement.scrollHeight; } else { if (document.body) { // other Explorers intDocumentWidth = document.body.clientWidth; intDocumentHeight = document.body.clientHeight; intPageWidth = document.body.scrollWidth; intPageHeight = document.body.scrollHeight; } else { if (self.innerHeight) {// all except Explorer intDocumentWidth = self.innerWidth; intDocumentHeight = self.innerHeight; } } } // for small pages with total size less then width/height of the viewport if (intPageWidth intDocumentWidth) { intPageWidth = intDocumentWidth; } if (intPageHeight intDocumentHeight) { intPageHeight = intDocumentHeight; } --[ snip ]-- Oke, that's that. Now put this into a function and call it. Make sure that function returns the pageheight. This way you can stretch the div to the bottom of the screen. So when i initialize my submodal, i set the correct size. When the document is scrolled, i update the size (height) again so i am sure it covers any changes made to the page (content added/removed/etc). I hope i am helpfull with this. Best of luck. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery-modalContent Plugin 0.11 released
Wow, lots of code... for my Thickbox adaption the following worked fine: html, body { min-height: 100%; } #yourDiv { height: 100%; } #yourDiv has to be a direct child of the body... Ah, thanks. But what if i want to overlay an overlay? Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery-modalContent Plugin 0.11 released
smoore wrote: Giles, by any chance do you have an example of overlaying an overlay? I'd be interested in seeing how that worked. It was just theoretical ;) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Possible bug in 1.0.4
Jörn Zaefferer wrote: I found a bug in 1.0.4; It has to do with this line: var c = this.events[event.type]; In the handle function. The error occurs after cliking an ASP button which reloads the page. Unfortunately, i can't give a test page since it is a closed project. All i can say is that it gives an error stating: this.events has no properties Maybe this one can be solved by adding this check? if (!this.events) return; However, i can't connect to SVN from here, so can someone pick this up? It seems like jQuery tries to handle an event that wasn't registered via jQuery. Does that make any sense? -- Jörn Zaefferer http://bassistance.de Hi Jorn, The thing is, it is not caused by any jQuery binding. It is caused when the page loads (and on that test page, i didn't have any jQuery commands in it). So nothing jQueryish is going on, only the include of the javascript 1.0.4 file. It also does not happen when the page first loads, only after pressing a button, then the page reloads, then the error fires. And again, i am absolutely 100% sure that there is no jQuery code in place yet. Seems like jQuery is trying to handle some basic events on its own? -- Gilles p.s. browser was ffx 1.5.0.4 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Plugin: Mousehold
Andy Matthews wrote: This would be a perfect thing to meld in with that form scroller plugin. Can't recall who wrote it, but it converted a form field into a widget that let you click up and down to change values. And is there a feature which counts how many events are fired? I am thinking of an implementation where you first get increments of 1, then 2, then 4, then 8 (the longer you hold your mouse down) Know what i mean? -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] mirror of dean edwards packer anywhere?
Anybody know a mirror of dean edwards packer? The .NET application doesn have thesame compression results. Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] OT: mail delivery
Does anyone know how good Thunderbird handles imap mailboxes with lots of mails? I have nearly the complete mailing list in my imap mailbox here (ca 15000 mails right now)... I am not sure, but i've read there is a bug in the latest thunderbird, which occurs when you delete items and then compress the folder, your maildb gets garbled, so don't compress untill 1.5.0.9 is out! -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Stop using thickbox!
Dan Atkinson wrote: Going by the title, I fear that this is more wishful thinking and showmanship than anything else. Hi Dan, Correct. I wasn't trying to be arrogant, on the contrary, i just wanted to poke around to see how people reacted on my plugin. I've tried this before with the email is sent titled new plugin: Window, but i only received about 3 reactions on that, and i felt disapointed since i've put so much work in it, perfecting it (in my eyes). The mail with this title received some critisism, but also gave me some new ideas to work with, something i ran out of and that is all i ever wanted. To be honest, the last time i looked at thickbox it was only capable of showing 1 image, and not (like it is now) capable of doing much more. :s (sigh!) On your comment on degration, I am not sure my window plugin needs to degrade, after all, you have to open it from Javascript and it is a javascript build and controlled box... That's just my opinion, since i don't see how i could degrade this... It is either javascript on or off with this plugin. I'm hoping to get the community's thoughts on how i can improve this dialog, so people can implement this on their own CMS/website whatever use they feel for it. I think the reason the dragging is kinda slow, is the entire discussion going on about the best way to create the draggables for interface, so i hope that get's solved pretty quick. Since all i wanted to create (show off) with this plugin that it is possible to create a OS like dialog very easy (without those nasty popup blockers), maybe it's better to find a way to combine both plugins?? Anyway, i hope i didn't sound to arrogant, i was also a bit pissed on ajaxian.com constantly bragging on about ruby, prototype, scriptaculous, moo, YUI and forgetting all about jquery Hoping on a response, -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Stop using thickbox!
And use my window plugin :) Why? Thickbox was made for images Window plugin was made for popups (dialogs) Just my $0.02 -- Gilles http://gilles.jquery.com/window/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] cssHover update
Hi Guys, I forgot to add one fix to SVN, its comitted now. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] new plugin: window (+DEMO)
Hi guys, After i've done a lot (+8 weeks!) of work on the window class it's now ready to be released to the public for beta testing. I'm hoping to release this plugin at the same time jQuery 1.1 becomes available, but all bugs have to be squised off course. The plugin makes use of my cssHover plugin ( http://gilles.jquery.com/cssHover/ ) and some of the plugins uit of the interface pack ( http://interface.eyecon.ro/ ). This way, i didn't have to rewrite code again. So thanks Stefan for your work on interface, it made this plugin possible. There is a demo page online at my jQuery site: http://gilles.jquery.com/window/ Please be advised not yet to use this plugin, since it may contain bugs, even though i have tried to keep it to a minimum. The documentation is in the source code and below in this email. Known issues: - Not tested in IE7, Opera and Safari, but IE6 and FFX work - The iframe hack isn't added yet, because that caused a massive performance drop in MSIE. Doesn't cover select boxes yet. - There is currently only one theme available (XP Aqua), but there will be more before i release the plugin so you see how to make your own. - Only one callbacks yet: onLoad, suggestions are welcome - Unknown if it leaks in MSIE, if so, please advise where and i'll fix it A few highlights: - Fully themable, including active/non active state. - Multiple dialogs on 1 page, automatic z-indexing - Modal dialogs - Minimize/maximize functionality - Draggable/Resizable - Windows behaviour: doubleclick titlebar to maximize or restore if minimized - Stays in center if you say so, as long as the titlebar wasn't dragged. - When maximized, the window remains in view when you scroll the page Other than that, you can set a lot of options: - Minimum size - Maximum size - Title bar width when minimized - Use transfer effects (explode / implode) - Initial state: minimized / normal / maximized - Opacity - Restricted to parent Read the code for more ;) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] SVN update: cssHover
I've updated cssHover with some new stuff, check out the discussion on this topic earlier in the mailinglist. Basicly i added a new function, so you can use this.click() to toggle the state, and this.chSetState(true|false) to change the state. You can also use this.chSetState(true|false, TRUE) to force the change even on disabled items, since they normally don't get updated. I also updated the css sprites so they now use 1 background image instead of each state their own. I'll commit the changes tonight to SVN, if John fixes the SVN errors and Server errors. The entire demo page will also be in SVN as a ZIP file. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] cssHover
[EMAIL PROTECTED] wrote: Gilles, There is also a scenario where user checks few checkboxes then decides to select all, the result is that the previously checked boxes toggle back to un-checked. The select-all function only needs to toggle between select all and select none. What do you think? You are absolutely right. I've done some more fixes on the cssHover, but the demo is now offline. Basicly i added a new function, so you can use this.click() to toggle the state, and this.chSetState(true|false) to change the state. You can also use this.chSetState(true|false, TRUE) to force the change, even on disabled items since they normally don't get updated. I'll commit the changes tonight to SVN, if John fixes the SVN errors and Server errors. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] cssHover and interface iresizable committed
Hi guys, The changes to cssHover and interface iresizable are committed to SVN. Also the demo page for cssHover is up again, showing the new features. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] cssHover
[EMAIL PROTECTED] wrote: Gilles or anybody else with knowledge of the cssHover plugin: Can you please tell me how can I select all checkboxes in a form controlled by cssHover with a select all click event? You could use jQuery to find all checkboxes you want to toggle: jQuery(some code to select some cssHover elements).each(function() { this.chSetState(true); }); Check the code for more documentation, or shout in here ;) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] cssHover
[EMAIL PROTECTED] wrote: Gilles, thanks, I've noticed that you added the requested example at http://gilles.jquery.com/cssHover/ Works for me now too. roso Jep, just finished it. As it now works, you can't change the state of a disabled cssHover item. HTH, Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] window plugin: update
Hi Guys, You've probaly seen the Ajaxian post on the YUI dialog. Well i am happy to report that i've almost completed my plugin (after i released cssHover i did a complete rewrite) and it offers almost thesame functionality as the YUI version: * Fully themable * Fully customizable (e.g. isDraggable, isResizable, hasStatus, setContent, setContentURL, useIframe, Modal, Non-Modal etc. etc.) * Callbacks: onOpen, onLoad * Easy to use. All you have to include are my cssHover class, the interface iDrag, iResizable and iUtil class and optionally the iFxTransfer class for nice animations. Well, today i finished the dragging and resizing part, as well as the maximize/minimize buttons. This is all done. All whats left is add the support for multiple dialogs on 1 page (including switching from one dialog to another), some testing and it'll be released in the wild. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] window plugin: update
Reynier Perez Mira wrote: Hi Gilles: Thanks a lot for this plugin but where I can download it and see documentation in how to use in my site? Cheers Not yet, it is 98% finished :) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] window plugin: update
Dave Methvin wrote: * Callbacks: onOpen, onLoad Instead of callbacks, consider custom events. It easily allows for multiple subscribers to the event, and you can chain the query to bind the events. It also loosens the coupling between objects. If you don't mind, i'll wait with that untill the first beta is out ;) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE and the escape key triggering a hide action
Ah, I got it. If you have an input/button of type reset, the escape key triggers that action in IE... Jep, funny huh? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Capture tab focus in dialog window
Klaus Hartl wrote: Hi all, I thought I just share that: -snip- long story -snip- You can fix this very easily without doing all wierd stuffies like changing tab index. $(document).focus(function(oEvent) { return ((oElement = oEvent.srcElement || oEvent.target) jQuery(oElement).ancestors(YOURPARENTHERE).length); }); 3-liner ;) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] new plugin cssHover [ui checks, radio buttons and more!]
Hi guys, i've made a new plugin and added it to SVN. It is still in beta (== bugs) so don't use yet untill fully tested. This plugin actually started out as a remake of the CRIR (Checkbox Radio Input Replacement) code found on the websites of Chris Erwin, Yeduha Kratz and Kawika.org. I wanted to make a version which used the power of jQuery to create thesame effects, but then a little bit better. When i finished my early draft code, it worked on both CHECKBOX and RADIO elements, and was 4.9kb in size (uncompressed). Right about then, i got the idea to combine my old jButton code (which used IMG tags and SRC attributes to create simple buttons) with this code, and code a solution which could be used to add a :hover class to almost any element. Well, here you have it; 17.3Kb in size, 4kb compressed and even smaller GZIP'd, an all-in-one solution to fix most of your problems. Demo page: http://gilles.jquery.com/cssHover/ Please test and let me know if there are any bugs. If not, i'll commit it to SVN. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new plugin cssHover [ui checks, radio buttons and more!]
Stefan Petre wrote: I have found a bug. When you click a checkbox the replaced image is not the hovered instance. That bug is fixed, however, it introduced a new bug which you probably won't see (i've to test this first ;)) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new plugin cssHover [ui checks, radio buttons and more!]
Klaus Hartl wrote: Works fine in Safari 2.04. One little thing though: Safari is the only browser I know that doesn't trigger a click or does not focus the associated form element when clicking on the label. That always annoys me. The code as is right now should trigger the click event on the element it is watching, e.g. you click the label, the label finds the for and triggers the click event, and thus also the toggle state. I use basic jQuery code for that, so that should work... p.s. I am no CSS guru, but the flickering of the images could be solved by using 1 background image, and 8 states in that image (thus using background-position) if i am right... -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] triggering an event
Adam van den Hoven wrote: Can I force the click event to fire manually, or do I resort to I think you can do this with the apply call, although i am unsure how ;) P.s. nice surname ;) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $(.my_input).focus() shouldnt work?
Rafael Santos wrote: hey guys, could u help me? this is my lines: $(#month).keypress( function(){ len = $(this).val().length; if(len == 1){ document.getElementById(day).focus(); } }); this firebug give me an error. if(len == 1){ $(#day).focus(); } this do nothing... what am i doing wrong Please consult the website for more information, but in short you are doing 2 things wrong. First of all, you are using document.getElementById which can be shortened to $('#..') or jQuery('#..') and secondly you have to make sure that the element is focusable (e.g. not hidden, disabled or otherwise unfocusable). Try this: jQuery(#month).keypress(function() { if (this.length == 1) jQuery('#day')[0].focus(); }); [or] $(#month).keypress(function() { if (this.length == 1) $('#day')[0].focus(); }); -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Array.indexOf
I've seen that the clean function requires the Array.indexOf function, but this isn't available since Javascript 1.5. I am not sure on what javascript version jQuery is supposed to run on. Can anybody clarify that? If it is lowe then 1.5, we need to add the following snippet to jQuery.js to support older browsers: - [].indexOf || (Array.prototype.indexOf = function(v, n){ n = (n == null) ? 0 : n; var m = this.length; for (var i=n; im; i++) if (this[i] == v) return i; return -1; }); - --Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] interface 3 bugs fixxed in SVN
Hey guys, /Bug squashing time!/ When doing some pre-work for a project i want to start on, i found out that the interface library still had some minor bugs. I've mailed allready mailed them to Stefan, but he is very busy with a project right now, he doesn't even respond to my mail anymore :p (or he is on vacation) :p Anyway, since interface was in SVN, i took the opportunity to squash the bugs myself. *The first bug: idrag.js* I noticed i couldn't destroy the draggable once it was created. I commented out the old code, and put in the new code. This way you can see what i did. *The second and third bug: iselect.js* I found out that selecting was inconsistent. You had different behaviour when not using CTRL, or if you are using CTRL. This is how it now works: - When the dragging starts, an array of ID's is created with the current selected items. This was crucial in finding out which items where previously selected. - When you mouseover an image, it checks to see if this item was selected (when you started dragging), if so, unselect it, else mark it; - If an item was selected, but it was not selected when you started dragging, and you remove the selection box from it (e.g. unhover) deselect it; - But RESELECT the object, if we are using CTRL we dragged over an item which was selected while we started the drag (so it got unselected), but while still holding CTRL, we moved away from it. Meaning you didn't want to unselect it. - When the selection stops, the currentSelection array is emptied. All in all quite some work to get it right, but as far as i can see it behaves now like the windows explorer selection style... *Note on changes to iutil.js:* The new functionality REQUIRES Array.indexOf (see previous message), if you don't have it, a fallback code was implemented in iutil.js. I thought this was the best place for it. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Stefan Petre wrote: After a wild period at my work, I managed to make some time to develop a new plugin. Resizeable: allow elements to resize by handlers to north, east, west etc direction, set minimum width/height/ maximum width/height. minimum top/left/ maximum right/bottom. YES Exactly what i needed for my jQuery window plugin! I LOVE YOU STEFAN! P.s. i am working a flash image replacement plugin, will be ready today! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] new plugin: SIFR (Flash Image Replacement)
Hi guys, http://gilles.jquery.com/sifr/ enjoy ;) It is not yet in SVN, because the original creator is working on version 3.0 while this code is based upon his 2.0 version. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery image gallery
from: http://ajaxian.com/archives/jquery-image-gallery-transitions-thumbnails-reflections jQuery Image Gallery: Transitions, thumbnails, reflections http://ajaxian.com/archives/jquery-image-gallery-transitions-thumbnails-reflections Ramin B. has put together yet another image gallery http://www.getintothis.com/blog/2006/10/12/image-gallery-using-jquery-interface-reflections/. This time it is using jQuery as the library, and has a bunch of rich effects such as transitions, reflections, and the use of thumbnails. It looks pretty close to the Flickr Flash widget. Check out the Demo Page http://getintothis.com/pub/projects/gallery/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Intfac Sotabls estion
Nathan Smith wrote: http://host.sonspring.com/dragdrop/ Hi Nathan! Change your javascript code to this and try again! $(document).ready( function () { // Save options hshOptions = { accept: 'sortableitem', activeclass: 'background', hoverclass: 'background', helperclass: 'placeholder', opacity: 0.6, fx:200, revert:true, tolerance: 'pointer' } // Create first sortable, with above options $('ul#sort1').Sortable(hshOptions); // Create second sortable, with above options, but with containment on hshOptions.containment = 'parent'; $('ul#sort2').Sortable(hshOptions); } ); p.s. you could also create 2 hashes for the options, but since you reuse almost all options this seemed the best choice. Good luck, Gilles! p.s. check the docs at: http://interface.eyecon.ro/docs/sort for more options ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Error in latest svn jquery.js (427)
Paul Bakaus wrote: noticed the same, going to look at it. p.s. it is allready patched ;) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How to implement file upload using AJAX?
File upload is not possible using JavaScript for security reasons. There have allready been a lot of people asking this on this list. -- Gilles /If you'd Googled, you'd know/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Best way for storing user preferences?
Raffael Luthiger wrote: 3) Every time the page is loaded the js-script asks the server for a XML (or JSON) file with the preferences in there. Option 3, but save the data you got from the server in a cookie, which you destroy after 1 day or something like that. Each time the user changes the div, a new cookie is set and data is send back to the server. This saves you half in traffic and is the best solution if you ask me. Gilles p.s. there is a jQuery cookie plugin :p ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] typeof color == array in interface/highlight.js
Eckhard Rotte wrote: Hi there, there seems to be a bug in the interface/highlight.js plugin. Setting the color option as an array doesn't work because the array detection Hi Eckhard, good catch! I fixed this in my SVN version, but do you have a test page, so i can test the fix before i commit something? Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form plugin: default method
Sam Collett wrote: Is it the default on all browsers? If so, then perhaps that would be a good idea. I agree with Klaus, all resources i found point that GET is the default method. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $document.ready NOT broken
Seems like the problem lies in another place, not in the document.ready part.. Going to investigate this further ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 and document.ready
Mike Alsup wrote: Can you post a test page because that sure doesn't happen for me. Mike I've tracked down the problem to IE7 in standalone mode. I am almost certain that that is the problem. It sometimes just keeps hanging on (1 item remaining) and thus not firing the $(document).ready() part. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] typeof color == array in interface/highlight.js
Hi Eckhard, I've commited my fix to SVN, can you get the new ifxhighlight.js from SVN and test that with your page? Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] typeof color == array in interface/highlight.js
Yep, works. Theres some debug code left: .constructor==Array Good catch, totally missed that one ;) Anyway, the new (fixxed) version is in SVN ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE6 performance tweak
Klaus Hartl wrote: The by far safest thing to use is Conditional Compilation. And that way other browsers only get JavaScript comments...: Yeah i saw that on your blog. But doesn't this affect all versions of msie, even 6+ ? -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Rey Bango wrote: If you don't want to upgrade, be very vigilant about what automatic updates you install during MS' normal patch cycle: Does anybody know if it is possible to run both IE 6.x and IE7 both on thesame system? An absolute must if you are a web developer... Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Try this: http://tredosoft.com/IE7_standalone Works good enough for me. Thanx, just downloaded it! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] IE7 and document.ready
Hi Guys, Just found another document.ready bug at least i hope it is a bug :) The document.ready is not firing in IE7 when loading content via ajax into a DIV. Is this a common problem which is allready known? Someone might have a fix for this? The current scenario fires succesfully in both firefox and IE6 just like i want it to be and is like this: - I load some _javascript_s in the header of the page, in those headers are document.readys - When i load new data into a div, i want the document.readys to fire again, since they do some jQuery magic As said, this scenario successfully works in both Firefox 1.5.0.2 and IE6, just like i want it to do, but fails in IE7. Hope someone can help me. Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.2 RC2
Jörn Zaefferer wrote: Hi folks, it's time for another release candiate, this time including even more bug fixes and nothing else. Hi Jorn, Why don't you commit these into SVN, or did you? It is a bit confusing if we have 2 releases for jQuery, especially for newbies -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE6 performance tweak
This somehow improves the performance of IE6. Interesting object detection as well. Opinions on this method? Hi, This hack was allready posted to this list by me, and someone told us you could use jQuery's method of detecting MSIE before applying the hack, Something like this, in my base.js file. // Object initializatie $(document).ready(function() { // Fix background image caching problem if (jQuery.browser.msie) { try { document.execCommand(BackgroundImageCache, false, true); } catch(err) {} } }); -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Fast form serializer function for review
Mat, This code: if (t == 'select-multiple') { $('option', this).each( function() { if (this.selected) a.push({name: n, value: this.value || $(this).text()}); }); return; } Can be changed to this, if i am right ;) if (t == 'select-multiple') { $('[EMAIL PROTECTED]selected]', this).each( function() { a.push({name: n, value: this.value || $(this).text()}); }); return; } Other then that, Great code! -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Fast form serializer function for review
Mike Alsup wrote: Or better yet: $('option:selected')... Hey Mike, is that supported by jQuery? If i am right, only a plugin adds that method of selecting.. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Bug in fx?
When using idrag.js and a created drag with fx:100 for instance, the current jQuery SVN bails on line 3938 with the error: *z.e.curAnim has no properties* This is the line: z.el.curAnim[ prop ] = true; The lines: if (z.el.curAnim) z.el.curAnim[ prop ] = true; work, but i don't know if that is the correct way to do so. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Started on window class for jQuery
Hi Guys, I have decided to share my subModal class. I started this lightbox of me right after i saw the first lightbox for prototype (so i have been coding on this one for almost 1 year now). It is going to have a lot of features and will off-course be shared with you guys. At the current state it basicly is thesame as all other ones out there, but that is going to change. I'll start coding on it tomorrow and hope to show something in a couple (3-4) of weeks. -- Gilles p.s. the window class will be using code from Stefan Petre's interface pack, especially for the drag code and effects. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Rev: 259, where is now?
Andrea Ercolino wrote: I don't know how I got Rev: 259, because current latest is 249. I wandered around but I cannot find a link to it in jquery.com. Each time someone of the developers (like me) commit something, the version number is increased. Therefore since your last download, 10 commitments where done, leaving you at 259. The exact size of each commitment is very different. One time it is only 1 small bug, the other time it is a bigger list of bugs. HTH, GIlles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Evaluating script elements
any ideas? maybe evaluate()? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] DD's got a problem
Use this code instead: $(document).ready(function() { $('#foo').find('dd').hide().end().find('dt').click(function() { $(this).find('dd').each(function() { if ($(this).is(':visible')) { $(this).slideUp(); } else { $(this).slideDown(); } }); }); }); As you see in your own code, you are only toggling the next() element, which is the first after the DT, thus the first DD. Hope this helps, and btw, it could even be in less code, but maybe some other peeps could help you with that. -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jButton released!
abba bryant wrote: mind fixing the demo link so we don't all have to look at a 403 page? As i posted in another thread, the jButton code is now located at: http://gilles.jquery.com/jButton/ Sorry for the 403's! -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jButton released!
Hello guys! I just finished my new plugin and would like to receive some feedback! I wrote a new plugin which can transform an image into a button. Features include: * Toggle button or a default button * You can provide a function or string as the action to take when the button is clicked. In case of a function, the function gets called. In case of a string, the button is wrapped by an href tag and the link is called. * In case of a toggle button, you can preset the state it is in. * The option to create 2 different styles of buttons. You can either create default IMG buttons (which swappes a preloaded image and uses 3 seperate images) or you can use CSS style swapping, which uses 1 image as background, and the backgroundPosition property. You can check out the demo here: http://www.webunity.nl/_test/jquery/jButton/ Waiting for your feedback!! -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] mousewheel plugin
Mathias Bank wrote: It seems, that mousewheel is not an accepted event in jquery. So I have written a small plugin that can handle wheel events. It is based on http://adomas.org/javascript-mouse-wheel/. Nice! I just sent an email about the exact same page to John today (3 hours ago), telling him we need Mousewheel support! I think however that you cp'd much of the code there, and i think a lot of the code could be removed since it is allready in the jQuery core. I hope that John gives his reaction to this! -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] No more IE6 background-flicker!!!
Hi guys, I've seen this interesting post on the Ajaxian forum today: http://ajaxian.com/archives/no-more-ie6-background-flicker http://misterpixel.blogspot.com/2006/08/title-well-its-done-my-ie6-background.html Which gives me this jQuery implemention, which i have added to my base jQuery init code! $(document).ready(function() { // Fix background image caching problem if (jQuery.browser.msie) { try { document.execCommand(BackgroundImageCache, false, true); } catch(err) {} } }; I hate to tell you this, but it works :) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Fader code I duplicated using JQuery
Rey Bango wrote: I saw this posting: http://mikeomatic.net/techtips/css-crossfader/ and it showed a really cool fader. So I duplicated it using JQuery: http://www.intoajax.com/fade.htm The cool thing is that I didn't need to load scriptaculous to do it. Nice stuff! I was wondering how much effort it would be with jQuery since i need this on a new project of me ;) Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery::PeriodicalUpdater ?
Anybody did a periodical updater plugin like the scriptaculous one? I hope all plugin developers put there plugin on: http://jquery.com/plugins/ Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] rev. 217: Bugfix in $.fn.serialize
@John, please read since the each function could still contain a bug (see bottom 2 lines) Hi guys, I've just committed a bug fix to the form plugin. As you might have seen, I noticed that i somehow got an fieldset element instead of a form element in the $.fn.ajaxSubmit function. By doing a traceback i noticed that the following code would produce HtmlFormElement and HtmlFieldsetElement, so the bug was in the serialize function.: alert(this[0]); if ( !this.vars ) this.serialize(); alert(this[0]); Anyway, long story short, i changed this: ... a.push({name: n, value: this.value}); }); ... into ... a.push({name: n, value: this.value}); }).end(); ... Although this fixes the bug, it is confusing to me when we sometimes need an end and sometimes not with the each() command. /*John can you take a look at the serialize function and the possibility that the each function changes the this object? (and thus is buggy?)*/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] .contains() ?
John Resig wrote: The problem has more to do with the fact that you're doing two things wrong: 1) You're setting focus to a div element... which is unfocusable. 2) You're setting focus to the element before you ever finish the focus function of the previous element - creating an infinite loop. Well, it works in Firefox, are you sure it has to be with the timeout? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] First focusable element?
Is the following code, to find the first focusable element on the page, correct? Or am i missing something (e.g. other elements, ordering etc.)? oElem = $(document).find(a,frame,iframe,label,input,select,textarea,button).filter(:visible).filter(:enabled)[0]; With latest SVN off course -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How to bind an event to a function of a class?
Hi Guys, How can i bind/unbind an event to a specific function of a class? e.g. class { somecallback() { }, somefunc() { $(document).keypress(this.somecallback); }, otherfunc() { $(document).unkeypress(this.somecallback); } } Is this possible? Thanx, Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] .contains() ?
I'm trying to figure something out, but i'm kinda lost in the documented jQuery code... Is there a way to see if an object is a child of another object? e.g. if a link is a child of a div? link1 div link2 /div based upon the outcome, i need to do something, which i am going to share, but first i need to get it working :) -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] .contains() ?
John Resig wrote: Hope this helps. (This is with the SVN version of jQuery) Hmm, not really I am trying to do something like this: If the event receiving the focus is not a child of another object, set the focus back to that object. As you might guess, this is for a new style lightbox :) I am trying to prevent that a user can tab out of a lightbox, e.g. to a link at the bottom of the page Here's what i got so far, but it doesn't work yet... -- Can someone help me? - javascript - $(document).focus( function(oEvent) { var oElem = oEvent.srcElement || oEvent.target; while (oElem = oElem.parentNode) { if (oElem == $('#test').get(0)) { return true; } } // todo: set focus on another element $('#test').get(0).focus(); return false; } ); - code - a href=/1link 1/a | a href=/2link 2/a | a href=/3link 3/abr / br / div id=test a href=/4link 4/a | a href=/5link 5/a | a href=/6link 6/a /div ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/