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
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
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
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'})
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
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
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
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
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
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
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
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
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
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
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
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.
>
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
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
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
>
> ___
>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
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
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
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.
___
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
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
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
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/
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
>
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.
__
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
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
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
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
> 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
>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
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
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(){
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:
>
>
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
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
> 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
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
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
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
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
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
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
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
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* ...
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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&
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
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
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
67 matches
Mail list logo