Hi everyone,
I've been working on a Spin Control that uses only a standard textbox.
input type=text /
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
.
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.
___
jQuery mailing list
discuss@jquery.com
http
Hello Mark,
Nice to see this bug progressing. A search on keywords
http://www.nabble.com/forum/Search.jtp?forum=15494local=yquery=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.
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
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 Lipka wrote:
Parent() works, and also xPath
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
Sent from the JQuery mailing list archive at Nabble.com
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
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 plugins would find that useful.
Another useful funtion would be a method to return the x,y (left
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 has
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. But
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 input type='text' boxes and turns
them into SpinButton controls using just css and JS/JQuery. No extra markup
is added so the
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:
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.
--
:
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
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:
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
___
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
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 and
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
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.
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:
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
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
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
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
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:
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) so
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
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
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.
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
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)
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 overkill,
of the select list.
~Philip
George Adamson wrote:
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
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(divnew
element/div)
Depending on the circumstances I usually find I have to resort to DOM
methods or if
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 used JQuery for some time and also written plugins, I've
never
discovered a good way to replace one element with another
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
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 *without* modifying
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
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'm accessing a url that is slow to complete but does add to its output
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 the xhr.onreadystatechange is
'undefined
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 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
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
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 out
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
52 matches
Mail list logo