Re: [jQuery] highlightFade Plugin

2006-09-20 Thread George Adamson
e user chooses to actually modify the data. Many thanks Blair. Regards, George Adamson -- View this message in context: http://www.nabble.com/highlightFade-Plugin-tf2040652.html#a6404220 Sent from the JQuery mailing list archive at Nabble.com. ___ j

[jQuery] JQuery selector to detect focus

2006-09-21 Thread George Adamson
Hi there, I have a page in which I need to detect which element has the focus. The JQuery documentation states that the http://jquery.com/docs/Base/Expression/CSS/ :focus selector is not supported, so this would not be possible: $("DIV INPUT:focus") It is easy enough to add a selector def

Re: [jQuery] JQuery selector to detect focus

2006-09-21 Thread George Adamson
Thanks Mike, that answers one question. So a new :focus selector can be added like this: (for IE only so far. Boo!) jQuery.extend(jQuery.expr[':'], { focus: "a==document.activeElement" }); // Example of usage: $("INPUT:focus") Does anyone have an answer

Re: [jQuery] highlightFade Plugin

2006-09-21 Thread George Adamson
These may give you some ideas... You can either use JQuery's own .fadeIn() method or try the highlightFade as follows: $("INPUT") .focus(function(){ $(this) .highlightFade({start:'white', end:'black', speed:'fast', attr:'color'})

Re: [jQuery] toggleClass and removeClass

2006-09-21 Thread George Adamson
Hello Mark, Nice to see this bug progressing. A search on keywords " http://www.nabble.com/forum/Search.jtp?forum=15494&local=y&query=classname+space classname space " in the Nabble jquery forum reveals that quite a few of us have reported this in one form or another. Cheers, George Mark D. L

[jQuery] fadeIn() changes display to 'block'

2006-09-22 Thread George Adamson
It would seem that the fadeTo() method changes the element.style.display to 'block'. Is this by design? It messes up inline elements. One workaround for the time being might be to wrap an inline element inside another before fading it. Cheers, George DaveG-2 wrote: > > > I was looking at

[jQuery] Is the forms plugin documented anwhere

2006-09-23 Thread George Adamson
Great info on ajax and forms. Is there any documentation on the forms plugin? John mentions forms docs in the http://jquery.com/dev/svn/plugins/ plugins page but I've not managed to find them. Cheers, George malsup wrote: > >> Any chance of a link to it? > > The form plugin is available

Re: [jQuery] Help finding parent element

2006-09-24 Thread George Adamson
Good point about using $("../",this) as an alternative to using $(this).parent(), though I've noticed that the syntax should be $("..",this) to return the parent, while $("../",this) returns siblings. Does this sound right? Cheers, George Adamson Glen Li

[jQuery] XPath Axes: ancestor(-or-self) / parents / descendent / children

2006-09-25 Thread George Adamson
use they just need to return true or false. I just can't figure out how to enable axis:: selectors. Many thanks, George Adamson -- View this message in context: http://www.nabble.com/XPath-Axes%3A-ancestor%28-or-self%29---parents---descendent---children-tf2331493.html#a6486088

Re: [jQuery] Suggestion: add iframe hack to core jQuery

2006-09-26 Thread George Adamson
Nice idea. Quite a few plugins would find that useful. Another useful funtion would be a method to return the x,y (left,top) coordinates of any element (relative to the page or some specified element). The classic iteration through offsetParent elements would be a good start but runs into problem

Re: [jQuery] Suggestion: add iframe hack to core jQuery

2006-09-26 Thread George Adamson
is open to anyone that would like to convert it to a > plugin. > > http://www.brandonaaron.net/articles/2006/08/10/prototype-extensions-element-getoffset > > Brandon > > > On 9/26/06, George Adamson <[EMAIL PROTECTED]> wrote: >> >> Nice idea. Quite a few

[jQuery] New plugin: Extra :selectors such as :focus, :modified, :input, :text

2006-09-27 Thread George Adamson
Simple http://www.softwareunity.com/sandbox/JQueryMoreSelectors/ selectors plugin to add more specific query :selectors to JQuery. Adds things like: - $("FORM/*:modified") - To find form elements that have been changed or selected by the user. - $("FORM/*:focus") - To find the element that ha

Re: [jQuery] New Selectors plugin: Adds :focus, :modified, :input, :text etc

2006-09-27 Thread George Adamson
They're in the svn? Great. I'll take them out of my plugin in that case. J?rn Zaefferer wrote: > >> >> Simple http://www.softwareunity.com/sandbox/JQueryMoreSelectors/ >> selectors >> plugin to add more specific query :selectors to JQuery. > > Actually :input, :text etc. are already in SVN

[jQuery] SpinButton Plugin updated

2006-09-27 Thread George Adamson
The SpinButton / SpinBox Plugin has been updated with heaps of improvements by a splendid chap from this forum named Mark Lincoln. The SpinButton Plugin takes ordinary boxes and turns them into SpinButton controls using just css and JS/JQuery. No extra markup is added so the textbox submits and

Re: [jQuery] SpinButton Plugin updated

2006-09-27 Thread George Adamson
Good point! (I've now added the link to my previous post for the benefit of nabble users) http://www.softwareunity.com/sandbox/JQuerySpinBtn/ Matt Stith wrote: > > Ooohhh this could be usefull in an upcoming project, you got a link > please? > -- View this message in context: http://www.n

Re: [jQuery] SpinButton Plugin updated

2006-09-28 Thread George Adamson
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. >

Re: [jQuery] SpinButton Plugin updated

2006-09-28 Thread George Adamson
on-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

Re: [jQuery] nth of type not working in some cases

2006-09-29 Thread George Adamson
The :nth-of-type selector is not in the current jQuery Base. Perhaps it was once. As luck would have it I added :nth-of-type to my Selectors Plugin yesterday and I'd love it if you could try it out. JS file: http://www.softwareunity.com/sandbox/JQueryMoreSelectors/JQuery.moreSelectors.js Demo: h

Re: [jQuery] this list

2006-09-29 Thread George Adamson
This is probably what you're looking for... http://jquery.com/mailman/listinfo/discuss_jquery.com George volatileservers wrote: > > Hello list, may I know how can I unsubscribe from the list. > > Thank you very much for your help > > volatile > > ___

Re: [jQuery] nth of type not working in some cases

2006-09-29 Thread George Adamson
>As Blair suggested, :nth-of-type was replaced by :eq, therefore I'm not sure if that addition in your plugin really provides more value. I thought the same initially, but when I researched further I found that :eq() will give us the nth item in the set, but :nth-of-type will give us the nth of

Re: [jQuery] slideUp / slideDown and nested divs

2006-09-29 Thread George Adamson
Hi Mike, You just need to tweak the JQuery syntax a little to refer to 'this' instead of e.target: Change from: $("a.folder").toggle(function(e) { $(e.target).parent().next().slideDown('fast'); }, function(e) { $(e.target).parent().next().slideUp('fast'); }); To

Re: [jQuery] next()

2006-09-29 Thread George Adamson
Yep, XPath will take you up the dom and down again but you'll still need to use a method to get to the next row. An advantage of Blair's example is that by using .parents() we do not have to know how deep 'this' is within the TR. If the link is definately a child of the TD then you could use som

Re: [jQuery] 3D Carousel

2006-09-30 Thread George Adamson
Stefan Petre wrote: > > http://interface.eyecon.ro/development/demos/carousel.html > superb! -- View this message in context: http://www.nabble.com/3D-Carousel-tf2362646.html#a6582364 Sent from the JQuery mailing list archive at Nabble.com. ___

Re: [jQuery] Chainable if/else - hot or not?

2006-10-01 Thread George Adamson
Very useful. One thought: It might be nice to allow the elseCallback to run even when ifCallback is not provided. George J?rn Zaefferer wrote: > > Hi folks, > > the thread about showing and hiding DDs when clicking DTs gave me an > idea for a chainable if/else construct. I have implemented

[jQuery] How should :nth-of-type work?

2006-10-03 Thread George Adamson
Just canvassing opinions on the :nth-of-type() selector that is in now being tested in the http://www.softwareunity.com/sandbox/JQueryMoreSelectors/ Selectors Plugin (plus other ...-of-type selectors). At face value it would http://www.nabble.com/nth-of-type-not-working-in-some-cases-tf2356344

Re: [jQuery] How should :nth-of-type work?

2006-10-03 Thread George Adamson
Good point J?rn, thank you. (I've not found a good use for :nth-of-type() myself, but someome will!) More interesting as it turns out, is the :nth-sibling-of-type() selector that I created accidentally... It turns out to be a simple way of returning TD elements in the same column of a table. Her

[jQuery] How can one add httpheaders or cookies to $.ajax() request?

2006-10-05 Thread George Adamson
What is the best way to add a custom httpheader and/or cookie info to a $.ajax() request? Many thanks, George PS: The http://jquery.com/api/ doc for ajax() differs slightly from the $.ajax() functionlality in the current jquery release. -- View this message in context: http://www.nabble.com/

Re: [jQuery] Slider plugin (pre-alpha): HELP NEEDED

2006-10-05 Thread George Adamson
Very nice. That'll be useful. I attempted the same thing not long ago but got distracted onto other things. http://www.softwareunity.com/sandbox/JQuerySlider/ (best in IE). Thought it may be helpful to share some discoveries... By using css alone I found there was no need to wrap the slider in

Re: [jQuery] Slider plugin (pre-alpha): HELP NEEDED

2006-10-05 Thread George Adamson
> I like the lateral thinking with the mad class names. Useful idea for custom properties. -- View this message in context: http://www.nabble.com/Slider-plugin-%28pre-alpha%29%3A-HELP-NEEDED-tf2389171.html#a6665229 Sent from the JQuery mailing list archive at Nabble.com. __

Re: [jQuery] Performance question

2006-10-07 Thread George Adamson
Saw you had no responses so here's a couple of suggestions... An easy performance booster is to use the second param in $() to set a context for the search. Eg: $("DIV.myClass", myParentElement). Perhaps this is what you meant when you mentioned 'getting a parent element' ? Chaining methods is

Re: [jQuery] [ANN] JReflection

2006-10-14 Thread George Adamson
Had a play with this. It adds a reflection below image elements. The effect crops up in numerous other plugins so it is nice to have this wrapped in a plugin of its own. Took a moment to figure it out because I applied it to elements at first and got nothing. Re-read/figured that you apply it

[jQuery] What is the best way to queue several effects?

2006-10-16 Thread George Adamson
Hi there, JQuery does a great job of queuing effects on the same element(s) but I'm not sure how to queue effects on a set of many different ones. What is the best way to run the same fx on many items in sequence, one after the other? Using callbacks is fine for a couple of effects but tedious i

Re: [jQuery] What is the best way to queue several effects?

2006-10-17 Thread George Adamson
Thanks nezza, yeah I'm using the handy pause plugin now too, but for each item in the jquery list I'm having to increase the pause param so that the fx run one after the other. This gets the right effect but I'm hoping there is a neater way of queing fx so they run in sequence (and without using c

Re: [jQuery] Blurry Text using JQuery... But only in IE - WORKAROUND

2006-10-24 Thread George Adamson
> My problem is that the text in the JTicker plugin is coming in blurry. Yeah it is a bug in IE but you can workaround it by explicitly setting the background color of the blurry elements (to any color other than transparent) George -- View this message in context: http://www.nabble.com/Blur

Re: [jQuery] New way of animating

2006-11-06 Thread George Adamson
>jQuery can do everything that it can, natively (except color animation). Just as an aside, if anyone needs colour animation then http://jquery.offput.ca/highlightFade/ works well for animating color, backgroundcolor or bordercolor. (Though you might not immediately guess from its name) George

[jQuery] What is the best way to show() many items in sequence, one after the other?

2006-11-14 Thread George Adamson
If you have a jquery array of elements and need to call the show("slow") method on each one in turn, how should you do it? For instance how might would you reveal each LI element in a list one after the other? Just applying the show() method reveals them all at once eg: $("#myList LI").show("slow

Re: [jQuery] What is the best way to show() many items in sequence, one after the other?

2006-11-14 Thread George Adamson
Thanks Jörn, good idea, that did the trick. With some fiddling I was able to reduce the code to look like this, so it can be applied to any list of elements: var showInSequence = function($el){ if($el && $el.is()) $el.eq(0).show("slow", function(){

Re: [jQuery] What is the best way to show() many items in sequence, one after the other?

2006-11-14 Thread George Adamson
Very handy, thanks Choan. By the way the little code rewrite I posted uses .next() because it assumes the elements are siblings (which was ok for my purposes). Jorn's technique, which you also use in your code, does not have this restriction so it is better. George Choan C. Gálvez wrote: > >

Re: [jQuery] Can someone please explain $() ?

2006-11-14 Thread George Adamson
As you quite rightly say, the $() 'doohickey' returns a jquery object that is a bit like an array of zero or more html elements. Without some help, regular javascript won't know what to do with the doohickey, so if you need the element itself you extract it using the .get(0) method (where 0 means

Re: [jQuery] Need help with get()

2006-11-23 Thread George Adamson
My hunch is that your code is running before the html elements have loaded. Your 'update' to this post is the right direction to go in. Typically one would use Jquery's cunning ready() event to tell us when the dom has loaded enough to get going. The ready() method takes a function as a param so

Re: [jQuery] :last-visible :nth-visible-child, etc.

2006-11-23 Thread George Adamson
> Perhaps you could integrate it into the other selector plugin. > Blair Sure, I could add them to the selectors plugin if the general opinion is 'yes'. The selectors plugin lives at http://www.softwareunity.com/sandbox/JQueryMoreSelectors/ (Probably about time I made a page for it on the jque

Re: [jQuery] :last-visible :nth-visible-child, etc.

2006-11-23 Thread George Adamson
d :whatever. > > -- Yehuda > > On 11/23/06, George Adamson <[EMAIL PROTECTED]> wrote: >> >> >> >> > Perhaps you could integrate it into the other selector plugin. >> > Blair >> >> Sure, I could add them to the selectors plugin if t

[jQuery] Correct way to get the nth item?

2006-11-23 Thread George Adamson
If your jquery results array is in a variable (to reuse it instead of re-querying over and over again) then what is the best way to get the nth item from it *without modifying the array* ? For instance the following would cause the myElements variable to end up containing only one item! var myE

Re: [jQuery] Need help with get()

2006-11-24 Thread George Adamson
Yes of course, silly me, I did not spot that, your second update is correct! .get(0) (or just [0] for short) returns the actual dom element instead of a jqueryised element. So any one of these should work for you: - $("#my li").eq(2).text() - $("#my li:eq(2)").text() - $($("#my li")[2]).tex

[jQuery] JQuery Plugin: SpinBox / SpinButton Control (with no extra markup)

2006-08-11 Thread George Adamson
Hi everyone, I've been working on a Spin Control that uses only a standard textbox. With Javascript enabled the textbox looks and acts like a spin-button control without adding any extra elements. http://www.softwareunity.com/sandbox/jqueryspinbtn/ The up/down arrows are achieved using a back

Re: [jQuery] JQuery Plugin: SpinBox / SpinButton Control (with no extra markup)

2006-08-12 Thread George Adamson
Calculating the mouse position in relation to the buttons is tricky under certains circimstances. Relatively positioned ancestor elements can upset things, (I had to allow for them explicitly in IE). Here's a simpler demo here that shows it working in Opera, FF & IE: http://www.softwareunity.com

Re: [jQuery] Find and Remove Elements

2007-03-21 Thread George Adamson
Hi Alex, this is easy with JQuery's filter method because these days it can take a custom function to decide how to filter your elements: Try something like this... (I'd also recommend a simple check to ensure value is numeric before comparing it) // To hide all "searchResult" DIVs containing re

Re: [jQuery] json status returns ajax

2007-03-21 Thread George Adamson
I'd recommend setting up your success handler by using http://docs.jquery.com/Ajax#.24.ajaxSetup.28_settings_.29 $.ajaxSetup() I'm not sure what effect $().ajaxSuccess will have without a selector in the $() to work with. George amircx wrote: > > why when i get error (status 0) its print ou

Re: [jQuery] hoverIntent = my first plug-in

2007-03-22 Thread George Adamson
An excellent idea that works very elegantly. Well done Brian. Might I suggest one more simple config setting... To optionally skip the following check in your handleHover function: "if (p == this){return false;}" Why? Because I'm using hoverIntent in a hierarchical menu built with *nested* ...

[jQuery] Why does show(0,callback) not run the callback function?

2007-03-30 Thread George Adamson
Why does show(0,callback) not run the callback function? (Looking in the jQuery 1.1 code I see that is the way it is coded) I ran into this issue because my code chooses an animation speed of zero when the element contains too many items to animate smoothly. I found that the callback only fired

Re: [jQuery] List of jQuery-Powered Sites

2007-01-10 Thread George Adamson
Just a little one... We're introducing JQuery into parts of an existing bespoke travel site, for example http://www.steppestravel.co.uk/hot-for-2007-page11.aspx where we dynamically 'pin' postcards to a map. Uses 'Interface' for deducing element positions and 'Metadata' for reading pin coordinat

Re: [jQuery] How to get element when it's ID contains bank space.

2007-01-11 Thread George Adamson
Klaus is absolutely right. If you really really really cannot get around this invalid html then seeking the id as an @attribute seems to work, for example: $("[EMAIL PROTECTED]'']") Note: the inner quotes in the example are two single quotes right next to eachother to represent an empty string. Y

Re: [jQuery] IE 7 fadeIn, fadeOut problem

2007-01-16 Thread George Adamson
Hi Lukas, I've got around problems like this in the past by ensuring you have explicitly specified height and width on the elements before you fade them*. Also, Show() in IE is affected when ClearType is enabled in Windows, but you can get around this by specifying element background color (other

Re: [jQuery] IE 7 fadeIn, fadeOut problem

2007-01-16 Thread George Adamson
Yep, Ben's right try the plugin. In some cases I found the standard JQuery height() and width() methods adequate, but the dimensions plugin tends to be more reliable. Something like this should do it: (Maybe someone else can offer a shorter technique) $("select-my-elements").each(functio

Re: [jQuery] Getting the optgroup for a select option

2007-01-16 Thread George Adamson
I hope I've understood this correctly. Perhaps try something along the lines of this in the function (not tested)... var myOptGrpLabel = $(this).find("[EMAIL PROTECTED]").parents("OPTGROUP").attr("label"); /* ... do something with myOptGrpLabel... */ The parents("OPTGROUP") could be overki

Re: [jQuery] Getting the optgroup for a select option

2007-01-17 Thread George Adamson
t of the select list. If the user then > changes the selection to Option2.2, I'd like to display ('(OptGroup2)' to > the right of the select list. > > ~Philip > > > George Adamson wrote: >> >> I hope I've understood this correctly. >> Perhaps tr

Re: [jQuery] remove in-page links with plain text

2007-01-27 Thread George Adamson
Removing self-links from a page is good plan though it will only work for js-enabled users. Standard readers will still see the full links so this is not a very accessible solution. Best to do it server-side if possible. Anyway, regarding your specific questions: > 1) "I need a way to not to add

[jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread George Adamson
Despite having used JQuery for some time and also written plugins, I've never discovered a good way to replace one element with another. Just need something like: $("#myElement").replaceWith("new element") Depending on the circumstances I usually find I have to resort to DOM methods or if myElem

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread George Adamson
would be nice to have a replaceWith method and a wrapInner method > in the core as I've found I need to be able to do this on a regular > basis. > > FWIW, > > Shane > > > On 1/31/07, George Adamson <[EMAIL PROTECTED]> wrote: >> >> Despite having us

Re: [jQuery] Enabling wildcards in .className selector

2007-02-13 Thread George Adamson
Just discovered that simple wildcards can be used *without* modifying jquery code (phew), by using \\S* in the selector syntax... Can be done like this: $("INPUT.myClass\\S*") will match .myClass1 and .myClassHello etc. This only works where selector searches in the jquery code rely on a regex

[jQuery] Enabling wildcards in .className selector

2007-02-13 Thread George Adamson
I recently had a need for a simple wildcard in the class selector syntax. eg: $("INPUT.myClass*") would match .myClass1 and .myClassHello etc. As an experiment to make this work I made a small change to JQuery's code but that is decidedly poor practice! I'd like to apply the change as a small pl

Re: [jQuery] Enabling wildcards in .className selector

2007-02-13 Thread George Adamson
Oh silly me, thanks Klaus, excellent suggestion. That should cover most situations. Much simpler than fiddling with regex, and easier for others to follow! Cheers, George Klaus Hartl wrote: > > George Adamson schrieb: >> Just discovered that simple wildcards can be used *withou

[jQuery] How to add event handler to XMLHttpRequest.onreadystatechange?

2007-02-21 Thread George Adamson
Hi folks, Anyone know if it is possible to add a custom event handler for the onreadystatechange events of JQuery AJAX calls? I'm accessing a url that is slow to complete but does add to its output as it progresses. It would be nice to be able to catch each new fragment to inform the user of pro

Re: [jQuery] How to add event handler to XMLHttpRequest.onreadystatechange?

2007-02-22 Thread George Adamson
y return the XMLHTTP object? Or something else? Cheers, George Klaus Hartl wrote: > > George Adamson schrieb: >> Hi folks, >> >> Anyone know if it is possible to add a custom event handler for the >> onreadystatechange events of JQuery AJAX calls? >> >> I&

Re: [jQuery] How to add event handler to XMLHttpRequest.onreadystatechange?

2007-02-26 Thread George Adamson
there be any harm in overwriting JQuery's onreadystatechange handler with my own and going from there? Cheers, George Klaus Hartl wrote: > > George Adamson schrieb: >> Thanks for the code Klaus. Nice idea... >> >> When I tried this, the ajax call worked but

[jQuery] wrapText plugin (to wrap html around text nodes)

2007-03-07 Thread George Adamson
des or those containing just white space. Also ignores text in any child elements. I hope it is useful for some of you! Cheers, George (Tested in IE6, FF2.0.0.1, Opera9.10) // Plugin to wrap html around all non-empty text nodes within an element: (ignores text in child elements) // By Georg

Re: [jQuery] Set Id attribute

2007-03-12 Thread George Adamson
Hi Blitze, In your first example you'd need to wrap 'this' like $(this) in order to use the .attr() method. I'm surprised the second example does not work. By the way do you really want all the matched elements to be given the same id? Typically the id of each element should be unique. For a comm