[jQuery] Re: Flexible jCarousel

2007-04-12 Thread Jan Sorgalla

Hi,

On 12 Apr., 21:13, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Klaus Hartl schrieb:
>
> > Here's what I did - it's a hack and you could do better but it works for
> > now and you get the picture:
>
> > I added a flexibleWidth option and than added the following lines to the
> > init method:
>
> > // Mod - allow flexible width
> > if (priv.o.flexibleWidth)
> > jQuery(window).bind('resize', function() {
> > var jCarouselClip = jQuery(".jcarousel-clip", priv.scope);
> > var jCarouselClipAvailWidth =
> > parseInt(jCarouselClip[0].parentNode.offsetWidth - 2 * 40);
> > jCarouselClip.css({ width: jCarouselClipAvailWidth });
> > jCarouselClip.find('li').css({ width:
> > Math.ceil(jCarouselClipAvailWidth / priv.o.itemVisible) });
> > priv.dimension = i.offsetWidth + priv.margin(i, "marginLeft") +
> > priv.margin(i, "marginRight");
> > priv.resize();
> > priv.animate(); // readjust left positioning
> > });
>
> > Would be cool if you could add that in a more proper way if you like
> > that :-)
>
> Scratch that "2 * 40", that is special to my project, just needed to get
> that in as fast as possible...:
>
> var jCarouselClipAvailWidth = jCarouselClip[0].parentNode.offsetWidth;
>
> -- Klaus

ok, i see now. One of the main differences between the old and the new
version of jCarousel is, that you no longer have to pass itemsVisible
as option. The number of visible items are calculated on the fly
depending on the sizes of the clip and the items. I've done that
mainly to allow items of different sizes and a flexible carousel
width. But i never thought about your special case ;)

In the new new version, you can do it with the callback functions
(i've adjusted the example posted before) but its also a little bit
hackish.

So, in short, i don't have a built-in solution right now but i keep
that in mind...

Jan



[jQuery] Re: Autocomplte plugin status

2007-04-12 Thread Klaus Hartl


Jörn Zaefferer schrieb:


Klaus Hartl schrieb:
Jörn, thanks for this. One question: I once modified Dylan's 
autocomplete a bit, so that if the autocomplete list is shown, tabbing 
would tab through the list instead of to the next form element. Is it 
possible to take into account?


Have a look here: http://plazes.com/plazes and type something into the 
"Where" field.


I think I also modified the behavior for arrow up/down keys a bit...

Gonna take a look at your modified version.



After all, I think scratch that tabbing... it really seems it is not 
expected behavior!



-- Klaus


[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-12 Thread John Resig


You have to remember that .find() in < 1.1 is destructive, so anything
you do a .find() you're changing the state of 'year', even if you're
not assigning back to it. (This was changed for obvious reasons.)

Additionally, to get the first item you can just do :first, which is
easier, it seems.

--John

On 4/12/07, m3avrck <[EMAIL PROTECTED]> wrote:


Hey guys... so I'm working on a new jCalendar plugin (an inline
calendar, verse a popup one, used both for input dates and displaying
a calendar) and I have one issue I just can't figure out:

var year = $(this).find('select.jcalendar-select-year');
[...]
year.find('option:eq(1)').val()
[...]
year.find('option:last').val()

Those 2 last lines with *.find(*  are not working in 1.0.4 but work
great in 1.1.2.  I can't for the life of me figure out how to make
that work in 1.0.4.

I'm trying to grab both the *first* and *last* select options in a
select.

Any ideas?

Thanks,
ted




[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Aaron Heimlich

On 4/12/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:


I've gotten around google trying to autofill the fields by adding them
after the page is loaded



The only other thing I can think of is:

1. Using the Google Toolbar, find out which fields it takes over
2. Clear the title attributes of the elements on window.onload (I only
suggest window.onload because the Google Toolbar has most likely done it's
thing by then)

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] BlockUI: DOM element removed after first unblock

2007-04-12 Thread Matt Grimm
Mike, I guess I have one other lingering issue with blockUI that I hope
you can help with. I have a custom DOM element that I have been using as
my blockUI overlay, which I pass like so:
 
$.blockUI( $('#block-message') );
 
My overlay element is just a div containing a single h1 and an input
(type=button).
 
What is happening now is that it is removing the whole #block-message
element after the first $.unblockUI call. I can verify that it is
deleted with Firebug, and future calls to $.blockUI just show the
transparent iFrame with no dialog. 
 
I did try to pass the dialog as a DOM element or a jQuery object, either
declared in a variable or passed directly to the function. Nothing seems
to be working.
 
Thanks again,
m.
 
 


[jQuery] .find() works in 1.1.2 but not 1.0.4?

2007-04-12 Thread m3avrck

Hey guys... so I'm working on a new jCalendar plugin (an inline
calendar, verse a popup one, used both for input dates and displaying
a calendar) and I have one issue I just can't figure out:

var year = $(this).find('select.jcalendar-select-year');
[...]
year.find('option:eq(1)').val()
[...]
year.find('option:last').val()

Those 2 last lines with *.find(*  are not working in 1.0.4 but work
great in 1.1.2.  I can't for the life of me figure out how to make
that work in 1.0.4.

I'm trying to grab both the *first* and *last* select options in a
select.

Any ideas?

Thanks,
ted



[jQuery] How to use jdMenu in frameset?

2007-04-12 Thread weide

I download bete2 at http://jdsharp.us/code/jQuery/plugins/jdMenu/1.3.beta2/
When I do some work I find it is be closed over by the frame left or
main.
Is jdMenu could be used in frameset?
and How to use in in this instance>










Thanks !



[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Rick Faircloth
Flip-flopping the two lines worked perfectly.
 
I wonder why the plug-in isn't written that way to start with?
It seems to be the preferred method in the examples.
(Jorn?)
 
I'll just have to remember to change those two lines in the
validation plug-in every time a new version is used.
 
Rick
 
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Heimlich
Sent: Thursday, April 12, 2007 10:43 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Google Toolbar Messages Strike Again!
 
I noticed that too, but as long as Validate prefers title attributes above
all else, then the only thing you can do to prevent Google Toolbar from
messing things up is to give your elements non-blank title attributes.

If you want to, you can do this until this issue is resolved:

Flip-flop lines 493 and 494, so:
493 element.title
494 || this.message(id, rule)

becomes 
493 this.message(id, rule)
494 || element.title

This makes it so that plugin settings are preferred over all else. It solves
this issue when you're using plugin settings instead of title attributes for
error messages, but when you actually *want* to use the title attribute,
wellI'm not sure what to do besides what I mentioned above. There is a
Google Group for Google Toolbar IE[1], though, so can bring this issue up
there too. 

[1] http://groups.google.com/group/IEToolbar-Group
On 4/12/07, Rick Faircloth < [EMAIL PROTECTED]> wrote:
I realized after I posted that what is being replaced on the page
is not the content of the input element, but rather the
cell which has been identified in the plug-in as the container for
the error message.
 
In other words, I'm using  as the container
for the error message.  That's where GT is placing its message.
 
However, when I use Title="Name" in the input element, "Name" becomes
the message displayed in place of Google's message.  At least I know
how to manipulate the message.
 
If I set the title attribute of the input element to Title="" then GT's
message
appears.  I want to be able to set the Title attribute to null or void or
something
that will cause GT to leave it alone, yet not take up a text line on the
page.
 
The  won't take up a line on the page unless
something
appears in text.
 
Ideas?
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Heimlich
Sent: Thursday, April 12, 2007 8:37 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Google Toolbar Messages Strike Again!
 
Well now...

Just installed Google Toolbar (GT) in IE and I'm getting now starting to see
this issue. It appears that my theory was correct.

In IE, GT overwrite's the title attribute of elements it can autofill with
the message we've all come to know and love ;) (unless the element already
has it's title attribute set to something, then GT leaves it alone). When
searching for error messages, Validate prefers an element's title attribute
above all else. So if an invalid form element has it's title attribute set
to something (it could be anything, doesn't have to specifically be GT's
message) that is what you will see for that element's error message. 

This can easily be remedied by making Validate prefer the options object
over the element's title attribute (and since GT doesn't mess with element's
that *already have* title attributes, you have nothing to worry about
there). 

Interestingly, this issue does not appear at all in the Firefox version of
GT. You get the same effect, but it's somehow accomplished without messing
with the element's title attribute.
On 4/12/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote:
On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote: 
I am using the "Name" attribute and the same value
is used for each input for its ID.

I'm doing the same thing, i.e:

 


and I'm still not seeing this issue

What browser is this happening in? IE or FF (all of my tests have been in
FF)? 


-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED] 
http://aheimlich.freepgs.com 



-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com 



-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com   


[jQuery] Re: selector for ATTR is empty

2007-04-12 Thread Brandon Aaron


jQuery provides a trim method already and you can use it like this:

var myString = "test ";
var myNewString = $.trim(myString);

myNewString now holds: "test"

Here are the docs for the method.
http://docs.jquery.com/JavaScript#.24.trim.28_str_.29

--
Brandon Aaron

On 4/12/07, Olaf Bosch <[EMAIL PROTECTED]> wrote:


spinnach schrieb:
>
> you could try something like this (since filter accepts a function):
>
> $('#content [EMAIL PROTECTED]').filter(
> function(index){
> return (this.alt && this.alt.length > 0);
> }
> ).each(...

i have now this:

// Removes leading whitespaces
function trim( value ) {
   var re = /\s*((\S+\s*)*)/;
   return value.replace(re, "$1");
};
   $(function(){
 $('#content [EMAIL PROTECTED]')
   .each(function(){
   if ( trim(this.alt) != '' ){

Work for me correct, also works on at ALT=""

Thank you

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---



[jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?

2007-04-12 Thread Matt Grimm

Thank you Mike, that works nicely enough. Appreciate the quick response,
as always.
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Thursday, April 12, 2007 5:38 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?


I meant jQuery's onreadystatechange fn.  I was just wondering if it
even gets called when the xhr is aborted.  Probably not.  It sounds
like you'll just have to unblock manually when you do the abort.

Mike

On 4/12/07, Matt Grimm <[EMAIL PROTECTED]> wrote:
>
> Good question. No, ajaxStop isn't being fired when I call abort. I
used
> this to test:
>
> $().ajaxStop( function() { alert('foo!'); } );
>
> The alert appeared normally when I allowed the request to complete,
but
> if I hit cancel (calling the abort method), the block UI overlay
stayed
> and the alert did not appear.
>
> As for onreadystatechange, I'm not too familiar with it, but I see it
is
> a property of the xhr object. Instead of calling abort, I tried having
> the "cancel" event log xhr.onreadystatechange in the Firebug console,
> and it was null. Trying to log it from ajaxStart doesn't work either,
> since the xhr object doesn't exist yet.
>
> m.
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> Behalf Of Mike Alsup
> Sent: Thursday, April 12, 2007 4:45 PM
> To: [EMAIL PROTECTED]
> Subject: [jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?
>
>
> Hi Matt,
>
> Is ajaxStop getting invoked when you call abort?  What about
> onreadystatechange, does it get invoked on an abort?
>
> Mike
>
>
>
> On 4/12/07, Matt Grimm <[EMAIL PROTECTED]> wrote:
> >
> >
> > One thing I forgot to add:
> >
> > The block UI overlay *does* go away if I explicitly call
$.unblockUI()
> in
> > the Firebug console after the block message gets stuck (from the
> xhr.abort()
> > call).
> >
> >  
> >  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
> On
> > Behalf Of Matt Grimm
> > Sent: Thursday, April 12, 2007 4:17 PM
> > To: [EMAIL PROTECTED]
> > Subject: [jQuery] Block UI plugin not unblocking on xhr.abort() ?
> >
> >
> >
> > Mike (or others):
> >
> > I've recently upgraded my jQuery core and block UI code to the most
> recent
> > versions and have noticed something is not working the way it did
> before.
> >
> > I'm using the default settings recommended on your web site to block
> and
> > unblock the UI:
> >
> > $().ajaxStart( $.blockUI ).ajaxStop( $.unblockUI );
> >
> >
> > When I make an ajax call with $.ajax, I assign the XMLHttpRequest
> object
> > that is returned to a variable so I can call the abort() method on
it
> if the
> > user clicks "cancel" within the block UI dialog I use. For example:
> >
> > var xhr = $.ajax( { url: '/test.htm' } );
> >
> > While that's loading, I call xhr.abort() to kill the request. That
bit
> still
> > works, but the block UI overlay never goes away. Is this a bug,
> by-design
> > behavior, something else? I get the same result from Firefox 2.0, IE
6
> and
> > IE 7.
> >
> > Thanks for any help you can provide,
> >
> > m.
>


[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Aaron Heimlich

I noticed that too, but as long as Validate prefers title attributes above
all else, then the only thing you can do to prevent Google Toolbar from
messing things up is to give your elements non-blank title attributes.

If you want to, you can do this until this issue is resolved:

Flip-flop lines 493 and 494, so:

493 element.title
494 || this.message(id, rule)

becomes

493 this.message(id, rule)
494 || element.title

This makes it so that plugin settings are preferred over all else. It solves
this issue when you're using plugin settings instead of title attributes for
error messages, but when you actually *want* to use the title attribute,
wellI'm not sure what to do besides what I mentioned above. There is a
Google Group for Google Toolbar IE[1], though, so can bring this issue up
there too.

[1] http://groups.google.com/group/IEToolbar-Group

On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:


 I realized after I posted that what is being replaced on the page

is not the content of the input element, but rather the

cell which has been identified in the plug-in as the container for

the error message.



In other words, I'm using  as the container

for the error message.  That's where GT is placing its message.



However, when I use Title="Name" in the input element, "Name" becomes

the message displayed in place of Google's message.  At least I know

how to manipulate the message.



If I set the title attribute of the input element to Title="" then GT's
message

appears.  I want to be able to set the Title attribute to null or void or
something

that will cause GT to leave it alone, yet not take up a text line on the
page.



The  won't take up a line on the page unless
something

appears in text.



Ideas?



Rick



*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Aaron Heimlich
*Sent:* Thursday, April 12, 2007 8:37 PM
*To:* [EMAIL PROTECTED]
*Subject:* [jQuery] Re: Google Toolbar Messages Strike Again!



Well now...

Just installed Google Toolbar (GT) in IE and I'm getting now starting to
see this issue. It appears that my theory was correct.

In IE, GT overwrite's the title attribute of elements it can autofill with
the message we've all come to know and love ;) (unless the element already
has it's title attribute set to something, then GT leaves it alone). When
searching for error messages, Validate prefers an element's title attribute
above all else. So if an invalid form element has it's title attribute set
to something (it could be anything, doesn't have to specifically be GT's
message) that is what you will see for that element's error message.

This can easily be remedied by making Validate prefer the options object
over the element's title attribute (and since GT doesn't mess with element's
that *already have* title attributes, you have nothing to worry about
there).

Interestingly, this issue does not appear at all in the Firefox version of
GT. You get the same effect, but it's somehow accomplished without messing
with the element's title attribute.

On 4/12/07, *Aaron Heimlich* <[EMAIL PROTECTED]> wrote:

On 4/12/07, *Rick Faircloth* <[EMAIL PROTECTED]> wrote:

 I am using the "Name" attribute and the same value

is used for each input for its ID.


I'm doing the same thing, i.e:




and I'm still not seeing this issue

What browser is this happening in? IE or FF (all of my tests have been in
FF)?



--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com




--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com





--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Rick Faircloth
I realized after I posted that what is being replaced on the page
is not the content of the input element, but rather the
cell which has been identified in the plug-in as the container for
the error message.
 
In other words, I'm using  as the container
for the error message.  That's where GT is placing its message.
 
However, when I use Title="Name" in the input element, "Name" becomes
the message displayed in place of Google's message.  At least I know
how to manipulate the message.
 
If I set the title attribute of the input element to Title="" then GT's
message
appears.  I want to be able to set the Title attribute to null or void or
something
that will cause GT to leave it alone, yet not take up a text line on the
page.
 
The  won't take up a line on the page unless
something
appears in text.
 
Ideas?
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Heimlich
Sent: Thursday, April 12, 2007 8:37 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Google Toolbar Messages Strike Again!
 
Well now...

Just installed Google Toolbar (GT) in IE and I'm getting now starting to see
this issue. It appears that my theory was correct.

In IE, GT overwrite's the title attribute of elements it can autofill with
the message we've all come to know and love ;) (unless the element already
has it's title attribute set to something, then GT leaves it alone). When
searching for error messages, Validate prefers an element's title attribute
above all else. So if an invalid form element has it's title attribute set
to something (it could be anything, doesn't have to specifically be GT's
message) that is what you will see for that element's error message. 

This can easily be remedied by making Validate prefer the options object
over the element's title attribute (and since GT doesn't mess with element's
that *already have* title attributes, you have nothing to worry about
there). 

Interestingly, this issue does not appear at all in the Firefox version of
GT. You get the same effect, but it's somehow accomplished without messing
with the element's title attribute.
On 4/12/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote:
On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote: 
I am using the "Name" attribute and the same value
is used for each input for its ID.

I'm doing the same thing, i.e:

 


and I'm still not seeing this issue

What browser is this happening in? IE or FF (all of my tests have been in
FF)? 


-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED] 
http://aheimlich.freepgs.com 



-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com   


[jQuery] Re: How do I trigger the click event on a button in another frame?

2007-04-12 Thread Jeffrey Kretz

Well I'll be durned.  I wonder if that's a change from earlier versions or
if I just missed it originally.

If both frames are from the same site, I don't know if a reason why that
should fail.

Does this return the DOM element in question?

$('input:[EMAIL PROTECTED]',window.frames["mainFrame"].document)[0];

And if so, does this fire it?

$('input:[EMAIL PROTECTED]',window.frames["mainFrame"].document)[0].click
();

JK

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Thursday, April 12, 2007 6:46 PM
To: jQuery (English)
Subject: [jQuery] Re: How do I trigger the click event on a button in
another frame?


Actually, click with no arguments does trigger the event.

I'm not sure what you mean by different contexts - they are loaded
from the same site.

Another interesting thing is that if I do:

var mainFrame = parent.frames["mainFrame"].document; (from inside of
one of the frames)
console.log($(mainFrame));

it finds the right document, but trying to use mainFrame as a context
for a selector doesn't work.  ie:  console.log($('input',mainFrame));
== no good.

On Apr 12, 6:22 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> The jQuery method "click" is used to bind the click event -- it will not
> fire it.
>
> For example: $('a').click() will not fire the click event.  $('a').click(
> function() { /* do stuff */ } ) will bind to the event.
>
> $('a')[0].click() will fire the event, because its returning the first
> element of the jQuery collection (a specific DOM element) and firing it
> directly.
>
> The other thing you could run into is security issues if your two frames
are
> running under different contexts.
>
> JK
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Daemach
> Sent: Thursday, April 12, 2007 6:04 PM
> To: jQuery (English)
> Subject: [jQuery] How do I trigger the click event on a button in another
> frame?
>
> This started out as just a quick hack until I can redo the mechanism
> correctly, and now I just want to know how it works.
>
> $(window) has no properties, so $(window.frames[1].document) has no
> properties.  Oddly, window.frames[1].document in firebug pulls the
> correct document.  I've been trying to make the following work to no
> avail.  Is jQuery limited to the current document by design?
>
> $
>
('input:[EMAIL PROTECTED]',window.frames["mainFrame"].document).click();




[jQuery] Re: How do I trigger the click event on a button in another frame?

2007-04-12 Thread Daemach

Actually, click with no arguments does trigger the event.

I'm not sure what you mean by different contexts - they are loaded
from the same site.

Another interesting thing is that if I do:

var mainFrame = parent.frames["mainFrame"].document; (from inside of
one of the frames)
console.log($(mainFrame));

it finds the right document, but trying to use mainFrame as a context
for a selector doesn't work.  ie:  console.log($('input',mainFrame));
== no good.

On Apr 12, 6:22 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> The jQuery method "click" is used to bind the click event -- it will not
> fire it.
>
> For example: $('a').click() will not fire the click event.  $('a').click(
> function() { /* do stuff */ } ) will bind to the event.
>
> $('a')[0].click() will fire the event, because its returning the first
> element of the jQuery collection (a specific DOM element) and firing it
> directly.
>
> The other thing you could run into is security issues if your two frames are
> running under different contexts.
>
> JK
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Daemach
> Sent: Thursday, April 12, 2007 6:04 PM
> To: jQuery (English)
> Subject: [jQuery] How do I trigger the click event on a button in another
> frame?
>
> This started out as just a quick hack until I can redo the mechanism
> correctly, and now I just want to know how it works.
>
> $(window) has no properties, so $(window.frames[1].document) has no
> properties.  Oddly, window.frames[1].document in firebug pulls the
> correct document.  I've been trying to make the following work to no
> avail.  Is jQuery limited to the current document by design?
>
> $
> ('input:[EMAIL PROTECTED]',window.frames["mainFrame"].document).click();



[jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?

2007-04-12 Thread Mike Alsup


I meant jQuery's onreadystatechange fn.  I was just wondering if it
even gets called when the xhr is aborted.  Probably not.  It sounds
like you'll just have to unblock manually when you do the abort.

Mike

On 4/12/07, Matt Grimm <[EMAIL PROTECTED]> wrote:


Good question. No, ajaxStop isn't being fired when I call abort. I used
this to test:

$().ajaxStop( function() { alert('foo!'); } );

The alert appeared normally when I allowed the request to complete, but
if I hit cancel (calling the abort method), the block UI overlay stayed
and the alert did not appear.

As for onreadystatechange, I'm not too familiar with it, but I see it is
a property of the xhr object. Instead of calling abort, I tried having
the "cancel" event log xhr.onreadystatechange in the Firebug console,
and it was null. Trying to log it from ajaxStart doesn't work either,
since the xhr object doesn't exist yet.

m.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Thursday, April 12, 2007 4:45 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?


Hi Matt,

Is ajaxStop getting invoked when you call abort?  What about
onreadystatechange, does it get invoked on an abort?

Mike



On 4/12/07, Matt Grimm <[EMAIL PROTECTED]> wrote:
>
>
> One thing I forgot to add:
>
> The block UI overlay *does* go away if I explicitly call $.unblockUI()
in
> the Firebug console after the block message gets stuck (from the
xhr.abort()
> call).
>
>  
>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> Behalf Of Matt Grimm
> Sent: Thursday, April 12, 2007 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: [jQuery] Block UI plugin not unblocking on xhr.abort() ?
>
>
>
> Mike (or others):
>
> I've recently upgraded my jQuery core and block UI code to the most
recent
> versions and have noticed something is not working the way it did
before.
>
> I'm using the default settings recommended on your web site to block
and
> unblock the UI:
>
> $().ajaxStart( $.blockUI ).ajaxStop( $.unblockUI );
>
>
> When I make an ajax call with $.ajax, I assign the XMLHttpRequest
object
> that is returned to a variable so I can call the abort() method on it
if the
> user clicks "cancel" within the block UI dialog I use. For example:
>
> var xhr = $.ajax( { url: '/test.htm' } );
>
> While that's loading, I call xhr.abort() to kill the request. That bit
still
> works, but the block UI overlay never goes away. Is this a bug,
by-design
> behavior, something else? I get the same result from Firefox 2.0, IE 6
and
> IE 7.
>
> Thanks for any help you can provide,
>
> m.



[jQuery] Re: How do I trigger the click event on a button in another frame?

2007-04-12 Thread Jeffrey Kretz

The jQuery method "click" is used to bind the click event -- it will not
fire it.

For example: $('a').click() will not fire the click event.  $('a').click(
function() { /* do stuff */ } ) will bind to the event.

$('a')[0].click() will fire the event, because its returning the first
element of the jQuery collection (a specific DOM element) and firing it
directly.

The other thing you could run into is security issues if your two frames are
running under different contexts.

JK

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Thursday, April 12, 2007 6:04 PM
To: jQuery (English)
Subject: [jQuery] How do I trigger the click event on a button in another
frame?


This started out as just a quick hack until I can redo the mechanism
correctly, and now I just want to know how it works.

$(window) has no properties, so $(window.frames[1].document) has no
properties.  Oddly, window.frames[1].document in firebug pulls the
correct document.  I've been trying to make the following work to no
avail.  Is jQuery limited to the current document by design?

$
('input:[EMAIL PROTECTED]',window.frames["mainFrame"].document).click();




[jQuery] Re: Autocomplete Question

2007-04-12 Thread Jeff Fleitz

Hi Dan, guess I'll jump in real quick while the iron is hot.

I too am a noob to jQuery and Ajax stuff in general. I borrowed your
autocomplete example (and downloaded your recent presentation to check
out the other stuff), and I have it working great, including passing
the hidden id value, etc. Although I must admit I need to get more
familiar with jQuery because my stuff is a mix of jQuery and js and is
much more verbose at this point. But it works great on a table lookup
with about 20,000 entries in it, thanks.  I apologize in advance for
being verbose, but I don't know how else to ask it.

At any rate, I have a couple questions regarding a form with 2
autocomplete fields which both lookup the same table.  I have two
different declarations going which call the same cf query:

function lookupAjax(){
var oSuggest1 = $("#unit_name")[0].autocompleter;
var oSuggest2 = $("#unit_lookup")[0].autocompleter;
oSuggest1.findValue();
oSuggest2.findValue();
return false;
}

$(document).ready(function() {
$("#unit_name").autocomplete("qryUnitLookup.cfm",{ 
options left out
for brevity});
$("#unit_lookup").autocomplete("qryUnitLookup.cfm",{});
});


They both call findValue() and work great, and apparently without
conflict as standalone fields. However, I am using the unit_lookup
field in the second declaration to dynamically populate a select menu
on the form with the selected value from that unit_lookup. So when the
user selects the lookup value and presses enter, the id and value are
added as a new option in the select.  There is also a button to remove
selected entries.  Here is the modified findValue() function.

function findValue(li) {
if( li == null ) return alert("No match!");
// Use the unit_id as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text 
box
else var sValue = li.selectValue;
var elSel = 
document.getElementById('additional_units');
var elLookup = 
document.getElementById('addunit_lookup');
// this line would be replaced with a legit 
evaluation
if (the field being evaluated is unit_lookup, 
execute this block)
{
if (elSel.options[0].text == 
'-- None Selected
--') {
elSel.remove(0);
}
// append the selected value
if (elSel.length < 25) {
appendOption(sValue,li.selectValue);
// blank out the search text field
elLookup.value = '';
elLookup.focus();
}
}
}

What I would like to do is identify some jQuery(?) variable that would
allow me to bracket some code in the findValue() function, so that if
the field value being evaluated is from unit lookup, it runs, and if
it isn't it doesn't. I need to have a way to eliminate duplicate
lookup selections for the select control, and I was considering
looping through the select options in findValue() to see if the option
existed before allowing them to add it.  In other words, I would like
to avoid having to create a separate instance of findValue() and maybe
the other functions for each field, if there is a way to do this. I
have been mucking around in Firebug and I can't find anything. Does
this make sense?  Know of a way to do this?

Secondly, I see the dataset values returned from the ajax call in the
response header using Firebug, but can't figure out a way to access
them. I don't know where these go, but they don't appear to be in the
DOM.  I was trying to come up with a way to loop through the query
result values and compare them against the previous options already
added to the select menu, and not allow them to display in the
unit_lookup list if they already exist. Don't know if this is possible
or not.

Jeff



[jQuery] How do I trigger the click event on a button in another frame?

2007-04-12 Thread Daemach

This started out as just a quick hack until I can redo the mechanism
correctly, and now I just want to know how it works.

$(window) has no properties, so $(window.frames[1].document) has no
properties.  Oddly, window.frames[1].document in firebug pulls the
correct document.  I've been trying to make the following work to no
avail.  Is jQuery limited to the current document by design?

$
('input:[EMAIL PROTECTED]',window.frames["mainFrame"].document).click();



[jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?

2007-04-12 Thread Matt Grimm

Good question. No, ajaxStop isn't being fired when I call abort. I used
this to test:

$().ajaxStop( function() { alert('foo!'); } ); 

The alert appeared normally when I allowed the request to complete, but
if I hit cancel (calling the abort method), the block UI overlay stayed
and the alert did not appear.

As for onreadystatechange, I'm not too familiar with it, but I see it is
a property of the xhr object. Instead of calling abort, I tried having
the "cancel" event log xhr.onreadystatechange in the Firebug console,
and it was null. Trying to log it from ajaxStart doesn't work either,
since the xhr object doesn't exist yet.

m.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Thursday, April 12, 2007 4:45 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?


Hi Matt,

Is ajaxStop getting invoked when you call abort?  What about
onreadystatechange, does it get invoked on an abort?

Mike



On 4/12/07, Matt Grimm <[EMAIL PROTECTED]> wrote:
>
>
> One thing I forgot to add:
>
> The block UI overlay *does* go away if I explicitly call $.unblockUI()
in
> the Firebug console after the block message gets stuck (from the
xhr.abort()
> call).
>
>  
>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> Behalf Of Matt Grimm
> Sent: Thursday, April 12, 2007 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: [jQuery] Block UI plugin not unblocking on xhr.abort() ?
>
>
>
> Mike (or others):
>
> I've recently upgraded my jQuery core and block UI code to the most
recent
> versions and have noticed something is not working the way it did
before.
>
> I'm using the default settings recommended on your web site to block
and
> unblock the UI:
>
> $().ajaxStart( $.blockUI ).ajaxStop( $.unblockUI );
>
>
> When I make an ajax call with $.ajax, I assign the XMLHttpRequest
object
> that is returned to a variable so I can call the abort() method on it
if the
> user clicks "cancel" within the block UI dialog I use. For example:
>
> var xhr = $.ajax( { url: '/test.htm' } );
>
> While that's loading, I call xhr.abort() to kill the request. That bit
still
> works, but the block UI overlay never goes away. Is this a bug,
by-design
> behavior, something else? I get the same result from Firefox 2.0, IE 6
and
> IE 7.
>
> Thanks for any help you can provide,
>
> m.


[jQuery] Re: selector for ATTR is empty

2007-04-12 Thread Olaf Bosch


spinnach schrieb:


you could try something like this (since filter accepts a function):

$('#content [EMAIL PROTECTED]').filter(
function(index){
return (this.alt && this.alt.length > 0);
}
).each(...


i have now this:

// Removes leading whitespaces
function trim( value ) {
  var re = /\s*((\S+\s*)*)/;
  return value.replace(re, "$1");
};
  $(function(){
$('#content [EMAIL PROTECTED]')
  .each(function(){
  if ( trim(this.alt) != '' ){

Work for me correct, also works on at ALT=""

Thank you

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---


[jQuery] Re: Job Opening - Lead Web Developer @ Fluid

2007-04-12 Thread Brian Cherne

Would it be better if I wrote...

$("person.skilled",work).is('.available').job({where: 'san francisco', when:
'asap', type: 'full-time'})

On 4/12/07, Glen Lipka <[EMAIL PROTECTED]> wrote:


On 4/12/07, Brian Cherne <[EMAIL PROTECTED]> wrote:
>
>
> Is this a good (appropriate) place to post a job opening? Are there
> other lists/places I should try?



Personally, I would think a nice jQuery job posting board or list would be
the best place.
Seems like job postings or solicitations here might be a little
distracting.

Glen





[jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?

2007-04-12 Thread Mike Alsup


Hi Matt,

Is ajaxStop getting invoked when you call abort?  What about
onreadystatechange, does it get invoked on an abort?

Mike



On 4/12/07, Matt Grimm <[EMAIL PROTECTED]> wrote:



One thing I forgot to add:

The block UI overlay *does* go away if I explicitly call $.unblockUI() in
the Firebug console after the block message gets stuck (from the xhr.abort()
call).

 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Grimm
Sent: Thursday, April 12, 2007 4:17 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Block UI plugin not unblocking on xhr.abort() ?



Mike (or others):

I've recently upgraded my jQuery core and block UI code to the most recent
versions and have noticed something is not working the way it did before.

I'm using the default settings recommended on your web site to block and
unblock the UI:

$().ajaxStart( $.blockUI ).ajaxStop( $.unblockUI );


When I make an ajax call with $.ajax, I assign the XMLHttpRequest object
that is returned to a variable so I can call the abort() method on it if the
user clicks "cancel" within the block UI dialog I use. For example:

var xhr = $.ajax( { url: '/test.htm' } );

While that's loading, I call xhr.abort() to kill the request. That bit still
works, but the block UI overlay never goes away. Is this a bug, by-design
behavior, something else? I get the same result from Firefox 2.0, IE 6 and
IE 7.

Thanks for any help you can provide,

m.


[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Aaron Heimlich

Well now...

Just installed Google Toolbar (GT) in IE and I'm getting now starting to see
this issue. It appears that my theory was correct.

In IE, GT overwrite's the title attribute of elements it can autofill with
the message we've all come to know and love ;) (unless the element already
has it's title attribute set to something, then GT leaves it alone). When
searching for error messages, Validate prefers an element's title attribute
above all else. So if an invalid form element has it's title attribute set
to something (it could be anything, doesn't have to specifically be GT's
message) that is what you will see for that element's error message.

This can easily be remedied by making Validate prefer the options object
over the element's title attribute (and since GT doesn't mess with element's
that *already have* title attributes, you have nothing to worry about
there).

Interestingly, this issue does not appear at all in the Firefox version of
GT. You get the same effect, but it's somehow accomplished without messing
with the element's title attribute.

On 4/12/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote:


On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:
>
>  I am using the "Name" attribute and the same value
>
> is used for each input for its ID.
>

I'm doing the same thing, i.e:




and I'm still not seeing this issue

What browser is this happening in? IE or FF (all of my tests have been in
FF)?

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com





--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: selector for ATTR is empty

2007-04-12 Thread spinnach


you could try something like this (since filter accepts a function):

$('#content [EMAIL PROTECTED]').filter(
function(index){
return (this.alt && this.alt.length > 0);
}
).each(...

dennis.

Olaf Bosch wrote:


Hi All,
where i release a Seloctor of all images with not empty ALT, this select
all with ALT:

$('#content [EMAIL PROTECTED]').each(function(){

i will the function work when ALT not empty

Thanks





[jQuery] Re: Block UI plugin not unblocking on xhr.abort() ?

2007-04-12 Thread Matt Grimm
One thing I forgot to add:
 
The block UI overlay *does* go away if I explicitly call $.unblockUI()
in the Firebug console after the block message gets stuck (from the
xhr.abort() call).



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Grimm
Sent: Thursday, April 12, 2007 4:17 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Block UI plugin not unblocking on xhr.abort() ?


Mike (or others):
 
I've recently upgraded my jQuery core and block UI code to the most
recent versions and have noticed something is not working the way it did
before. 
 
I'm using the default settings recommended on your web site to block and
unblock the UI:

$().ajaxStart( $.blockUI ).ajaxStop( $.unblockUI );
 
When I make an ajax call with $.ajax, I assign the XMLHttpRequest object
that is returned to a variable so I can call the abort() method on it if
the user clicks "cancel" within the block UI dialog I use. For example:
 
var xhr = $.ajax( { url: '/test.htm' } );
 
While that's loading, I call xhr.abort() to kill the request. That bit
still works, but the block UI overlay never goes away. Is this a bug,
by-design behavior, something else? I get the same result from Firefox
2.0, IE 6 and IE 7.
 
Thanks for any help you can provide,
 
m.


[jQuery] Block UI plugin not unblocking on xhr.abort() ?

2007-04-12 Thread Matt Grimm
Mike (or others):
 
I've recently upgraded my jQuery core and block UI code to the most
recent versions and have noticed something is not working the way it did
before. 
 
I'm using the default settings recommended on your web site to block and
unblock the UI:

$().ajaxStart( $.blockUI ).ajaxStop( $.unblockUI );
 
When I make an ajax call with $.ajax, I assign the XMLHttpRequest object
that is returned to a variable so I can call the abort() method on it if
the user clicks "cancel" within the block UI dialog I use. For example:
 
var xhr = $.ajax( { url: '/test.htm' } );
 
While that's loading, I call xhr.abort() to kill the request. That bit
still works, but the block UI overlay never goes away. Is this a bug,
by-design behavior, something else? I get the same result from Firefox
2.0, IE 6 and IE 7.
 
Thanks for any help you can provide,
 
m.


[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Aaron Heimlich

On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:


 I am using the "Name" attribute and the same value

is used for each input for its ID.



I'm doing the same thing, i.e:




and I'm still not seeing this issue

What browser is this happening in? IE or FF (all of my tests have been in
FF)?

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Job Opening - Lead Web Developer @ Fluid

2007-04-12 Thread Glen Lipka

On 4/12/07, Brian Cherne <[EMAIL PROTECTED]> wrote:



Is this a good (appropriate) place to post a job opening? Are there other
lists/places I should try?




Personally, I would think a nice jQuery job posting board or list would be
the best place.
Seems like job postings or solicitations here might be a little distracting.

Glen


[jQuery] Re: jquery form plugin

2007-04-12 Thread Tom Shafer

oh, ok cool i did not know that. Thank you.

-TJ

On Apr 12, 7:46 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Tom,
>
> The target and dataType options can not be used together.  If you must
> use json then you need to process the response yourself.  Otherwise
> you can just remove the dataType option and return html from the
> server and the target will be updated for you.
>
> Mike
>
> On 4/12/07, Tom  Shafer <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yea I am using json.
>
> >http://dev.unfetteredpress.com/story/Chavez_to_shut_down_opposition_TV
>
> > click your turn and you can reply, the data is inserted into the
> > database it just wont come back with the html message i wouls like
>
> > Thanks,
> > -TJ
>
> > On Apr 12, 7:22 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> > > Do you have the dataType set to 'json' by any chance?  Can you post a
> > > sample page that shows the problem?
>
> > > Mike
>
> > > On 4/12/07, Tom  Shafer <[EMAIL PROTECTED]> wrote:
>
> > > > I am trying to return html after the form has been processed. I get it
> > > > to work with plain text such as echo '{ message: " Thanks " }'; but
> > > > html doesnt seem to want to work.
>
> > > > Any thoughts?



[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Rick Faircloth
You may have hit on something here, Aaron.
 
I'm not using the "title" attribute for the inputs, but
I am using the "Name" attribute and the same value
is used for each input for its ID.
 
Would you recommend changing the Name value
or the ID value to something different.
 
Which do you think Google is overriding?
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Heimlich
Sent: Thursday, April 12, 2007 7:44 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Google Toolbar Messages Strike Again!
 
By any chance are you using the form element's "title" attribute to hold
error messages? Google Toolbar might be overriding the element's title
attribute. That's the only thing I can think of as I've never encountered
this before when working with Jorn's Validation plugin (and I *have* the
Google Toolbar installed in Firefox *with* Autofill enabled). 

Perhaps the reason I've never encountered this is because I specify all of
my rules and error messages via the options object (the one that gets passed
into $().validate()[1]) instead of using HTML attributes on the form
elements. 

[1] http://jquery.bassistance.de/api-browser/plugins.html#validateMap
On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:

Hi, all...

Well... I went to demo a page containing a form with
Jorn's Validation plug-in today and as soon as I caused
what should have been an error message to pop up
above the form field, I get "Google can fill in this form field for you..." 

Aaaah!

Has anyone found a way to keep the Google messages from overriding
the error messages?

Rick





-- 
Aaron Heimlich
Web Developer 
[EMAIL PROTECTED]
http://aheimlich.freepgs.com 


[jQuery] selector for ATTR is empty

2007-04-12 Thread Olaf Bosch


Hi All,
where i release a Seloctor of all images with not empty ALT, this select
all with ALT:

$('#content [EMAIL PROTECTED]').each(function(){

i will the function work when ALT not empty

Thanks

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---


[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Rick Faircloth
Are you talking about filling the fields after the page is loaded?
 
If so, that’s not the current problem.  For my client, the fields were
not being filled… the Google toolbar was simple offering to fill them,
and using my error message elements to do so.
 
I need to prevent Google from accessing the elements.  Google’s
messages don’t appear until I’ve “focused” a form element.
 
If there’s not a way to “disable” the Google toolbar’s intervention,
then this type of JS validation isn’t going to work.  I would imagine that
a lot of people have that toolbar installed.
 
Ideas?
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
Sent: Thursday, April 12, 2007 7:13 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Google Toolbar Messages Strike Again!
 
I've gotten around google trying to autofill the fields by adding them after 
the page is loaded (via jquery)... not very nice for non-js users but it's 
the only way I ever got around it!
On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:

Hi, all...

Well... I went to demo a page containing a form with
Jorn's Validation plug-in today and as soon as I caused
what should have been an error message to pop up
above the form field, I get "Google can fill in this form field for you..." 

Aaaah!

Has anyone found a way to keep the Google messages from overriding
the error messages?

Rick





-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ 


[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Aaron Heimlich

By any chance are you using the form element's "title" attribute to hold
error messages? Google Toolbar might be overriding the element's title
attribute. That's the only thing I can think of as I've never encountered
this before when working with Jorn's Validation plugin (and I *have* the
Google Toolbar installed in Firefox *with* Autofill enabled).

Perhaps the reason I've never encountered this is because I specify all of
my rules and error messages via the options object (the one that gets passed
into $().validate()[1]) instead of using HTML attributes on the form
elements.

[1] http://jquery.bassistance.de/api-browser/plugins.html#validateMap

On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:



Hi, all...

Well... I went to demo a page containing a form with
Jorn's Validation plug-in today and as soon as I caused
what should have been an error message to pop up
above the form field, I get "Google can fill in this form field for
you..."

Aaaah!

Has anyone found a way to keep the Google messages from overriding
the error messages?

Rick






--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Job Opening - Lead Web Developer @ Fluid

2007-04-12 Thread Matt Stith

Think they would hire a 16 year old :?

On 4/12/07, Brian Cherne <[EMAIL PROTECTED]> wrote:


I've been really enjoying jQuery. When they said a lead web developer
position was opening at my company I naturally thought to post it here to
see if any jQuery-oriented folk were interested... but...

Is this a good (appropriate) place to post a job opening? Are there other
lists/places I should try? jQuery-en is the one professional group I take
the time to read/reply. We've hit the traditional Craigslist and other job
boards...

You're welcome to ask me questions about what it's like to work at Fluid,
but you'll have to follow the directions below to get your name in the
applicant pool. :) I've pasted the posting below.

Cheers,
Brian.


Fluid  designs and develops
award-winning  interactive digital retail experiences. Our clients include
Reebok,  Timberland, JanSport, Design Within Reach, and The North Face.

We are looking for skilled, experienced, and passionate engineers to  work
on projects built using dHTML, CSS, and JavaScript. Successful  candidates
will:
* Architect complex applications using UML and design patterns.
* Lead teams of 2-3 engineers.
* Write superior code, primarily dHTML, CSS, and JavaScript with AJaX  and
3rd party JavaScript libraries.
* Communicate clearly with team members, partners, and clients.

Experience with the following technologies would be helpful:
ColdFusion,  Java, .NET, Apache, IIS, XML, ecommerce platforms, CMS systems,
and web  traffic analytics packages. Artistic, information design, and
project  management skills would also be useful.

We would prefer the candidate to work in Fluid's San Francisco office  but
we would consider demonstrably disciplined remote workers. Please  email
your resume, a cover letter, and sample code to  [EMAIL PROTECTED]
Thanks for your time.




[jQuery] Re: jquery form plugin

2007-04-12 Thread Mike Alsup


Tom,

The target and dataType options can not be used together.  If you must
use json then you need to process the response yourself.  Otherwise
you can just remove the dataType option and return html from the
server and the target will be updated for you.

Mike


On 4/12/07, Tom  Shafer <[EMAIL PROTECTED]> wrote:


Yea I am using json.

http://dev.unfetteredpress.com/story/Chavez_to_shut_down_opposition_TV

click your turn and you can reply, the data is inserted into the
database it just wont come back with the html message i wouls like

Thanks,
-TJ

On Apr 12, 7:22 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Do you have the dataType set to 'json' by any chance?  Can you post a
> sample page that shows the problem?
>
> Mike
>
> On 4/12/07, Tom  Shafer <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am trying to return html after the form has been processed. I get it
> > to work with plain text such as echo '{ message: " Thanks " }'; but
> > html doesnt seem to want to work.
>
> > Any thoughts?




[jQuery] Job Opening - Lead Web Developer @ Fluid

2007-04-12 Thread Brian Cherne

I've been really enjoying jQuery. When they said a lead web developer
position was opening at my company I naturally thought to post it here to
see if any jQuery-oriented folk were interested... but...

Is this a good (appropriate) place to post a job opening? Are there other
lists/places I should try? jQuery-en is the one professional group I take
the time to read/reply. We've hit the traditional Craigslist and other job
boards...

You're welcome to ask me questions about what it's like to work at Fluid,
but you'll have to follow the directions below to get your name in the
applicant pool. :) I've pasted the posting below.

Cheers,
Brian.


Fluid  designs and develops award-winning  interactive
digital retail experiences. Our clients include Reebok,  Timberland,
JanSport, Design Within Reach, and The North Face.

We are looking for skilled, experienced, and passionate engineers to  work
on projects built using dHTML, CSS, and JavaScript. Successful  candidates
will:
* Architect complex applications using UML and design patterns.
* Lead teams of 2-3 engineers.
* Write superior code, primarily dHTML, CSS, and JavaScript with AJaX  and
3rd party JavaScript libraries.
* Communicate clearly with team members, partners, and clients.

Experience with the following technologies would be helpful:
ColdFusion,  Java, .NET, Apache, IIS, XML, ecommerce platforms, CMS systems,
and web  traffic analytics packages. Artistic, information design, and
project  management skills would also be useful.

We would prefer the candidate to work in Fluid's San Francisco office  but
we would consider demonstrably disciplined remote workers. Please  email
your resume, a cover letter, and sample code to
[EMAIL PROTECTED] Thanks for your time.


[jQuery] Re: dynamic creation of an button

2007-04-12 Thread Jeffrey Kretz

Now, this is only my opinion, and I'm not an expert by any means.

I believe that either of those methods would work.  It is possible that
there could be some minor performance difference between them.

jQuery creates a new element through the jQuery.clean method, which creates
a div element, adds it to the page, and then assigns its innerHTML property
with whatever you wrote.  It then extracts the childNodes of the div and
returns them wrapped in a jQuery object.

When you use the jQuery.fn.attr method, it goes through a series of steps to
assign the attributes you supplied.

I don't know which is faster.  Personally I assign my key attributes at the
time of creation, $('mailto:[EMAIL PROTECTED] On
Behalf Of Diego A.
Sent: Thursday, April 12, 2007 3:24 PM
To: jQuery (English)
Subject: [jQuery] Re: dynamic creation of an button


I didn't know that, but I do have a related question if you don't
mind.

I prefer to use...
$('');
...instead of...
$('').attr({'id':'some-id', 'value': 'yes'});

It works fine, but so many people choose to use the second method.
Is there anything wrong with the way I do it?

On Apr 12, 10:30 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> Some of the attributes of a DOM object in IE are read-only.
>
> The "type" attribute is one of these and so cannot be assigned to AFTER
the
> element is created.
>
> JK
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>
> Behalf Of spinnach
> Sent: Thursday, April 12, 2007 2:06 PM
> To: [EMAIL PROTECTED]
> Subject: [jQuery] dynamic creation of an button
>
> anybody knows why the following fails in ie, but works ok in firefox?
> $('').attr({'type': 'button', 'id':'some-id', 'value': 'yes'})
>
> when i remove the type hash attribute, it works:
> $('').attr({'id':'some-id', 'value': 'yes'});
>
> dennis.




[jQuery] Re: jquery form plugin

2007-04-12 Thread Tom Shafer

Yea I am using json.

http://dev.unfetteredpress.com/story/Chavez_to_shut_down_opposition_TV

click your turn and you can reply, the data is inserted into the
database it just wont come back with the html message i wouls like

Thanks,
-TJ

On Apr 12, 7:22 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Do you have the dataType set to 'json' by any chance?  Can you post a
> sample page that shows the problem?
>
> Mike
>
> On 4/12/07, Tom  Shafer <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am trying to return html after the form has been processed. I get it
> > to work with plain text such as echo '{ message: " Thanks " }'; but
> > html doesnt seem to want to work.
>
> > Any thoughts?



[jQuery] Re: What is the right "find" expression?

2007-04-12 Thread Jeffrey Kretz

The hidden input element below has an id of "stu_1".  So you could do this:

var id = $('#stu_1').val();

Is this what you wanted?

JK

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Thursday, April 12, 2007 3:52 PM
To: jQuery (English)
Subject: [jQuery] What is the right "find" expression?


Hi,

After dragging an object into a Droppable, using this code:

$('#classlistcell').Droppable(
{
accept: 'student',
tolerance: 'intersect',
activeclass: 'dropzoneactive',
hoverclass: 'dropzonehover',
ondrop: function (drag)
{
var name =
drag.innerHTML;
var id = /*
Need expression here */;
 
addStudentToClass(name, id);
}
}
);

I'm trying to form an expression for the "/* Need expression here */;"
line.  I want to extract the value of "value" (in the below example
"1" from the hidden element.  Below is the HTML that I assume is in
the "drag" object:


Alvarado, Dave (ID: 3)

How do I extract this value?  Thanks, - Dave




[jQuery] Re: jquery form plugin

2007-04-12 Thread Mike Alsup


Do you have the dataType set to 'json' by any chance?  Can you post a
sample page that shows the problem?

Mike

On 4/12/07, Tom  Shafer <[EMAIL PROTECTED]> wrote:


I am trying to return html after the form has been processed. I get it
to work with plain text such as echo '{ message: " Thanks " }'; but
html doesnt seem to want to work.

Any thoughts?




[jQuery] Re: Google Toolbar Messages Strike Again!

2007-04-12 Thread Ⓙⓐⓚⓔ

I've gotten around google trying to autofill the fields by adding them after
the page is loaded (via jquery)... not very nice for non-js users but
it's the only way I ever got around it!

On 4/12/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:



Hi, all...

Well... I went to demo a page containing a form with
Jorn's Validation plug-in today and as soon as I caused
what should have been an error message to pop up
above the form field, I get "Google can fill in this form field for
you..."

Aaaah!

Has anyone found a way to keep the Google messages from overriding
the error messages?

Rick






--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Google Toolbar Messages Strike Again!

2007-04-12 Thread Rick Faircloth

Hi, all...

Well... I went to demo a page containing a form with
Jorn's Validation plug-in today and as soon as I caused
what should have been an error message to pop up
above the form field, I get "Google can fill in this form field for you..."

Aaaah!

Has anyone found a way to keep the Google messages from overriding
the error messages?

Rick




[jQuery] Re: Anyone see anything wrong in this code?

2007-04-12 Thread Jörn Zaefferer


Klaus Hartl schrieb:

Commenting out the "blur" line does prevent IE from locking up.
(Why doesn't this happen in FF?), but then, of course, no validation 
occurs.


When I change "blur" to "keyup" everything seems to work fine.

What's up with that?  Keyup is fine, but I prefer to allow users a 
little

more
time to correct entries rather than hammering them with an error 
message

per keystroke, perhaps.

I did comment out the debug statement, too... forgot that would prevent
submission...
  
I thought that you could prevent any problems with validation on blur 
by disabling focusInvalid. Let me know if you find anything that may 
exaplain why its happening.


An interesting approach would be keyup with a timeout, like in the 
autocomplete plugin.




What about the change event?
As that is also triggered on blur, the same problem with focussing 
invalid elements would most likely occur.
But I've got an idea how to prevent that in the first place: Just 
disable focus invalid completely for element-based events, only do it on 
submit, where it is supposed to do its job.


--
Jörn Zaefferer

http://bassistance.de



[jQuery] What is the right "find" expression?

2007-04-12 Thread [EMAIL PROTECTED]

Hi,

After dragging an object into a Droppable, using this code:

$('#classlistcell').Droppable(
{
accept: 'student',
tolerance: 'intersect',
activeclass: 'dropzoneactive',
hoverclass: 'dropzonehover',
ondrop: function (drag)
{
var name =
drag.innerHTML;
var id = /*
Need expression here */;
 
addStudentToClass(name, id);
}
}
);

I'm trying to form an expression for the "/* Need expression here */;"
line.  I want to extract the value of "value" (in the below example
"1" from the hidden element.  Below is the HTML that I assume is in
the "drag" object:


Alvarado, Dave (ID: 3)

How do I extract this value?  Thanks, - Dave



[jQuery] Re: Defining of a function

2007-04-12 Thread Olaf Gleba



Am 13.04.2007 um 00:13 schrieb Olaf Gleba:

I wondered if there's maybe some speed issue on that topic. But as  
far as i read about it now, its only a question at which point the  
function object is available.


good resource either:
http://developer.mozilla.org/en/docs/ 
Core_JavaScript_1.5_Reference:Functions


--
Olaf Gleba






[jQuery] Re: screen flashing with IE

2007-04-12 Thread Diego A.

I don't think there's a fix for that.
It's just the way IE handles what's being displayed on the screen.

Somebody please correct me if I'm wrong...

On Apr 12, 3:16 pm, "bleen" <[EMAIL PROTECTED]> wrote:
> I created a small widget with 4 tabs - rollover the tab and the
> content below changes.  In IE6 if I roll over the tabs with any kind
> of speed (a def possibility for my users) the entire browser window
> flashes before my new content loads. Thoughts?
>
> 
> var content = new Array();
>
> $(document).ready(function(){
> content['default'] = $("#classifieds_quicksearch_content").html();
>
> // set mouse events
> $("#classifieds_quicksearch_nav li").mouseover(function(){
> // what tab am i on?
> var tab = this.id.split('_');
> var tab = tab[tab.length-1];
>
> // handle rollover graphics
> $(this).addClass("over");
> $("#classifieds_quicksearch_nav 
> li").not(this).removeClass("over");
>
> // erase current content and show default content ("loading"
> message)
> 
> $("#classifieds_quicksearch_content").html(content['default']);
>
> // handle content
> if(content[tab] == undefined){ // first time loading this 
> content
> $.post("/components/classifieds/"+tab+".htm", { }, 
> function(result)
> { loadedContentProcess(tab,result); });
> }else{ // content has been loaded already
> loadedContentProcess(tab,content[tab]);
> }
> });
>
> });
>
> function loadedContentProcess(tab,result){
> content[tab] = result;
> $("#classifieds_quicksearch_content").html(content[tab]);
> loadedContentJS(tab); // set javascript for dynamic form elements,
> etc..
>
> }
>
> function loadedContentJS(tab){
> // set js for content that was loaded ascynchronously
> ...}
>
> 



[jQuery] Re: dynamic creation of an button

2007-04-12 Thread Diego A.

I didn't know that, but I do have a related question if you don't
mind.

I prefer to use...
$('');
...instead of...
$('').attr({'id':'some-id', 'value': 'yes'});

It works fine, but so many people choose to use the second method.
Is there anything wrong with the way I do it?

On Apr 12, 10:30 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> Some of the attributes of a DOM object in IE are read-only.
>
> The "type" attribute is one of these and so cannot be assigned to AFTER the
> element is created.
>
> JK
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>
> Behalf Of spinnach
> Sent: Thursday, April 12, 2007 2:06 PM
> To: [EMAIL PROTECTED]
> Subject: [jQuery] dynamic creation of an button
>
> anybody knows why the following fails in ie, but works ok in firefox?
> $('').attr({'type': 'button', 'id':'some-id', 'value': 'yes'})
>
> when i remove the type hash attribute, it works:
> $('').attr({'id':'some-id', 'value': 'yes'});
>
> dennis.



[jQuery] jquery form plugin

2007-04-12 Thread Tom Shafer

I am trying to return html after the form has been processed. I get it
to work with plain text such as echo '{ message: " Thanks " }'; but
html doesnt seem to want to work.

Any thoughts?



[jQuery] Re: Defining of a function

2007-04-12 Thread Olaf Gleba



Am 12.04.2007 um 18:16 schrieb Mike Alsup:


The difference between a function declaration and a function
expression is when the actual "function object" gets created.  The
easiest way to think of it is that function declarations are always
available and function expressions are not available until they have
been evaluated.  [...]


Many thx to all responders!

I wondered if there's maybe some speed issue on that topic. But as  
far as i read about it now, its only a question at which point the  
function object is available.


Again, thx for figure this out.

--
Olaf Gleba






[jQuery] Re: Form Plugin Won't Work in IE

2007-04-12 Thread Diego A.

What you've said should work.
Do you have an URL I can look at?

On Apr 12, 8:51 pm, "AJ" <[EMAIL PROTECTED]> wrote:
> I've recently started using the form.js plugin (http://www.malsup.com/
> jquery/form/) and I like it a lot. Except, I can't seem to get it
> working right in IE (6 or 7).
>
> Here is my code:
>
> /* CODE ---
>
> function postloading() {
> // beforesubmit code goes here
> return true;}
>
> function postsuccess(data) {
> //success code goes here
> return true;}
>
> $(".replyform").submit(function() {
> $(this).ajaxSubmit({
> dataType: 'json',
> type: 'POST',
> beforeSubmit: postloading,
> success: postsuccess
> });
> return false;
> });
>
>  / CODE */
>
> This worked perfectly in Firefox from the beginning. I've tried it
> every way I can think of, and IE won't work. When the submit button is
> clicked, the 'beforeSubmit' runs, and the form does get submitted (ie,
> content is saved to the database, etc).
>
> It just appears the 'success' callback is not firing. I've tried
> simplifying it down to a simple alert('test'), but it just will not
> fire.
>
> Hoping someone has seen this sort of thing before. Thanks.



[jQuery] Re: Safari and the wrap() method.

2007-04-12 Thread Klaus Hartl


Remy Sharp schrieb:

Sorry - I should add the test:

The JS:

$(function() {
  $('#test').wrap('');
});

Then standard HTML with a P tag with the ID of 'test' and some dummy
content within it.


This test is not guaranteed to work because a  element cannot contain 
a block level element like a paragraph.


A reliable test would look like:

$(function() {
$('#test').wrap('');
});


-- klaus


[jQuery] Re: Anyone see anything wrong in this code?

2007-04-12 Thread Klaus Hartl


Jörn Zaefferer schrieb:


Rick Faircloth schrieb:

Commenting out the "blur" line does prevent IE from locking up.
(Why doesn't this happen in FF?), but then, of course, no validation 
occurs.


When I change "blur" to "keyup" everything seems to work fine.

What's up with that?  Keyup is fine, but I prefer to allow users a little
more
time to correct entries rather than hammering them with an error message
per keystroke, perhaps.

I did comment out the debug statement, too... forgot that would prevent
submission...
  
I thought that you could prevent any problems with validation on blur by 
disabling focusInvalid. Let me know if you find anything that may 
exaplain why its happening.


An interesting approach would be keyup with a timeout, like in the 
autocomplete plugin.




What about the change event?



-- Klaus


[jQuery] Re: dynamic creation of an button

2007-04-12 Thread spinnach


didn't know that, thanks..

dennis.

Jeffrey Kretz wrote:

Some of the attributes of a DOM object in IE are read-only.

The "type" attribute is one of these and so cannot be assigned to AFTER the
element is created.

JK

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of spinnach
Sent: Thursday, April 12, 2007 2:06 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] dynamic creation of an button


anybody knows why the following fails in ie, but works ok in firefox?
$('').attr({'type': 'button', 'id':'some-id', 'value': 'yes'})

when i remove the type hash attribute, it works:
$('').attr({'id':'some-id', 'value': 'yes'});

dennis.






[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Ralf S. Engelschall

On Thu, Apr 12, 2007, Jörn Zaefferer wrote:

>  Ralf S. Engelschall schrieb:
> > On Thu, Apr 12, 2007,  wrote:
> >
> >> I've found the nightly webkits behave nothing like the latest safari! xml
> >> handling is improved other things are broke! Not sure if the current
> >> safari
> >> source is available.
> >> [...]
> >>
> > It seems to be even worse: the WebKit SVN trunk is _extremely_ different
> > >from e.g. the WebKit SVN "releases/Apple/Tiger/Mac OS X Update 10.4.8/"
> > branch. _THERE_ I cannot find anything related to firing a "load" event
> > in the htmltokenizer.cpp source. So looks like although WebKit SVN trunk
> > would already support this, the WebKit version used in Safari is still
> > an older one which doesn't support it. Hmmm... then we have no luck with
> > the current Safari versions at all and would have to wait a few years
> > until things get better in the Apple area...
> >
>  I think Chris Domigan has done quite some stuff on that matter. He had a
>  components for loading other scripts, though I'm not sure if or how he fixed
>  the safari issue. I think you'd need to look for 'jspax'.

I guess you are talking about this piece of code:

http://www.jspax.org/package_src.js

Very good hint! Thanks. He does something really clever: he exploits the
fact that when you insert N 

[jQuery] Re: dynamic creation of an button

2007-04-12 Thread Jeffrey Kretz

Some of the attributes of a DOM object in IE are read-only.

The "type" attribute is one of these and so cannot be assigned to AFTER the
element is created.

JK

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of spinnach
Sent: Thursday, April 12, 2007 2:06 PM
To: [EMAIL PROTECTED]
Subject: [jQuery] dynamic creation of an button


anybody knows why the following fails in ie, but works ok in firefox?
$('').attr({'type': 'button', 'id':'some-id', 'value': 'yes'})

when i remove the type hash attribute, it works:
$('').attr({'id':'some-id', 'value': 'yes'});

dennis.



[jQuery] Re: How to load picture after picture

2007-04-12 Thread Jonathan Sharp

On 4/12/07, wyo <[EMAIL PROTECTED]> wrote:



Sorry, was to fast with posting, here are more questions.

On Apr 12, 12:25 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
>
> You could do that too... here's another option:
>
>  echo "";
>
That means only the first is added with PHP?



Yep, this is the only PHP.


   function showPhoto() {
>   this.src = this.$src;
>   $(this).show();
>}
>function hidePhoto() {
>   $(this).hide();
>   this.$src = this.src;
>   this.src = '';
>}
>
Sorry what does

 this.$src = this.src;
 this.src = '';



'this' is a reference to the IMG element and in JavaScript '$' is treated
like any other character so you can have a variable named $ (which is what
jQuery does). So the code just creates an attribute of the image to store
the URL to the photo temporarily and then removes the src to the image to
keep it from loading.


mean? I guess "$src" isn't PHP, is it? And does "this.src = '';"

remove the picture?



Nope, not PHP, it just removes the URL to load the picture from and stores
it as the $src attribute. It's the same as doing:
this.oldSrc = this.src;
this.src = ''; // Empty the src.

Cheers,
-js


[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Jörn Zaefferer


Ralf S. Engelschall schrieb:

On Thu, Apr 12, 2007,  wrote:

  

I've found the nightly webkits behave nothing like the latest safari! xml
handling is improved other things are broke! Not sure if the current safari
source is available.
[...]



It seems to be even worse: the WebKit SVN trunk is _extremely_ different
>from e.g. the WebKit SVN "releases/Apple/Tiger/Mac OS X Update 10.4.8/"
branch. _THERE_ I cannot find anything related to firing a "load" event
in the htmltokenizer.cpp source. So looks like although WebKit SVN trunk
would already support this, the WebKit version used in Safari is still
an older one which doesn't support it. Hmmm... then we have no luck with
the current Safari versions at all and would have to wait a few years
until things get better in the Apple area...
  
I think Chris Domigan has done quite some stuff on that matter. He had a 
components for loading other scripts, though I'm not sure if or how he 
fixed the safari issue. I think you'd need to look for 'jspax'.


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Autocomplte plugin status

2007-04-12 Thread Jörn Zaefferer


Klaus Hartl schrieb:
Jörn, thanks for this. One question: I once modified Dylan's 
autocomplete a bit, so that if the autocomplete list is shown, tabbing 
would tab through the list instead of to the next form element. Is it 
possible to take into account?


Have a look here: http://plazes.com/plazes and type something into the 
"Where" field.


I think I also modified the behavior for arrow up/down keys a bit...

Gonna take a look at your modified version.

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Autocomplte plugin status

2007-04-12 Thread Jörn Zaefferer


Stefan Kilp [sk-software] schrieb:
would it be possible, the autocomplete not only works at the end of the input, but also for all 
input between the separator ",".

so i can delete "lin" from "Berlin" an start autocomplete for "ber" again.
that would be very helpful if you notice that one of the selected items in a multiselect inputbox 
is wrong an you want to correct the input.
  

Added that to the todo list.
- if i type berl in multipe City field, autocomplete shows me three options Berlin, Berlin Center, 
Berln Heights. Wouldn't make it sence to automaticly highlight the first item. and then when 
pressing the key down key directly move to the second entry?
  
Should be activated when using the selectFirst option, that way you have 
a visual indicator to whats gonna happen.


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Anyone see anything wrong in this code?

2007-04-12 Thread Jörn Zaefferer


Rick Faircloth schrieb:

Commenting out the "blur" line does prevent IE from locking up.
(Why doesn't this happen in FF?), but then, of course, no validation occurs.

When I change "blur" to "keyup" everything seems to work fine.

What's up with that?  Keyup is fine, but I prefer to allow users a little
more
time to correct entries rather than hammering them with an error message
per keystroke, perhaps.

I did comment out the debug statement, too... forgot that would prevent
submission...
  
I thought that you could prevent any problems with validation on blur by 
disabling focusInvalid. Let me know if you find anything that may 
exaplain why its happening.


An interesting approach would be keyup with a timeout, like in the 
autocomplete plugin.


--
Jörn Zaefferer

http://bassistance.de



[jQuery] dynamic creation of an button

2007-04-12 Thread spinnach


anybody knows why the following fails in ie, but works ok in firefox?
$('').attr({'type': 'button', 'id':'some-id', 'value': 'yes'})

when i remove the type hash attribute, it works:
$('').attr({'id':'some-id', 'value': 'yes'});

dennis.


[jQuery] Re: can you do this with JQuery

2007-04-12 Thread Jörn Zaefferer


Klaus Hartl schrieb:


Alexandre Plennevaux schrieb:
Tweaking jqAccordion should be able to do this 


I think a while back John prototyped something similiar while they 
were trying to recreate a mootools menu with jQuery...

Yep, Stefan posted an example, too.

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Interface updates

2007-04-12 Thread Stefan Petre


Priest, James (NIH/NIEHS) [C] wrote:

-Original Message-
From: Stefan Petre [mailto:[EMAIL PROTECTED] 



  
Just wondering as to when Interface updates/fixes are going to be 
released.
I do release guys could  be very busy,  but little heads up 
  
would be 


appreciated.

--Kush

  

Currently we are working on Interface 2.




Stephan I asked this in another post but will there be any more 1.x
releases, esp. bug fixes? 


Just curious - I have a bug open and am just curious if it'll get fixed
in a future 1.x release or if you guys are just moving on to v2 (which
I'm looking forward to BTW!)

Thanks!
Jim

  
I would prefer to spend the little time I have on Interface 2. If this 
fix will help you a lot then

send me an E-mail with the bug and I will let you if I can fix it for you.

Stefan


[jQuery] Re: Interface updates

2007-04-12 Thread Priest, James \(NIH/NIEHS\) [C]

> -Original Message-
> From: Stefan Petre [mailto:[EMAIL PROTECTED] 

> > Just wondering as to when Interface updates/fixes are going to be 
> > released.
> > I do release guys could  be very busy,  but little heads up 
> would be 
> > appreciated.
> >
> > --Kush
> >
> Currently we are working on Interface 2.


Stephan I asked this in another post but will there be any more 1.x
releases, esp. bug fixes? 

Just curious - I have a bug open and am just curious if it'll get fixed
in a future 1.x release or if you guys are just moving on to v2 (which
I'm looking forward to BTW!)

Thanks!
Jim


[jQuery] Form Plugin Won't Work in IE

2007-04-12 Thread AJ

I've recently started using the form.js plugin (http://www.malsup.com/
jquery/form/) and I like it a lot. Except, I can't seem to get it
working right in IE (6 or 7).

Here is my code:

/* CODE ---

function postloading() {
// beforesubmit code goes here
return true;
}
function postsuccess(data) {
//success code goes here
return true;
}
$(".replyform").submit(function() {
$(this).ajaxSubmit({
dataType: 'json',
type: 'POST',
beforeSubmit: postloading,
success: postsuccess
});
return false;
});

 / CODE */

This worked perfectly in Firefox from the beginning. I've tried it
every way I can think of, and IE won't work. When the submit button is
clicked, the 'beforeSubmit' runs, and the form does get submitted (ie,
content is saved to the database, etc).

It just appears the 'success' callback is not firing. I've tried
simplifying it down to a simple alert('test'), but it just will not
fire.

Hoping someone has seen this sort of thing before. Thanks.



[jQuery] Re: Interface updates

2007-04-12 Thread Stefan Petre


Kush Murod wrote:


Hi,

Just wondering as to when Interface updates/fixes are going to be 
released.
I do release guys could  be very busy,  but little heads up would be 
appreciated.


--Kush


Currently we are working on Interface 2.

Stefan


[jQuery] Re: General discussion

2007-04-12 Thread Diego A.

I released a new version today, with some of the suggested features.

Thread:
http://groups.google.com/group/jquery-en/browse_frm/thread/bd44f68a7d3f318

Blog:
http://fyneworks.blogspot.com/2007/04/jquery-multiple-file-upload-plugin-v11.html

Documentation/download/demos:
http://www.fyneworks.com/jquery/multiple-file-upload/

On Apr 9, 7:37 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> The name says it all. Just thought somebody might find it useful.
> Please reply to this thread with suggestions, comments...
>
> http://www.fyneworks.com/jQuery/multiple-file-upload/
>
> --
> View this message in 
> context:http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
> Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Multiple File Upload Plugin - v1.1

2007-04-12 Thread Diego A.

Blog post:
http://fyneworks.blogspot.com/2007/04/jquery-multiple-file-upload-plugin-v11.html

Documentation/Download/Demos:
http://www.fyneworks.com/jquery/multiple-file-upload/

New features:
- Events
- File extension validation



[jQuery] Re: Flexible jCarousel

2007-04-12 Thread Klaus Hartl


Klaus Hartl schrieb:
Here's what I did - it's a hack and you could do better but it works for 
now and you get the picture:


I added a flexibleWidth option and than added the following lines to the 
init method:


// Mod - allow flexible width
if (priv.o.flexibleWidth)
jQuery(window).bind('resize', function() {
var jCarouselClip = jQuery(".jcarousel-clip", priv.scope);
var jCarouselClipAvailWidth = 
parseInt(jCarouselClip[0].parentNode.offsetWidth - 2 * 40);

jCarouselClip.css({ width: jCarouselClipAvailWidth });
jCarouselClip.find('li').css({ width: 
Math.ceil(jCarouselClipAvailWidth / priv.o.itemVisible) });
priv.dimension = i.offsetWidth + priv.margin(i, "marginLeft") + 
priv.margin(i, "marginRight");

priv.resize();
priv.animate(); // readjust left positioning
});

Would be cool if you could add that in a more proper way if you like 
that :-)


Scratch that "2 * 40", that is special to my project, just needed to get 
that in as fast as possible...:


var jCarouselClipAvailWidth = jCarouselClip[0].parentNode.offsetWidth;


-- Klaus


[jQuery] Re: Flexible jCarousel

2007-04-12 Thread Klaus Hartl


Klaus Hartl schrieb:


Jan Sorgalla schrieb:

Hi Klaus,


Hi jQuerians!

I was wondering if there is a mod for jCarousel out there, that allows
it to be flexible? I need the width of the list and its items to be
flexible (depending on the browser width).

I tried only a bit yet and tinkered with the windows resize event, to
adjust the width of .jcarousel-clip and the list elements, that works
fine, but the scroll amount needs to be adjusted as well and I think
changing that is not as easy...

Has somebody done that? If not, I'd like to request that feature,
respectively I will have to do that mod anyway... :-)


i disappeard from the list for a while because i had to sort some
things out. But i worked on a complete new version of jCarousel which
does exactly what you want. Its still in a alpha state but i've setup
an example page:

http://sorgalla.com/projects/jcarousel-preview/examples/static.html

There are a lot of api and configuration changes so just ask if
something isn't clear.

Jan


Hi Jan, thanks for the fast answer! Unfortunately the example is not 
what I need, I was unclear apparently.


What I need is to have a flexible carousel with a constant amount of 
items to be shown, for example 3.


So if the window gets bigger, the list items as well as the clipped 
element will get bigger (as if they had a width given in %), and the 
amount of px to scroll left/right has to as well then.




-- Klaus



Here's what I did - it's a hack and you could do better but it works for 
now and you get the picture:


I added a flexibleWidth option and than added the following lines to the 
init method:


// Mod - allow flexible width
if (priv.o.flexibleWidth)
jQuery(window).bind('resize', function() {
var jCarouselClip = jQuery(".jcarousel-clip", priv.scope);
var jCarouselClipAvailWidth = 
parseInt(jCarouselClip[0].parentNode.offsetWidth - 2 * 40);

jCarouselClip.css({ width: jCarouselClipAvailWidth });
jCarouselClip.find('li').css({ width: 
Math.ceil(jCarouselClipAvailWidth / priv.o.itemVisible) });
priv.dimension = i.offsetWidth + priv.margin(i, "marginLeft") + 
priv.margin(i, "marginRight");

priv.resize();
priv.animate(); // readjust left positioning
});

Would be cool if you could add that in a more proper way if you like 
that :-)



Cheers, Klaus






[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Ralf S. Engelschall

On Thu, Apr 12, 2007,  wrote:

> I've found the nightly webkits behave nothing like the latest safari! xml
> handling is improved other things are broke! Not sure if the current safari
> source is available.
> [...]

It seems to be even worse: the WebKit SVN trunk is _extremely_ different
from e.g. the WebKit SVN "releases/Apple/Tiger/Mac OS X Update 10.4.8/"
branch. _THERE_ I cannot find anything related to firing a "load" event
in the htmltokenizer.cpp source. So looks like although WebKit SVN trunk
would already support this, the WebKit version used in Safari is still
an older one which doesn't support it. Hmmm... then we have no luck with
the current Safari versions at all and would have to wait a few years
until things get better in the Apple area...

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com



[jQuery] Re: jQuery Powered Sites - More Sites Added.

2007-04-12 Thread geezer


heres mine..

http://www.potn.co.uk potn.co.uk 

lots of polishing and cleaning up to do on the jscript and css , but its up
and its working.

uses hacked about thickbox, validate, style tabs and lots of other bits and
bobs.

Simon
-- 
View this message in context: 
http://www.nabble.com/jQuery-Powered-Sites---More-Sites-Added.-tf3553368s15494.html#a9965497
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Flexible jCarousel

2007-04-12 Thread Klaus Hartl


Jan Sorgalla schrieb:

Hi Klaus,


Hi jQuerians!

I was wondering if there is a mod for jCarousel out there, that allows
it to be flexible? I need the width of the list and its items to be
flexible (depending on the browser width).

I tried only a bit yet and tinkered with the windows resize event, to
adjust the width of .jcarousel-clip and the list elements, that works
fine, but the scroll amount needs to be adjusted as well and I think
changing that is not as easy...

Has somebody done that? If not, I'd like to request that feature,
respectively I will have to do that mod anyway... :-)


i disappeard from the list for a while because i had to sort some
things out. But i worked on a complete new version of jCarousel which
does exactly what you want. Its still in a alpha state but i've setup
an example page:

http://sorgalla.com/projects/jcarousel-preview/examples/static.html

There are a lot of api and configuration changes so just ask if
something isn't clear.

Jan


Hi Jan, thanks for the fast answer! Unfortunately the example is not 
what I need, I was unclear apparently.


What I need is to have a flexible carousel with a constant amount of 
items to be shown, for example 3.


So if the window gets bigger, the list items as well as the clipped 
element will get bigger (as if they had a width given in %), and the 
amount of px to scroll left/right has to as well then.




-- Klaus



[jQuery] Programming Career

2007-04-12 Thread maria

Find Your Programming Job Vacancy and resources here -->
http://www.jobbankdata.com/job-programming.htm



[jQuery] Re: Tooltip tweak

2007-04-12 Thread Jörn Zaefferer


Scott Sauyet schrieb:
(This is addressed to Jörn, but everyone should please feel free to 
comment.)


Jörn,

I know you're probably quite busy with the autocomplete plugin, but if 
you have a minute, I'd like to suggest a tweak to your tooltip plugin. 
There is a not-yet documented option called bodyHandler(), which I'm 
finding quite useful, but which would be nicer still with a slight change.


[...]

Is there some good reason that I'm  missing not to supply these objects 
to the bodyHandler?
  
Thanks for your suggestions. I don't see any reason not to add that. 
Coming soon!


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Flexible jCarousel

2007-04-12 Thread Jan Sorgalla

Hi Klaus,

> Hi jQuerians!
>
> I was wondering if there is a mod for jCarousel out there, that allows
> it to be flexible? I need the width of the list and its items to be
> flexible (depending on the browser width).
>
> I tried only a bit yet and tinkered with the windows resize event, to
> adjust the width of .jcarousel-clip and the list elements, that works
> fine, but the scroll amount needs to be adjusted as well and I think
> changing that is not as easy...
>
> Has somebody done that? If not, I'd like to request that feature,
> respectively I will have to do that mod anyway... :-)

i disappeard from the list for a while because i had to sort some
things out. But i worked on a complete new version of jCarousel which
does exactly what you want. Its still in a alpha state but i've setup
an example page:

http://sorgalla.com/projects/jcarousel-preview/examples/static.html

There are a lot of api and configuration changes so just ask if
something isn't clear.

Jan



[jQuery] Re: How to add opacity to an element

2007-04-12 Thread Brandon Aaron


Just want to add that these methods also work.

$(element).css('opacity', '0.5');
$(element).css('opacity', 0.5);
$(element).css({opacity: '0.5'});
$(element).css({opacity: 0.5});

--
Brandon Aaron

On 4/12/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:


On Apr 12, 2007, at 1:09 PM, Jeffrey Kretz wrote:


I've successfully used:



$(element).css({opacity:0.5});



On IE6, IE7, FF1.5, FF2.0 and Opera9 (don't have access to Safari at this
time).

Same has worked on FF2 and Safari for me.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com








[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Ⓙⓐⓚⓔ

I've found the nightly webkits behave nothing like the latest safari! xml
handling is improved other things are broke! Not sure if the current safari
source is available.

On 4/12/07, Ralf S. Engelschall <[EMAIL PROTECTED]> wrote:



On Thu, Apr 12, 2007, Robert Wagner wrote:

>  jQuery XS AJAX Plugin Demo
>
>  output of script #1: i=14
>  output of script #2: j=49
>
>  1. start sequence
>  2. end sequence
>
>  line 2+3 are continuesly counting up after a short display: script x
loaded
>
>  safari 2.0.4 tiger ppc

Ok, then we have a problem as the "load" event doesn't fire in Safari.
Very interesting, as from my last reply you see that the source code
of WebKit seems to indicate that the "load" event should fire. Hmm...
does anybody have a clue what we can do to detect that Safari has
successfully loaded a dynamically generated 

[jQuery] Re: How to add opacity to an element

2007-04-12 Thread Karl Swedberg

On Apr 12, 2007, at 1:09 PM, Jeffrey Kretz wrote:

I’ve successfully used:



$(element).css({opacity:0.5});



On IE6, IE7, FF1.5, FF2.0 and Opera9 (don’t have access to Safari  
at this time).


Same has worked on FF2 and Safari for me.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com






[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Ralf S. Engelschall

On Thu, Apr 12, 2007, Robert Wagner wrote:

>  jQuery XS AJAX Plugin Demo
>
>  output of script #1: i=14
>  output of script #2: j=49
>
>  1. start sequence
>  2. end sequence
>
>  line 2+3 are continuesly counting up after a short display: script x loaded
>
>  safari 2.0.4 tiger ppc

Ok, then we have a problem as the "load" event doesn't fire in Safari.
Very interesting, as from my last reply you see that the source code
of WebKit seems to indicate that the "load" event should fire. Hmm...
does anybody have a clue what we can do to detect that Safari has
successfully loaded a dynamically generated 

[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Aaron Heimlich

I can also confirm the same results

MacOS 10.4.9 (PowerPC)
Safari 2.0.4 (419.3)

On 4/12/07, Robert Wagner <[EMAIL PROTECTED]> wrote:



i see:

jQuery XS AJAX Plugin Demo

output of script #1: i=14
output of script #2: j=49

1. start sequence
2. end sequence

line 2+3 are continuesly counting up after a short display: script x
loaded

safari 2.0.4 tiger ppc

cheers,
  robert

2007/4/12, Ralf S. Engelschall <[EMAIL PROTECTED]>:
>
> On Thu, Apr 12, 2007, Ralf S. Engelschall wrote:
>
> >
> > On Thu, Apr 12, 2007, Remy Sharp wrote:
> >
> > > [...]
> > > The reason it doesn't work in Safari is because the script element
> > > doesn't fire any events when the external library is loaded, and
hence
> > > listening for the onreadystatechange doesn't work.
> > > [...]
> >
> > I've checked the latest sources from WebKit SVN trunk now and it looks
> > WebKit actually emits a "load" event. So, in Safari a $(...).load(...)
> > should just work fine. At least I've removed the Safari related hack
> > I've taken over from jQuery core for now...
>
> Ok, I've looked deeper into the WebKit sources and the
> source WebKit/WebCore/html/HTMLTokenizer.cpp shows in
> the function HTMLTokenizer::notifyFinished() an explicit
> "EventTargetNodeCast(n.get())->dispatchHTMLEvent(loadEvent, false,
> false);" which seems to emit the "load" event for the 

[jQuery] Flexible jCarousel

2007-04-12 Thread Klaus Hartl


Hi jQuerians!

I was wondering if there is a mod for jCarousel out there, that allows 
it to be flexible? I need the width of the list and its items to be 
flexible (depending on the browser width).


I tried only a bit yet and tinkered with the windows resize event, to 
adjust the width of .jcarousel-clip and the list elements, that works 
fine, but the scroll amount needs to be adjusted as well and I think 
changing that is not as easy...


Has somebody done that? If not, I'd like to request that feature, 
respectively I will have to do that mod anyway... :-)



-- Klaus


[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Diego A.

I don't think I'll need to use this any time soon but I have seen a
few people trying to do this.
So thank you for sharing Ralf

On Apr 12, 2:53 pm, "Ralf S. Engelschall"  wrote:
> In case anybody is interested in it: for a project I'm currently working
> on I've today abstracted the 

[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Robert Wagner


i see:

jQuery XS AJAX Plugin Demo

output of script #1: i=14
output of script #2: j=49

1. start sequence
2. end sequence

line 2+3 are continuesly counting up after a short display: script x loaded

safari 2.0.4 tiger ppc

cheers,
 robert

2007/4/12, Ralf S. Engelschall <[EMAIL PROTECTED]>:


On Thu, Apr 12, 2007, Ralf S. Engelschall wrote:

>
> On Thu, Apr 12, 2007, Remy Sharp wrote:
>
> > [...]
> > The reason it doesn't work in Safari is because the script element
> > doesn't fire any events when the external library is loaded, and hence
> > listening for the onreadystatechange doesn't work.
> > [...]
>
> I've checked the latest sources from WebKit SVN trunk now and it looks
> WebKit actually emits a "load" event. So, in Safari a $(...).load(...)
> should just work fine. At least I've removed the Safari related hack
> I've taken over from jQuery core for now...

Ok, I've looked deeper into the WebKit sources and the
source WebKit/WebCore/html/HTMLTokenizer.cpp shows in
the function HTMLTokenizer::notifyFinished() an explicit
"EventTargetNodeCast(n.get())->dispatchHTMLEvent(loadEvent, false,
false);" which seems to emit the "load" event for the 

[jQuery] Re: How to add opacity to an element

2007-04-12 Thread Jeffrey Kretz
I've successfully used:

 

$(element).css({opacity:0.5});

 

On IE6, IE7, FF1.5, FF2.0 and Opera9 (don't have access to Safari at this
time).

 

JK

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Joan Piedra
Sent: Thursday, April 12, 2007 7:32 AM
To: [EMAIL PROTECTED]
Subject: [jQuery] How to add opacity to an element

 

Hey guys,

Is there a crossbrowser jquery way to add opacity to an element?
I've tried with .css('opacity','0.5') and .animate({opacity:0.5},).

Is there some documentation or workaround to achieve this? 
Regards

-- 
Joan Piedra || Frontend webdeveloper
http://joanpiedra.com/ 



[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Ralf S. Engelschall

On Thu, Apr 12, 2007, Ralf S. Engelschall wrote:

>
> On Thu, Apr 12, 2007, Remy Sharp wrote:
>
> > [...]
> > The reason it doesn't work in Safari is because the script element
> > doesn't fire any events when the external library is loaded, and hence
> > listening for the onreadystatechange doesn't work.
> > [...]
>
> I've checked the latest sources from WebKit SVN trunk now and it looks
> WebKit actually emits a "load" event. So, in Safari a $(...).load(...)
> should just work fine. At least I've removed the Safari related hack
> I've taken over from jQuery core for now...

Ok, I've looked deeper into the WebKit sources and the
source WebKit/WebCore/html/HTMLTokenizer.cpp shows in
the function HTMLTokenizer::notifyFinished() an explicit
"EventTargetNodeCast(n.get())->dispatchHTMLEvent(loadEvent, false,
false);" which seems to emit the "load" event for the 

[jQuery] Re: Check to see if a style exists

2007-04-12 Thread Jeffrey Kretz

This page from QuirksMode gives cross-platform compatibility data:

http://www.quirksmode.org/dom/w3c_css.html

JK

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Yansky
Sent: Thursday, April 12, 2007 3:18 AM
To: jQuery (English)
Subject: [jQuery] Re: Check to see if a style exists


You can access all the the CSS rules with the "styleSheets" &
"cssRules" DOM objects.

Check these pages for good examples:
http://developer.mozilla.org/en/docs/Gecko_DOM_Reference:Examples#Example_4:
_Using_Stylesheets
http://www.javascriptkit.com/dhtmltutors/externalcss2.shtml
http://cross-browser.com/x/lib/view.php?sym=xTraverseStyleSheet
http://cross-browser.com/x/lib/view.php?sym=xTraverseDocumentStyleSheets

I'm not 100% sure if IE supports these methods though.



On Apr 12, 4:33 pm, David <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is there way to check to see if a style class is declared within a
> document or css file related to the document? I'm building a plugin for
> our designer's internal use, with the goal of replacing the standard
> javascript dialogs with dialog boxes created with jqModal. I want to
> provide the designers with the flexibility to be able to style the
> dialog boxes to suit a site style but have a default style for the
> dialog if none is supplied.
>
> e.g.:
>
> if ( styles for #customConfirmDialog not declared in document/css ) {
> $("#customConfirmDialog").css({ ... });}
>
> $("#customConfirmDialog").show();
>
> I'm sure I've seen this question asked on the list before but I can't
> find it and can't think of a way to search for it that won't return a
> thousand results.
>
> Regards,
>
> David




[jQuery] Re: Defining of a function

2007-04-12 Thread Andy Matthews

That's a perfect write-up on this issue. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Klaus Hartl
Sent: Thursday, April 12, 2007 11:27 AM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: Defining of a function


Mike Alsup schrieb:
> 
> The difference between a function declaration and a function 
> expression is when the actual "function object" gets created.  The 
> easiest way to think of it is that function declarations are always 
> available and function expressions are not available until they have 
> been evaluated.  So you can do this:
> 
> x();
> function x() { alert('hi'); }
> 
> but not this:
> 
> x();
> var x = function() { alert('hi'); }
> 
> For details check out: 
> http://jibbering.com/faq/faq_notes/closures.html
> 
> Mike

Dustin blogged about this recently as well:

http://www.dustindiaz.com/javascript-function-declaration-ambiguity/



-- Klaus




[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Ralf S. Engelschall

On Thu, Apr 12, 2007, Remy Sharp wrote:

> [...]
> The reason it doesn't work in Safari is because the script element
> doesn't fire any events when the external library is loaded, and hence
> listening for the onreadystatechange doesn't work.
> [...]

I've checked the latest sources from WebKit SVN trunk now and it looks
WebKit actually emits a "load" event. So, in Safari a $(...).load(...)
should just work fine. At least I've removed the Safari related hack
I've taken over from jQuery core for now...

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com



[jQuery] Re: Defining of a function

2007-04-12 Thread Klaus Hartl


Mike Alsup schrieb:


The difference between a function declaration and a function
expression is when the actual "function object" gets created.  The
easiest way to think of it is that function declarations are always
available and function expressions are not available until they have
been evaluated.  So you can do this:

x();
function x() { alert('hi'); }

but not this:

x();
var x = function() { alert('hi'); }

For details check out: http://jibbering.com/faq/faq_notes/closures.html

Mike


Dustin blogged about this recently as well:

http://www.dustindiaz.com/javascript-function-declaration-ambiguity/



-- Klaus


[jQuery] Re: $(document.createElement("script")) vs. $("

2007-04-12 Thread Ralf S. Engelschall

On Thu, Apr 12, 2007, Karl Swedberg wrote:

> This mistake was just in your email, right?
>
> Have you tried something like this? ...
>
> $('').attr({'type': 'text/javascript', 'src': url}).appendTo
> ('head')
>
> Not terribly different, but I wonder if the closing  makes a
> difference. Just shooting in the dark here.

Yes, I've also tried this variant. I tried $('') and
$('