Re: [jQuery] Tabs plugin: Truly bookmarkable finally
abba bryant schrieb: For some reason if I load the page and click some tab the hash changes. If I then copy the address from the address bar, and reload the initial page the hash stops changing on tab click. The tab content loads fine. Also if I bookmark tab 3 and then go to tab 1, then load the page from the bookmark the tab doesn't select. Also, if you load the page and #section-5 ( or whatever the hash might be ) is added to the url the page doesn't load the tab according to the url. Is this correct behavior? I was expecting to be able to bookmark a specific tab or load a specific tab from an url hash. Gosh! I see what you mean. I'd call that the back button problem - if you use the back button you get the same behaviour. The problem is, that there's is no load event fired no more while using the back button or if you just change the hash in the url. If you'd load another page in between and then use your bookmark it works as intendend. Ok, at least I will have to implement the back button :-) Ugh! -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Jörn Zaefferer schrieb: Glen Lipka schrieb: Would this work onKeyPress? I think I get where you are going. Struggling. :( Sure, just apply the validator on keypress: $(form input).keypress(function() { $(this).validate(); }); I you have ideas to make the plugin easier to use, just tell me .-) -- Jörn Caution, keypress is fired with every blink of the cursor in IE, even if you don't really type something in... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Debug Plugin
I'm not sure if this works or not. I see three grey boxes, but Firebug isn't outputting a thing. I have the correct settings on to get messages and output, but nothing, nada. John Resig wrote: Hi Everyone - I'm currently down-and-out with a nasty cold, but I took a break and hacked up a quick plugin. (I just realized that I've never actually released any plugins... oops!) Source Code: http://john.jquery.com/plugins/debug.js Quick test page: http://john.jquery.com/jquery/test/float.html Same page, but with a selector error (once you click the middle box): http://john.jquery.com/jquery/test/float2.html It prints out debugging information for all jQuery functions (e.g. $(), $().find(), $.trim(), etc.) using Firebug's console logging. It's obviously quite primitive, and the code is really bad, but it's something for now. I figure we can take this and hack it out into something good. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Debug-Plugin-tf2347170.html#a6542522 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Debug Plugin
Hmm... Actually it does work but requires the page to refresh before it does anything! It looks cool John! Dan Atkinson wrote: I'm not sure if this works or not. I see three grey boxes, but Firebug isn't outputting a thing. I have the correct settings on to get messages and output, but nothing, nada. John Resig wrote: Hi Everyone - I'm currently down-and-out with a nasty cold, but I took a break and hacked up a quick plugin. (I just realized that I've never actually released any plugins... oops!) Source Code: http://john.jquery.com/plugins/debug.js Quick test page: http://john.jquery.com/jquery/test/float.html Same page, but with a selector error (once you click the middle box): http://john.jquery.com/jquery/test/float2.html It prints out debugging information for all jQuery functions (e.g. $(), $().find(), $.trim(), etc.) using Firebug's console logging. It's obviously quite primitive, and the code is really bad, but it's something for now. I figure we can take this and hack it out into something good. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Debug-Plugin-tf2347170.html#a6543513 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] SpinButton Plugin updated
Great. How is the widget pack going? Are you attempting to unify the various authors' coding techniques or is the priority simply to get them together in one place/plugin? George wycats wrote: It's also a widget that might be featured in the jQuery widget pack I'm putting together. -- Yehuda -- View this message in context: http://www.nabble.com/SpinButton-Plugin-updated-tf2347123.html#a6544647 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Spread jQuery Request
Yes. I see now. Unfortunately, as Klaus said, jQuery no longer has this edge as other developers have cottoned on to this. Why unfortunately? A great concept was invented here, and that's *very* fortunate. Thank you John, be proud :) -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Hey Klaus And the using it like this: input validate=pattern:###-###-## / And I still vote for doing in a standards compliant way... As an alternative, you can still do it standards-compliant (or write an XHTML module): input class=$v(pattern:###-###-##) / The plugin checks the class if there is no validate attribute. -- Jörn -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Signals and slots
Good work Franck. Indeed. And it looks like he's added quite a bit to it since the original. Cool. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
- The addition of mousewheelup/mousewheeldown methods. Are these really necessary? I think adding these might increase the code considerably without much more benefit. The mousewheelup/down is represented by the event.detail and/or event.wheelDelta. Although the event.detail and event.wheelDelta have a different idea of which way is up and which way is down. I'll have to see how much code it adds by adding these two methods. - The standardization of an event.detail and/or event.wheelDelta (IMO, I think wheelDelta makes more sense). This way you can access the same property in all browsers. I decided to use event.detail as the magitude is represented by 'smaller' numbers instead of in multiples of 120. In IE I take the value of wheelDelta and divide it by 120 and I suppose I could do the opposite for Firefox and add the wheelDelta property. I think that is a good idea. Do you still need testing for Opera and Safari? I realize that you said that Safari didn't work, but I'm sure that there's a couple of us here who can research into this some more, to find a good cross-browser solution. Safari in its current released version is hopeless. I believe I should probably do some testing on Opera as it probably supports IE's onmousewheel. Brandon On 9/27/06, John Resig [EMAIL PROTECTED] wrote: Great plugin. Couple recommendation: - The addition of mousewheelup/mousewheeldown methods. - The standardization of an event.detail and/or event.wheelDelta (IMO, I think wheelDelta makes more sense). This way you can access the same property in all browsers. Do you still need testing for Opera and Safari? I realize that you said that Safari didn't work, but I'm sure that there's a couple of us here who can research into this some more, to find a good cross-browser solution. Keep up the great work! --John On 9/28/06, Brandon Aaron [EMAIL PROTECTED] wrote: I've finished my mousewheel plugin + docs + test/example. The example/test page: http://brandonaaron.net/jquery/mousewheel/mousewheel.html The code: http://svn.brandonaaron.net/svn/jquery_plugins/mousewheel.js The blog entry: http://brandonaaron.net/articles/2006/09/28/jquery-plugin-mousewheel The blog entry is just me rambling a little bit. The inline docs are probably better. The biggest annoyance/issue was that Firefox/Mozilla doesn't allow the DOMMouseScroll event to be cancelable. So I had to hack around it but finally figured out a way to allow the default to be prevented. BTW, this uses the $().hover method and it has a bug that I've logged and supplied a patch for here: http://jquery.com/dev/bugs/bug/222/ As this is my first plugin, if there is anything I should do differently or any enhancements I could make (or if you find any bugs) just let me know. :) Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
- The addition of mousewheelup/mousewheeldown methods. Are these really necessary? I think adding these might increase the code considerably without much more benefit. The mousewheelup/down is represented by the event.detail and/or event.wheelDelta. Although the event.detail and event.wheelDelta have a different idea of which way is up and which way is down. I'll have to see how much code it adds by adding these two methods. Actually, I suppose it could be more like the hover event method and take two functions. One would be for the mousewheeldown and the other for the mousewheelup. Then no one would have to worry about the event.detail and/or event.wheelDelta (unless they wanted to know the magnitude). Also, if only one function is passed I could write it to act like it currently does. Does that sound useful? Brandon On 9/28/06, Brandon Aaron [EMAIL PROTECTED] wrote: - The addition of mousewheelup/mousewheeldown methods. Are these really necessary? I think adding these might increase the code considerably without much more benefit. The mousewheelup/down is represented by the event.detail and/or event.wheelDelta. Although the event.detail and event.wheelDelta have a different idea of which way is up and which way is down. I'll have to see how much code it adds by adding these two methods. - The standardization of an event.detail and/or event.wheelDelta (IMO, I think wheelDelta makes more sense). This way you can access the same property in all browsers. I decided to use event.detail as the magitude is represented by 'smaller' numbers instead of in multiples of 120. In IE I take the value of wheelDelta and divide it by 120 and I suppose I could do the opposite for Firefox and add the wheelDelta property. I think that is a good idea. Do you still need testing for Opera and Safari? I realize that you said that Safari didn't work, but I'm sure that there's a couple of us here who can research into this some more, to find a good cross-browser solution. Safari in its current released version is hopeless. I believe I should probably do some testing on Opera as it probably supports IE's onmousewheel. Brandon On 9/27/06, John Resig [EMAIL PROTECTED] wrote: Great plugin. Couple recommendation: - The addition of mousewheelup/mousewheeldown methods. - The standardization of an event.detail and/or event.wheelDelta (IMO, I think wheelDelta makes more sense). This way you can access the same property in all browsers. Do you still need testing for Opera and Safari? I realize that you said that Safari didn't work, but I'm sure that there's a couple of us here who can research into this some more, to find a good cross-browser solution. Keep up the great work! --John On 9/28/06, Brandon Aaron [EMAIL PROTECTED] wrote: I've finished my mousewheel plugin + docs + test/example. The example/test page: http://brandonaaron.net/jquery/mousewheel/mousewheel.html The code: http://svn.brandonaaron.net/svn/jquery_plugins/mousewheel.js The blog entry: http://brandonaaron.net/articles/2006/09/28/jquery-plugin-mousewheel The blog entry is just me rambling a little bit. The inline docs are probably better. The biggest annoyance/issue was that Firefox/Mozilla doesn't allow the DOMMouseScroll event to be cancelable. So I had to hack around it but finally figured out a way to allow the default to be prevented. BTW, this uses the $().hover method and it has a bug that I've logged and supplied a patch for here: http://jquery.com/dev/bugs/bug/222/ As this is my first plugin, if there is anything I should do differently or any enhancements I could make (or if you find any bugs) just let me know. :) Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Request: Window plugin
Seems pretty nice. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rey Bango Sent: Wednesday, September 27, 2006 10:21 AM To: jQuery Discussion. Subject: [jQuery] Request: Window plugin I found this Prototype window plugin and was wondering if there's something like this available for JQuery users: http://prototype-window.xilinus.com/ Those window look very slick and I believe that YUI also has a window class similar to that. Rey,,, ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] SpinButton Plugin updated
Apologies Mark (Gibson) I've had mails from two Marks on this topic and I got your surnames muddled. Sorry. (the other Mark was working on SpinButton improvements too) I've corrected your name on this post and in the JQuery Plugins page. Thanks again, great stuff, George Mark Gibson-8 wrote: George Adamson wrote: The SpinButton / SpinBox Plugin has been updated with heaps of improvements by a splendid chap from this forum named Mark Lincoln. It's Mark _Gibson_ :) - Mark - Thanks for the code update. Great stuff. It pretty much worked as-is. All I've added are checks to stop it barfing when the options-parameter is not provided. Thanks for the original Spin Button, it's come in very handy. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/SpinButton-Plugin-updated-tf2347123.html#a6546250 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
Seems to work fine for me in IE6/PC. But I'm not sure what the difference between one and two is. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Brandon Aaron Sent: Wednesday, September 27, 2006 11:04 PM To: jQuery Discussion. Subject: [jQuery] New Plugin: mousewheel I've finished my mousewheel plugin + docs + test/example. The example/test page: http://brandonaaron.net/jquery/mousewheel/mousewheel.html The code: http://svn.brandonaaron.net/svn/jquery_plugins/mousewheel.js The blog entry: http://brandonaaron.net/articles/2006/09/28/jquery-plugin-mousewheel The blog entry is just me rambling a little bit. The inline docs are probably better. The biggest annoyance/issue was that Firefox/Mozilla doesn't allow the DOMMouseScroll event to be cancelable. So I had to hack around it but finally figured out a way to allow the default to be prevented. BTW, this uses the $().hover method and it has a bug that I've logged and supplied a patch for here: http://jquery.com/dev/bugs/bug/222/ As this is my first plugin, if there is anything I should do differently or any enhancements I could make (or if you find any bugs) just let me know. :) Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
Safari in its current released version is hopeless. I take that back. I'll do some testing and see what I can figure out to make this work in Safari. Also, sorry for not putting the [jQuery] tag on this thread and continuing to reply to my own thread. :) Brandon ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Signals and slots
Good work Franck. Indeed. And it looks like he's added quite a bit to it since the original. Cool. Hey, I've reported to the list regularly: http://jquery.com/discuss/2006-May/#4964 ;-) Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form plugin's serialize(): performance issues
Brian ha scritto: Perhaps there should be a FastSerialize method, that doesn't guarantee semantic order, and uses every shortcut to cut down on dom-walking time? This way, the developer can choose whether to use the faster method, or the slower-but-correctly-ordered method. - Brian Can you explain why processing elements in semantic order is important? Two reasons: $(input | select).eq(0) This should access the first matched element of input or select - when the order isn't important, you'll never know which element will actually be first. It's important that the element is actually the first element in the document. Secondly, when serializing forms, the order of the elements that comes back is frequently important - having a different order can cause problems for certain applications. Thanks for your answers. I agree with Brian about the need of a FastSerialize method. I don't know how many applications can get in troubles receiving forms data in a not semantic order. Maybe it is worth considering to introduce an OrderedSerialize method, using the current ordered but slow implementation, and use a fast but unordered implementation as the default one. Ah, yes, this is an incompatible change for those applications :) For my needs I preferred to use the fast way. Here is the code of the modified serialize I use: http://zone.spip.org/trac/spip-zone/browser/_plugins_/_dev_/-jQuery/form.js Renato ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
Quote Andy Seems to work fine for me in IE6/PC. But I'm not sure what the difference between one and two is.Test1...the box will scroll out of view (off the top of the page)whereas Test2 will remain staticthe page does not scroll ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Here's an idea: label for=foo class=validate 000h000h00/label input name=foo id=foo type=text / It's HTML 4.01, will probably pass for strict, and it semantically separates the validation from the field. The idea is that for every label with class validate, there's a validation mask somewhere within the classes that should be applied to the associated field. This can conceivably apply to any input, if you want to do the work. This could guarantee a set number of checkboxes are checked, one of the radio buttons has been chosen, a select is not left on its default value, etc. Some gotchas: * The only legal place to put the mask would be as a class. It would be a Bad Thing if you tried to make it the ID, since each element should have only one unique ID, and you may want to apply the same mask to a different field. The bonus here is that you can also style by validation mask. How cool would that be? (e.g.: Use a background-image of a phone icon for fields that want a phone number.) * One would need to create a language for expressing a mask using only alphanumerics and underscores, since that's what's legal in a class. This, in turn, may require enough regexp magic to make the best of us go running for the aspirin bottle. :) * One would need to support two legal HTML syntax cases - label for=foo and labelinput //label . * For broken use cases (e.g.: class=validate -- no mask is provided), one would want to bail out silently rather than throwing an error. What do you think? I'm almost feeling crazy enough to take a whack at it. It all starts with $(label), how hard could it be? :) - Brian And the using it like this: input validate=pattern:###-###-## / And I still vote for doing in a standards compliant way... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
I don't think that, technically, things like parens and colons are permitted in a class. As an alternative, you can still do it standards-compliant (or write an XHTML module): input class=$v(pattern:###-###-##) / The plugin checks the class if there is no validate attribute. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] image preloading
is there a preferred way to preload images when site uses jquery? how do you usually preload images? Aljosa Mohorovic ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form plugin's serialize(): performance issues
I agree with Brian about the need of a FastSerialize method. Renato, I've been benchmarking these serialize methods on a form with one select element that has 2000 options. Using the Firebug timer to capture elapsed time for the serialize call I see negligible difference in your impl and the one I posted on this thread. The current impl in the form plugin is noticeably slower. Here's the results: Current form plugin - average over 10 calls: 850ms For-loop impl - average over 10 calls: 337ms input,textarea,select impl - average over 10 calls: 379ms Granted this is just one benchmark (in FF on windows), but I think the for-loop impl holds up pretty well. Mike Geary, I haven't yet implemented your outline. I like it stylistically, but I not expecting performance improvements. Would you agree or would you expect it to be faster than Renato's impl? Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
I see... I didn't use the mousewheel enough to make it go off the bottom. Just a note, now it's not working in IE at all. !//--andy matthewsweb developercertified advanced coldfusion programmerICGLink, Inc.[EMAIL PROTECTED]615.370.1530 x737--//- -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Giuliano MarcangeloSent: Thursday, September 28, 2006 8:52 AMTo: jQuery Discussion.Subject: Re: [jQuery] New Plugin: mousewheel Quote Andy "Seems to work fine for me in IE6/PC. But I'm not sure what the differencebetween one and two is."Test1...the box will scroll out of view (off the top of the page)whereas Test2 will remain staticthe page does not scroll ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Spread jQuery Request
I could invite brazilians speaking portuguese on the mp3... idkloli just know 3 brazilians who know jQuery, me and my 2 friends... and that's serious...2006/9/28, Dan Atkinson [EMAIL PROTECTED]:I mean that jQuery no longer has this edge on 'competitors'. Fil wrote: Yes. I see now. Unfortunately, as Klaus said, jQuery no longer has this edge as other developers have cottoned on to this. Why unfortunately? A great concept was invented here, and that's *very* fortunate. Thank you John, be proud :) -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/--View this message in context: http://www.nabble.com/Spread-jQuery-Request-tf2333970.html#a6545049 Sent from the JQuery mailing list archive at Nabble.com.___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] off topic - sorry but I needed =P
i know i should only talk about jquery but im playing here and did it. I think it's funny for me =Ohow easy it is to make a web2.0 logo huahuahusorry guys... ah, if you want to, take it for u okay... =) http://hypestudio.net/fael/logo_web2.gif ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] off topic - sorry but I needed =P
Yes. There are several sites that can create 'web 2.0' and 'beta' logos. Do a cursive Digg search to find a trillion and 65 stories on them. Rafael Santos wrote: i know i should only talk about jquery but im playing here and did it. I think it's funny for me =O how easy it is to make a web2.0 logo huahuahu sorry guys... ah, if you want to, take it for u okay... =) http://hypestudio.net/fael/logo_web2.gif ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/off-topic---sorry-but-I-needed-%3DP-tf2351431.html#a6548257 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Getting Selectbox selected value. Works in IE not FF.
This is all that's needed: $('#mySelect').val() If you wanted the text value of the selected option rather than it's value attribute, you could do: $('#mySelect :selected').text() m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, September 28, 2006 7:08 AM To: jQuery Discussion. Subject: [jQuery] Getting Selectbox selected value. Works in IE not FF. Guys, I'm tesing some code out to return the selected value of a dropdown. I found a snippet that was posted in a prior message but it seems to only work in IE and not in FF. FF returns null for the value. The code snippet is: $('#mySelect [EMAIL PROTECTED]').val(); You can see it here: http://www.intoajax.com/selecttest.htm Any ideas on how to fix this? Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin - JTicker (newsticker)
On 28/09/06, Jason Levine [EMAIL PROTECTED] wrote: Hi, I've completed work on a new JQuery plugin. This one is called JTicker. It is a highly configurable newsticker plugin for JQuery. I was going to expand the JHeartbeat plugin a bit more before working on this, but I couldn't wait. (Besides, I wanted to use JTicker to replace an old Javascript/IFrame newsticker I had used for one of my company's pages.) Here's the URL, let me know what you think of it: http://www.jasons-toolbox.com/JTicker/ I might need some guidence on how to make one big improvement to it. Right now you are limited to one ticker per page. I want to be able to add multiple tickers on a single page, but every time I do it the last ticker overwrites the earlier ones. How can you have multiple instances of a JQuery plugin running? Thanks, -Jason Levine Reminds me of the one I did recently: http://www.texotela.co.uk/code/jquery/newsticker/ Except yours uses Ajax and you get nothing if javascript is disabled. Multiple tickers are possible with mine (but there is sometimes problems with not hiding the previous item). ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Getting Selectbox selected value. Works in IE not FF.
That did the trick! Thanks Matt. Rey Matt Grimm wrote: This is all that's needed: $('#mySelect').val() If you wanted the text value of the selected option rather than it's value attribute, you could do: $('#mySelect :selected').text() m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, September 28, 2006 7:08 AM To: jQuery Discussion. Subject: [jQuery] Getting Selectbox selected value. Works in IE not FF. Guys, I'm tesing some code out to return the selected value of a dropdown. I found a snippet that was posted in a prior message but it seems to only work in IE and not in FF. FF returns null for the value. The code snippet is: $('#mySelect [EMAIL PROTECTED]').val(); You can see it here: http://www.intoajax.com/selecttest.htm Any ideas on how to fix this? Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Getting Selectbox selected value. Works in IE not FF.
Hey Dizzle, Thanks for the help man. The code that Matt provided worked perfectly and is a little easier: $('#mySelect').val() Thanks for the effort though. I really appreciate it. Rey dizzledorf wrote: Rey, How about: var foo = $('#mySelect').attr(value); Seems to work here in FF IE. --DIZZLE Rey Bango-2 wrote: Guys, I'm tesing some code out to return the selected value of a dropdown. I found a snippet that was posted in a prior message but it seems to only work in IE and not in FF. FF returns null for the value. The code snippet is: $('#mySelect [EMAIL PROTECTED]').val(); You can see it here: http://www.intoajax.com/selecttest.htm Any ideas on how to fix this? Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Getting Selectbox selected value. Works in IE not FF.
Rey, To my knowledge, the latter is an XPath selector that says get all options with an attribute of selected (like option selected=selected), while the former is a dynamic pseudo-selector that will get the actual physically selected option value at run-time. m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, September 28, 2006 7:26 AM To: jQuery Discussion. Subject: Re: [jQuery] Getting Selectbox selected value. Works in IE not FF. Matt, Whats the difference between this: $('#mySelect :selected').text(); and this: $('#mySelect [EMAIL PROTECTED]').text(); The latter was code that I grabbed from an earlier posting. Rey... Matt Grimm wrote: This is all that's needed: $('#mySelect').val() If you wanted the text value of the selected option rather than it's value attribute, you could do: $('#mySelect :selected').text() m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, September 28, 2006 7:08 AM To: jQuery Discussion. Subject: [jQuery] Getting Selectbox selected value. Works in IE not FF. Guys, I'm tesing some code out to return the selected value of a dropdown. I found a snippet that was posted in a prior message but it seems to only work in IE and not in FF. FF returns null for the value. The code snippet is: $('#mySelect [EMAIL PROTECTED]').val(); You can see it here: http://www.intoajax.com/selecttest.htm Any ideas on how to fix this? Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
Now that is works in the major browsers I'll think about adding the mousewheelup and mousewheeldown but I'm still thinking it will just add unecessary complication to the code. I don't think it'll complicate it at all - it's like saying that .mouseup() and .mousedown() are complicated and should just use .mouse() instead. I also think that suggestion that you made of having a .mousewheel() method that takes two functions would work really well too. Having all three methods would add virtually no overhead to your code, while making it much more robust. (Maybe a 100 bytes?) --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] http://jquery.com/src page vandalized
the http://jquery.com/src page has been vandalized. I'd fix it but dont know how to restore the old version. -- View this message in context: http://www.nabble.com/http%3A--jquery.com-src-page-vandalized-tf2351675.html#a6549010 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
After checking the W3C spec, it doesn't say much about what is and isn't legal in a class in HTML. It simply says that it's a CDATA. But, the examples in the spec doc do allow hyphens. I'd be cautious about what characters I use in a class, because CSS is stricter about what may be in a selector than HTML itself is, and it would be a Good Thing to be able to style by validation mask. From the CSS spec: *** In CSS 2.1, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, or a hyphen followed by a digit. Only properties, values, units, pseudo-classes, pseudo-elements, and at-rules may start with a hyphen (-); other identifiers (e.g. element names, classes, or IDs) may not. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier BW? may be written as B\W\? or B\26 W\3F. *** On 28/09/06, Brian [EMAIL PROTECTED] wrote: I don't think that, technically, things like parens and colons are permitted in a class. I've never had problems with parenthesis and colons in the classname. They are just ignore by the css parser. Quick test: style type=text/css .bold { font-weight: bold; } .underline { text-decoration: underline; } /style span class=bold $(something:12) underlineSome text/span Not sure how this will impact on the use of addClass and removeClass using jQuery though. As an alternative, you can still do it standards-compliant (or write an XHTML module): input class=$v(pattern:###-###-##) / The plugin checks the class if there is no validate attribute. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Debug Plugin
John Resig schrieb: On 9/28/06, Marc Jansen [EMAIL PROTECTED] wrote: I can see nothing, too. even more my console on FF 1.5.0.7 says console is not defined (L. 6)... and that just after loading. nice idea, though. That means that you have to have the Firebug extension install for Firefox. You can get it here: http://getfirebug.com/ --John Hey John, I added the following lines to my JS, just in case I forget a log statement somewhere: // console.log fallback if (!window.console) window.console = {}; if (!window.console.log) window.console.log = function(s) {}; Maybe it's useful here too, just to avoid an error... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form plugin's serialize(): performance issues
Mike, Where are you finding the Firebug timer? I'm not seeing much of a performance boost using the for loop, but without a true timer, it's not a fair test... m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Thursday, September 28, 2006 6:22 AM To: jQuery Discussion. Subject: Re: [jQuery] Form plugin's serialize(): performance issues I agree with Brian about the need of a FastSerialize method. Renato, I've been benchmarking these serialize methods on a form with one select element that has 2000 options. Using the Firebug timer to capture elapsed time for the serialize call I see negligible difference in your impl and the one I posted on this thread. The current impl in the form plugin is noticeably slower. Here's the results: Current form plugin - average over 10 calls: 850ms For-loop impl - average over 10 calls: 337ms input,textarea,select impl - average over 10 calls: 379ms Granted this is just one benchmark (in FF on windows), but I think the for-loop impl holds up pretty well. Mike Geary, I haven't yet implemented your outline. I like it stylistically, but I not expecting performance improvements. Would you agree or would you expect it to be faster than Renato's impl? Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ 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/
Re: [jQuery] Form plugin's serialize(): performance issues
Where are you finding the Firebug timer? I'm not seeing much of a performance boost using the for loop, but without a true timer, it's not a fair test... Look at the measurement section here: http://www.joehewitt.com/software/firebug/docs.php My test func looks like this: $(function() { $(#go).click(function() { window.console.time(mike); var x = $('#theform').serialize(); window.console.timeEnd(mike); alert (x); return false; }); }); I'm alerting the response just to make sure each serialize method is working correctly. I don't know that this is a fair test either, but it's one data point anyway. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Getting Selectbox selected value. Works in IE not FF.
Matt Grimm schrieb: Rey, To my knowledge, the latter is an XPath selector that says get all options with an attribute of selected (like option selected=selected), while the former is a dynamic pseudo-selector that will get the actual physically selected option value at run-time. m. Yes, I once ran into that problem using [EMAIL PROTECTED] If you change the selected you end up with two elements... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form plugin's serialize(): performance issues
From: Mike Alsup Mike Geary, I haven't yet implemented your outline. I like it stylistically, but I not expecting performance improvements. Would you agree or would you expect it to be faster than Renato's impl? I think it depends on the nature of the form. For a form with a SELECT containing a large number of OPTIONs but not very many other fields, I would expect my approach to be very fast since it doesn't loop through the OPTIONs at all. I don't know how it compares with Renato's version - it may depend on how this jQuery expression is implemented: $( 'input,textarea,select', this ) If that does three separate GetElementsByTagName() calls, it should be very fast - but it would not preserve the source order if that's a concern. If that expression loops through all the child elements, then it would be slower in the many-OPTIONs case. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Hpricot (RE: Spread jQuery Request)
On Sep 28, 2006, at 9:44 AM, Michael Geary wrote: Yes. I see now. Unfortunately, as Klaus said, jQuery no longer has this edge as other developers have cottoned on to this. Why unfortunately? A great concept was invented here, and that's *very* fortunate. Thank you John, be proud :) Speaking of sincere flattery, has anyone seen Hpricot? It's an HTML parser and munger for Ruby that uses jQuery-style expressions: http://code.whytheluckystiff.net/hpricot/ I keep trying to get to a project where I intend to use it. Too bad _why hasn't applied his zany charm and prolific coding skills to creating a time machine. Corey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin - JTicker (newsticker)
Thanks. I was originally going to require the data to be in specially formatted DIV tags, but then I decided that the RSS method was better. I still might add an AJAX method (make an AJAX call each turn and display the result) and a collection of DIVs method, but I want to get the RSS method working right first. - Original Message From: Mike Alsup [EMAIL PROTECTED] To: Jason Levine [EMAIL PROTECTED]; jQuery Discussion. discuss@jquery.com Sent: Thursday, September 28, 2006 11:26:29 AM Subject: Re: [jQuery] New Plugin - JTicker (newsticker) http://www.jasons-toolbox.com/JTicker/ Love the RSS support. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jButton released!
How about the point mentioned by Dave about the _this (that i really should not use that because of some closure stuff)? I took the liberty of re-working your code to use closures, instead of _this. Also, it now works with multiple images (You can do: $(img').iButton() and it'll work over all of them). You can find the modified code here: http://john.jquery.com/plugins/jButton.js One quick item: You call your plugin jButton, but the method is named iButton - did you mean to call it jButton? Maybe just .button() would be sufficient. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Hpricot (RE: Spread jQuery Request)
It doesn't use jQuery style expressions. From what I can tell, it uses jQuery itself. There have been a few occasions where I was using hPricot and it seemed to call a jQuery method that wasn't implemented in hPricot. Weird. -- YehudaOn 9/28/06, Michael Geary [EMAIL PROTECTED] wrote: Yes. I see now. Unfortunately, as Klaus said, jQuery no longer has this edge as other developers have cottoned on to this. Why unfortunately? A great concept was invented here, and that's *very* fortunate. Thank you John, be proud :)Speaking of sincere flattery, has anyone seen Hpricot? It's an HTML parserand munger for Ruby that uses jQuery-style expressions: http://code.whytheluckystiff.net/hpricot/-Mike___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/-- Yehuda KatzWeb Developer | Wycats Designs(ph)718.877.1325 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Brian schrieb: After checking the W3C spec, it doesn't say much about what is and isn't legal in a class in HTML. It simply says that it's a CDATA. But, the examples in the spec doc do allow hyphens. I'd be cautious about what characters I use in a class, because CSS is stricter about what may be in a selector than HTML itself is, and it would be a Good Thing to be able to style by validation mask. The validation plugin uses $v(...) as a default to hide validation rules from stylesheets. But as you can override that via an option, that would be no problem either. Just setup the validation options like this: var options = { rulesClassStart: , rulesClassEnd: , rulesDelimiter: , // other options }; That would allow you to define your validation like this: input class=required pattern:###-###-## / Obviously, it wouldn't allow you to use 'pattern' as a style class. In that case, you should just seperate styles and validations. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Microformats Bookmarklet
I just saw this neat little bookmarklet that highlights all hCard and hCal Microformats on a page. The awesome part is it uses jQuery!http://leftlogic.com/info/articles/microformats_bookmarklet --Wil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Brian schrieb: Here's an idea: label for=foo class=validate 000h000h00/label input name=foo id=foo type=text / *snip* What do you think? I'm almost feeling crazy enough to take a whack at it. It all starts with $(label), how hard could it be? :) That is an interesting approach. It wouldn't take much effort to build that into the existing plugin. If you want to try: Start with modifying findRules. If you want to start selecting the labels instead of the inputs, you need to modify more then that: At least validateForm and validateElement would need to be modified. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Brian schrieb: After checking the W3C spec, it doesn't say much about what is and isn't legal in a class in HTML. It simply says that it's a CDATA. But, the examples in the spec doc do allow hyphens. I'd be cautious about what characters I use in a class, because CSS is stricter about what may be in a selector than HTML itself is, and it would be a Good Thing to be able to style by validation mask. The validation plugin uses $v(...) as a default to hide validation rules from stylesheets. But as you can override that via an option, that would be no problem either. Just setup the validation options like this: var options = { rulesClassStart: , rulesClassEnd: , rulesDelimiter: , // other options }; That would allow you to define your validation like this: input class=required pattern:###-###-## / Obviously, it wouldn't allow you to use 'pattern' as a style class. In that case, you should just seperate styles and validations. Well, it looks like Joern more or less has it covered. I'd simply use something like { rulesClassStart: val-, rulesClassEnd: ; rulesDelimiter: }. He also mentions (in another email) that using label to semantically separate the validations from the inputs can be done with relatively small modifications to his existing plugin. Worth looking into. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
On 9/28/06, Brian [EMAIL PROTECTED] wrote: Here's an idea: label for=foo class=validate 000h000h00/label input name=foo id=foo type=text / What about when you want to change some aspect of the mask? Say, the phone number mask now needs to handle international numbers as well. Why not separate the mask from the class name like this: label for=foo class=validate phoneNum/label input name=foo id=foo type=text / And put the mask in the jQuery code? -- Tim ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Having used the: input class=required us-phone-number ... method several times,,, It is definitely the way to slip the new feature by the standards! We can all see the simple jq code for implementing this. And keypress always scares me (as a user not a programmer) I hate to be told about my mistakes too early onchange is plenty time for a warning. On 9/28/06, Tim Gossett [EMAIL PROTECTED] wrote: On 9/28/06, Brian [EMAIL PROTECTED] wrote: Here's an idea: label for=foo class=validate 000h000h00/label input name=foo id=foo type=text / What about when you want to change some aspect of the mask? Say, the phone number mask now needs to handle international numbers as well. Why not separate the mask from the class name like this: label for=foo class=validate phoneNum/label input name=foo id=foo type=text / And put the mask in the jQuery code? -- Tim ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
I think that people are going to want more flexibility in terms of what they want to validate. It would be great to include very common shortcuts, like us-phone-number, credit-card-number, or email-address. But, we can't predict what everyone's data will look like. There must be a way to provide custom formats. - Brian What about when you want to change some aspect of the mask? Say, the phone number mask now needs to handle international numbers as well. Why not separate the mask from the class name like this: label for=foo class=validate phoneNum/label input name=foo id=foo type=text / And put the mask in the jQuery code? -- Tim ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
for the jQ soultuon : 1 class to mention which plugin will handle the validations 1 or more other classes as defined in that plugin we bind early on all fields that have the 'plugin' class, then we can easily handle flipping from US-phone-number to UK-phone-number.. etc! how the formats are defined is.. pure jQ magic! functions, regexps, whatever!!! This is sorely needed I am tired of doing it 'my way', I look forward to doing it the jQ way. Jake On 9/28/06, Brian [EMAIL PROTECTED] wrote: I think that people are going to want more flexibility in terms of what they want to validate. It would be great to include very common shortcuts, like us-phone-number, credit-card-number, or email-address. But, we can't predict what everyone's data will look like. There must be a way to provide custom formats. - Brian What about when you want to change some aspect of the mask? Say, the phone number mask now needs to handle international numbers as well. Why not separate the mask from the class name like this: label for=foo class=validate phoneNum/label input name=foo id=foo type=text / And put the mask in the jQuery code? -- Tim ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Hpricot (RE: Spread jQuery Request)
Say what? That's not how Hpricot works at all. Hpricot is a Ruby library, written in Ruby and C. I run it on a server that has no JavaScript interpreter. I'm fairly certain that it is not running jQuery behind my back. You can read the Hpricot source code here: http://code.whytheluckystiff.net/hpricot/browser/trunk Hpricot has its own Ruby implementation of jQuery-like expressions. That code is in elements.rb: http://code.whytheluckystiff.net/hpricot/browser/trunk/lib/hpricot/elements.rb I wonder if you were thinking of Why the Lucky Stiff's balloon demo site? http://balloon.hobix.com/hpricot The demo page does indeed use jQuery for the Click here to view the code effect. If it was something else, I'd be curious to know the details. I think he's referring to the fact that there use to be a bug where it reference a function that existed in jQuery, but not in Hpricot itself (I think it was .html) but that seems to be fixed now - Making it very close to a one-to-one conversion. I don't mind at all, though - _why is an amazing coder and I love his work. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
Okay ... I've updated the plugin once again. I overrode the mousewheel method to take an optional two functions instead of one. The first function is the up handler and the second function is the down handler. The preventDefault is still the last param. I also added mousewheelup and mousewheeldown along with unmousewheelup and unmousewheeldown. However, you can't chain mousewheelup and mousewheeldown together. The last one in the chain will override the previous. Also unmousewheelup and unmousewheeldown will remove both up and down if they exist. I tried to get around this but couldn't easily do so. If you need a seperate function for both up and down, just use mousewheel method with two functions. The example/test page is updated as well as the SVN. The blog entry however, is not updated yet. I've also posted this on the plugins page of jquery.com. Brandon ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Widget Challenge
As an aside, I wrote out this in a webpage with a few choice icons. It doensn't really work in IE, but I thought I'd stick your code up there: http://dan-atkinson.com/fisheye/ Cheers, Dan Paul Bakaus wrote: Hi! I have put up a little function that does something like the fisheye plugin. However, this is only a concept, it doesn't behave like the real one. It will not detect near containers and therefore is not very smooth. the function: $.fn.fisheye = function() { this.each(function() { var fishHeight = parseInt($(img, this).height()); var fishWidth = parseInt($(img, this).width()); $(this.childNodes).hover( function() { $(this.childNodes).animate({ height: 150, width: 150 }, 200); }, function() { $(this.childNodes).animate({ height: fishHeight, width: fishWidth }, 500); }); }); } test it like this: ul class=fisheye li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li /ul and style the ul like you want it. have fun. -- Paul Bakaus Web Developer Hildastr. 35 79102 Freiburg -- View this message in context: http://www.nabble.com/Widget-Challenge-tf2341740.html#a6554195 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Projects
Ⓙⓐⓚⓔ schrieb: for the jQ soultuon : 1 class to mention which plugin will handle the validations 1 or more other classes as defined in that plugin we bind early on all fields that have the 'plugin' class, then we can easily handle flipping from US-phone-number to UK-phone-number.. etc! how the formats are defined is.. pure jQ magic! functions, regexps, whatever!!! This is sorely needed I am tired of doing it 'my way', I look forward to doing it the jQ way. Well, I think I covered that, too. You need a special number format? Define it as a new validation rule and apply it to your form, that's it. // returns true, if the value does not match the pattern jQuery.validator.rules.myNumberFormat = function(value) { return !value.match(/\d\d\d-\d\d/); // change regex to whatever you need }; Is this what you had in mind? -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Widget Challenge
Hi Dan,some improvement idea for the page you have set up: Stick the outer container to the bottom of the page via position: absolute or fixed, this way you don't have the bumping problem for the height of the outer container. Other than that, I had almost the same idea you talked about, one additional idea:if you hover the icon, you clone the icon and stick it on top centered of the original (outside the original list). This way you don't alter the original list height and width, and it would look like a real magnification (even dojo does not have this effect!) Maybe I can work something out again, improve it a bit further.See ya!2006/9/28, Dan Atkinson [EMAIL PROTECTED] :As an aside,I wrote out this in a webpage with a few choice icons. It doensn't really work in IE, but I thought I'd stick your code up there:http://dan-atkinson.com/fisheye/Cheers,DanPaul Bakaus wrote: Hi! I have put up a little function that does something like the fisheye plugin. However, this is only a concept, it doesn't behave like the real one. It will not detect near containers and therefore is not very smooth. the function: $.fn.fisheye = function() { this.each(function() { var fishHeight = parseInt($(img, this).height()); var fishWidth = parseInt($(img, this).width()); $(this.childNodes).hover( function() { $(this.childNodes).animate({ height: 150, width: 150 }, 200); }, function() { $(this.childNodes).animate({ height: fishHeight, width: fishWidth }, 500); }); }); } test it like this: ul class=fisheye li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li li http://happyday.dk/funnypics/animal/images/monkey.jpg /li /ul and style the ul like you want it. have fun. -- Paul Bakaus Web Developer Hildastr. 35 79102 Freiburg--View this message in context: http://www.nabble.com/Widget-Challenge-tf2341740.html#a6554195 Sent from the JQuery mailing list archive at Nabble.com.___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] New Plugin: bgiframe
I went ahead and added my bgiframe plugin into SVN here: http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js A big thanks goes out to Mark Gibson for pointing me in the right direction with using the expression in the CSS! -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Scroll to Internal page links with ScrollTo
I am looking to script something that will automatically link my internal page links using the http://interface.eyecon.ro/ ScrollTo behaviour. If the script doesn't load the normal browser behaviour should be preserved. I am using this so far, but is simply isn't working.. I can't seem to figure out why $('[EMAIL PROTECTED]#]').each(function(i){*/ $(this).bind(click, function() { $(this.href).ScrollTo(3000, 'easeout'); return false; }); }); Any and all help appreciated. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Scroll to Internal page links with ScrollTo
Try$('[EMAIL PROTECTED]#]').each(function(i){*/ $(this).bind(click, function() {$(this).ScrollTo(3000, 'easeout'); //Changed this.href to thisreturn false; });});No since trying to scroll to an attribute of the link.On 9/28/06, neotoxic [EMAIL PROTECTED] wrote:I am looking to script something that will automatically link my internal page links using the http://interface.eyecon.ro/ ScrollTobehaviour.If the script doesn't load the normal browser behaviour should be preserved.I am using this so far, but is simply isn't working.. I can't seem to figure out why$('[EMAIL PROTECTED]#]').each(function(i){*/$(this).bind(click, function() {$(this.href).ScrollTo(3000, 'easeout');return false;});}); Any and all help appreciated.___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
This is REALLY useful Brandon. Can you give us a quick example of usage code? Thanks bud. Rey... Brandon Aaron wrote: I went ahead and added my bgiframe plugin into SVN here: http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js A big thanks goes out to Mark Gibson for pointing me in the right direction with using the expression in the CSS! -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Scroll to Internal page links with ScrollTo
I think he was trying to use the href attribute to find the target element. Try this to find the target:$('a[name='+this.href.slice(this.href.indexOf(#)+1)+']')Blair On 9/29/06, Matt Stith [EMAIL PROTECTED] wrote: Try$('[EMAIL PROTECTED]#]').each(function(i){*/ $(this).bind(click, function() {$(this).ScrollTo(3000, 'easeout'); //Changed this.href to thisreturn false; });});No since trying to scroll to an attribute of the link.On 9/28/06, neotoxic [EMAIL PROTECTED] wrote:I am looking to script something that will automatically link my internal page links using the http://interface.eyecon.ro/ ScrollTobehaviour.If the script doesn't load the normal browser behaviour should be preserved. I am using this so far, but is simply isn't working.. I can't seem to figure out why$('[EMAIL PROTECTED]#]').each(function(i){*/$(this).bind(click, function() {$(this.href).ScrollTo(3000, 'easeout');return false;});}); Any and all help appreciated.___jQuery mailing list discuss@jquery.comhttp://jquery.com/discuss/ ___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
This is REALLY useful Brandon. I hope it will be! I know it has helped me and my co-workers out a ton. Can you give us a quick example of usage code? Sure thing. The example/test page is here: http://brandonaaron.net/jquery/bgiframe/bgiframe.html The source is here (updated): http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js And the lazy :) blog entry is here: http://brandonaaron.net/articles/2006/09/29/jquery-plugin-bgiframe Thanks bud. No problem :) -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
You sir have just earned yourself a spot on my RSS feed reader! Not sure how much value that has but hey, its an extra hit to your site. LOL! ;) Rey... Brandon Aaron wrote: This is REALLY useful Brandon. I hope it will be! I know it has helped me and my co-workers out a ton. Can you give us a quick example of usage code? Sure thing. The example/test page is here: http://brandonaaron.net/jquery/bgiframe/bgiframe.html The source is here (updated): http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js And the lazy :) blog entry is here: http://brandonaaron.net/articles/2006/09/29/jquery-plugin-bgiframe Thanks bud. No problem :) -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: mousewheel
I overrode the mousewheel method... I don't think I used the correct terminology there. That should be 'I overloaded' instead of 'I overrode' ... at least I think so. -- Brandon Aaron On 9/28/06, Brandon Aaron [EMAIL PROTECTED] wrote: Okay ... I've updated the plugin once again. I overrode the mousewheel method to take an optional two functions instead of one. The first function is the up handler and the second function is the down handler. The preventDefault is still the last param. I also added mousewheelup and mousewheeldown along with unmousewheelup and unmousewheeldown. However, you can't chain mousewheelup and mousewheeldown together. The last one in the chain will override the previous. Also unmousewheelup and unmousewheeldown will remove both up and down if they exist. I tried to get around this but couldn't easily do so. If you need a seperate function for both up and down, just use mousewheel method with two functions. The example/test page is updated as well as the SVN. The blog entry however, is not updated yet. I've also posted this on the plugins page of jquery.com. Brandon ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
Brandon, Although I wasn't too sure what all the hoopla was about, I decided to try out the example/test page! It probably isn't working as designed in FF 2.0rc1 Jake On 9/28/06, Brandon Aaron [EMAIL PROTECTED] wrote: This is REALLY useful Brandon. I hope it will be! I know it has helped me and my co-workers out a ton. Can you give us a quick example of usage code? Sure thing. The example/test page is here: http://brandonaaron.net/jquery/bgiframe/bgiframe.html The source is here (updated): http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js And the lazy :) blog entry is here: http://brandonaaron.net/articles/2006/09/29/jquery-plugin-bgiframe Thanks bud. No problem :) -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Logging for development?
I created a (non-jQuery-specific) logger called JSLog: http://earthcode.com/blog/2005/12/jslog.htmlYou might also be interested in Leave logging statements in your production code: http://earthcode.com/blog/2005/12/jslog_production.htmlIt's been a while since I've touched JSLog, but if there's interest, I can probably shrink the code by creating a jQuery-specific version. Andre ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Logging for development?
From the reactions so far I'd start putting some logging statements into the ajax module, while working on it. I'd prefer to not have any logging code be built into the jQuery source, instead, have it be added on as a plugin. jQuery is already starting to get fat at 17kb. Let me put it this way: I'd rather have good error messages than logging statements. (e.g. There was an error with your expression.) But I can't think of a way to get that functionality in without increasing file size, either. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
Although I wasn't too sure what all the hoopla was about, I decided to try out the example/test page! It probably isn't working as designed in FF 2.0rc1 It works just as you'd expect. The first box is a normal z-indexed box. Therefore it appears above the select box in Firefox (as it should) and below it in IE (as it does, but shouldn't do). The second box (which uses the hack) will always appear above the select box. Great job Brandon! --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
OH! so if there was some content there It would show coolly! THANKS! On 9/28/06, John Resig [EMAIL PROTECTED] wrote: Although I wasn't too sure what all the hoopla was about, I decided to try out the example/test page! It probably isn't working as designed in FF 2.0rc1 It works just as you'd expect. The first box is a normal z-indexed box. Therefore it appears above the select box in Firefox (as it should) and below it in IE (as it does, but shouldn't do). The second box (which uses the hack) will always appear above the select box. Great job Brandon! --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] building jquery from svn -- ant vs Makefile
Since joinin' in, I installed svn, picked up the whole directory, and started to read, I found the ant build.xml, and after fixing the mixed carriage returns and linefeeds, decided to look at the Makefile... ok it looked good... but it didn't run the make test part... You are missing a line to create the js directory under test. around line 66. the equiv line is in the ant. I guess youse guys use the ant build! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: bgiframe - IE iFrame Fix
Here is something interesting. The Dojo toolkit (http://dojotoolkit.org) also has a way to make this IE hack 'easier'. However, in true dojo fashion it takes 83 lines of code and a hefty namespace on top of that. Here is the link directly to the src for it: http://trac.dojotoolkit.org/browser/trunk/src/html/iframe.js#L25 Granted their BackgroundIframe object provides a few extra methods but here is how easy it is to reproduce those. (Even though you will probably never need them.) setZindex with a number (Shouldn't ever need to do this) $('iframe.bgiframe').css('zIndex', 1); hide $('iframe.bgiframe').hide(); show $('iframe.bgiframe').show(); remove $('iframe.bgiframe').remove(); Of course in the above expressions you would need to modify it to target precisely which bgiframes you wanted to modify. Just thought it would be worth sharing. Pretty crazy how easy and compact it is working with jQuery. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Interface: Autocomplete fixes (attn: Stefan)
aedmonds wrote: If you've had some difficulty using the Autocompleter included in the wonderful interface package, I found some fixes for bugs I was experiencing. These bugs were happening when the input field was within a form and you arrow down to the selection and hit enter. The callback fired but after the form had been submitted :(. These couple of steps will help fix that. First, there are two protect methods in the iautocompleter.js code. Delete the protect method located on line 353. It is incomplete and will throw errors if the first protect method on line 210 is removed instead of this method. Second, on line 425 (or 411 if you deleted the second protect method), where the protect method is bound to the keypress... wait a sec... that's no 'protect'. All I see is '.keypress(jQuery.iAuto.potect)'! you might say to yourself. If you did, congrats, you found the second error. If you didn't say that, don't worry. Just add the r to potect and the Autocompleter works like a dream. Hopefully this is updated soon (I know Stefan made an update a couple of days ago but nothing changed for the Autocompleter). If you have no idea what the interface package is, you can go to http://interface.eyecon.ro/ http://interface.eyecon.ro/ . As always, thanks John for jQuery, and thanks Stefan for interface. -Aaron Wow, nice, it is like a solution for a RPG, but I don't like to play computer games. Long story short: the protect function was duplicated, delete one and correct typo. I will update today. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/