Mike, this is an extraordinary idea. I'm still working out exactly how I
can implement it into my current projects, but this could very well
change the way I use JavaScript in heavy AJAX environments. This allows
me to use true AJAX (as opposed to AHAH) while still maintaining the
flexibility of
This can (and should) be done without jQuery. See the following
excellent resources:
http://css.maxdesign.com.au/index.htm (Listamatic 1 and 2)
http://www.htmldog.com/articles/suckerfish/dropdowns/
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of
What about this (untested):
$('textarea').change( function()
{
$(this).prepend('Current length:nbsp;span id=' + this.id +
'_len' + this.value.length + '/spannbsp;characters');
$('#' + this.id + '_len').css('color', (( this.value.length
parseInt( this.id.split()[1] )) ? 'red' :
May I just say, Mike, in regards to the blockUI plugin: bravo. This is
so timely and relevant to my needs it's almost like you read my mind.
Many many thanks.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Sunday, January 14, 2007
Klaus -- brilliant! The abort method on the XHR object absolutely works.
I've been searching for that functionality without success, so thanks
very much for the tip.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Klaus Hartl
Sent: Friday, January
To: jQuery Discussion.
Subject: Re: [jQuery] Stop an ajax call
Matt Grimm schrieb:
Klaus -- brilliant! The abort method on the XHR object absolutely
works.
I've been searching for that functionality without success, so thanks
very much for the tip.
Great! I wonder if the complete or maybe error
This is really a PHP question...
Your foreach loop is redefining the $returnData variable with every
iteration, so you'll only end up returning the last country in the
array. It looks like your mysql_fetch_array loop is also flawed in that
it writes to the same variables with each loop,
Nice. Much cleaner than:
$(...).addClass('tabs-hide');
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Klaus Hartl
Sent: Thursday, November 30, 2006 1:55 AM
To: jQuery Discussion.
Subject: [jQuery] Tabs update: disabling/enabling
Hi jQuerians,
How is your data parameter formatted in the $.post call? It should be an
object of key/value pairs rather than a request uri string like
'key=valuekey2=value2'.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Christoph Baudson
Sent: Thursday,
Is there a good reason that the AJAX convenience function load() doesn't
fire the ajaxComplete method (and its friends)? It doesn't make sense to
me that only the $.ajax() method would fire ajaxComplete (et al) when
load() is an AJAX method too...
m.
: [jQuery] Tabs plugin callbacks - what makes most sense?
Matt Grimm schrieb:
I'm a big fan of this idea, Klaus, and even made a first attempt at
integrating my own pre-callback. It's useful to me because I am
dynamically loading (via AHAH) the content of each tab and I want the
content to load
I'm a big fan of this idea, Klaus, and even made a first attempt at
integrating my own pre-callback. It's useful to me because I am
dynamically loading (via AHAH) the content of each tab and I want the
content to load before the tab actually makes the switch. As it is, the
tab switches to an empty
And I believe Drupal is the CMS behind the rest of it.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of howard chen
Sent: Tuesday, November 14, 2006 2:15 AM
To: discuss@jquery.com
Subject: [jQuery] Which CMS / Wiki jQuery.com is using
as title...
What would be an ideal way to refresh an image whose src attribute is a
script that dynamically generates the image? Would it be best to store
the value of the src attribute in a variable, remove the img element
from the DOM, and append a new image element with the same URL? In my
quick tests, it
an image with dynamic src
URL?
Is this not working for you?
$("img.whatever").attr("src","newurl.gif");
Glen
On 11/13/06, Matt
Grimm [EMAIL PROTECTED]
wrote:
What
would be an ideal way to refresh an image whose src attribute is ascript
that dynamically generat
an image with dynamic src URL?
If you want to defeat the cache you could try appending the current time
as a query string:
img.src = fileName + ? + (new Date()).getTime();
-blair
Matt Grimm wrote:
What would be an ideal way to refresh an image whose src attribute is
a script that dynamically
I like this method too, since it puts the work on PHP instead of
_javascript_, but unfortunately, in this case, I do not control the image
generating script.
m.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
HeimlichSent: Monday, November 13, 2006 8:34 PMTo: jQuery
In order to access the underlying DOM object, you use the .get(n) method on the
jQuery object.
$(#editarticle/form).get(0).elements.length;
$(#editarticle/form).get(0).reset();
Or, using jQuery, you could get all relevant form elements like so:
$(#editarticle/form :input);
And reset them
I've added just three lines of code to the Interface plugin's
Autocompleter to support a new parameter that is the name of a CSS class
to apply to the lucky input field while performing an AJAX autocomplete
call. This allows a throbber image to be used as the background of the
input field, just
Is it currently possible for the Interface plugin's Autocompleter to
trap enter key presses so that the highlighted suggestion is selected
per usual but then the form is not submitted? Without using autofill, it
appears that there are two ways to select a suggestion -- clicking with
the mouse and
anyone else been successful with the build that was
posted yesterday? I'm using jQuery 1.0.1, but a quick test with 1.0.2
didn't have any effect either.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Grimm
Sent: Wednesday, October 11, 2006 10:18
Answering my own question...
iAutocompleter now requires iUtil, which is (so far as I can see)
undocumented. Include that other library and the autocompleter works as
expected.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Grimm
Sent
Nice work Mike.
How should I go about deleting the FastSerialize wiki page I created on
jQuery.com now? A request to John I suppose?
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Tuesday, October 10, 2006 3:10 PM
To: jQuery
Your problem is that you prefixed the input selector with #. This
works:
$('[EMAIL PROTECTED]/bar]').val();
On Fri, 2006-10-06 at 15:00 -0400, [EMAIL PROTECTED] wrote:
Hi,
if I have a form like
form
input type=text value=test id=content/mytest/
/form
How can I get the
Nice. Another optimization just came to me, after seeing you filter out
the 'option' elements in the semantic selector... you can filter them
before they are returned, which speeds it up considerably:
$('*:not(option)', this)
As a side question, what advantage is there to calling the jQuery
No, that doesn't work, and I'm assuming it has something to do with the
forward slash being an XPath selector.
m.
On Fri, 2006-10-06 at 17:21 -0400, Wil Stuckey wrote:
couldn't you just do:
$('#foo/bar').val();
?
-wil
On 10/6/06, Matt Grimm [EMAIL PROTECTED] wrote:
Your
Thanks for catching this Klaus, I've updated the code to normalize tag
names.
m.
On Tue, 2006-10-03 at 11:21 +0200, Klaus Hartl wrote:
Klaus Hartl schrieb:
Please make it XHTML as XML compatible (hm, why is it always me
complaining about that?)...:
There's missing a part, I'm sorry,
() {
to:
var f = 'INPUT,TEXTAREA,SELECT,BUTTON';
$(f, this).each(function() {
BTW, what do you mean when you say it isn't a plugin? Looks like one to me.
:-)
-Mike
From: Matt Grimm
I've put together a fast form serializer function that I'm
hoping can get some review from
The option:selected is the only syntax that has worked for me in the
past. The XPath method only gets those options that literally have an
attribute of selected in the XHTML.
I also agree with you on the matter of excluding this.id as a fallback
for n. It's unnecessary and possibly confusing
Good point, Jörn. Not only would you want to be able to submit an empty
string value for an option, but if the value attribute is excluded
from the option tag, this.value will return the text between the tags
anyway.
m.
On Tue, 2006-10-03 at 11:17 +0200, Jörn Zaefferer wrote:
Matt Grimm schrieb
});
});
return a;
};
On Mon, 2006-10-02 at 21:02 -0800, Matt Grimm wrote:
Hello,
I've put together a fast form serializer function that I'm hoping can
get some review from the list for completeness, bugs, a better name,
etc. A previous thread revealed quite a performance issue
Disregard. I solved the problem.
m.
On Tue, 2006-10-03 at 12:56 -0800, Matt Grimm wrote:
I was under the impression that the following code should work, but I'm
having no luck at all. I have a PHP script that returns a simple XML
string and I need to get the value of the one and only element
, for
html requests, so I could easily get at the dom of my xhtml. After a
while I decided it was just as easy to regex thru the text as it is to
$('node',xml).
so my advise is to check the typeof xml.
Jake
On 10/3/06, Matt Grimm [EMAIL PROTECTED] wrote:
I was under the impression
FYI, I posted the FastSerialize plugin in the jQuery wiki:
http://jquery.com/docs/Plugins/FastSerialize/
Thought it would be more useful on the website until it was decided
whether it might be included with the form plugin. Mike (Alsup), is it
ultimately your call how this gets incorporated? I
I'm all for that. I've always thought it awkward of XHTML to have the
value of those attributes be the same as their name. Naturally, you may
want to support the existing syntax as well for backwards compatibility.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Hello,
I've put together a fast form serializer function that I'm hoping can
get some review from the list for completeness, bugs, a better name,
etc. A previous thread revealed quite a performance issue with the form
plugin's existing serialize function when operating on a form with a
large
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:
();
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
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,
I've run into a significant performance issue with the form plugin's
serialize method; not a bug per se, but definitely a show-stopper for
me. The problem is that I have a form with a select element, which has
around 250 options. The serialize method grabs *all* child elements of
the form before
support the OR selector '|', otherwise
that'd work quite nicely. The problem is that I don't know how this
would work without using *, and filtering away what you don't need -
while still keeping the order of all the elements that you want.
If anyone has any ideas, I'm all ears.
--John
On 9/27/06, Matt
Or to stay with jQuery objects:
$('type', line).eq(0).val()
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Blair
McKenzieSent: Monday, September 25, 2006 7:53 PMTo: jQuery
Discussion.Subject: Re: [jQuery] Get attribute form
$()
I don't know about the other stuff, but
A more browser-compatible way to check for the pressed key code is:
if (!e) var e = window.event;
keycode = e.keyCode || e.which;
That might work for you, Jim.
m.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Davis
Sent: Tuesday, September 12,
This ought to work:
$(a.questionLink).toggle(function(){
$(this).next().slideDown(slow);
},function(){
$(this).next().slideUp(slow);
});
m.
On Wed, 2006-09-06 at 13:30 -0700, Lipka, Glen wrote:
This is probably simple, but I keep messing it up.
I have a list of anchor links
44 matches
Mail list logo