Re: [jQuery] 'jQuery not defined' errors. Possible jQuery bug? Plaintive cry for help.

2007-03-13 Thread Joel Birch
On 14/03/2007, at 6:21 PM, Joel Birch wrote:
> Hi jQuistadors!
>
> I am getting errors to the tune of the 'jQuery is not defined -
> jquery.1.1.2.js line 89' (but also sometimes lines 152, 153, 156,
> 690, 1813) on my Blush site when moving from page to page (never on
> manual reload).
>
> I have tried everything I can think of to narrow it down and the
> errors are generated when my Superfish menu (the 'over' and 'out'
> local functions) attaches functions to elements on hover. Makes no
> difference if the Superfish plugin is called on load or ready. As
> soon as the parser gets to $$.addClass() (or anything chained to $$
> which is equivalent to $(this) within the functions passed to hover),
> the errors occur. Also, if you do some 'crazy hovers' with the mouse
> between page loads you can generate more errors.
>
> I'm *begging* for help here as this is a crushing blow for me. Can
> anyone shed light on this or is this possibly a jQuery bug?
>
> http://www.blushtomatoes.com.au/about/
>
> Thanks in advance.
>
> Joel Birch.

The 'crazy hover' errors (possibly the others too I think) seem to be  
generated on $(window).unload() - which explains why they never  
happen on a manual refresh. Still no further clues though. :(

Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] 'jQuery not defined' errors. Possible jQuery bug? Plaintive cry for help.

2007-03-13 Thread Joel Birch
Hi jQuistadors!

I am getting errors to the tune of the 'jQuery is not defined -  
jquery.1.1.2.js line 89' (but also sometimes lines 152, 153, 156,  
690, 1813) on my Blush site when moving from page to page (never on  
manual reload).

I have tried everything I can think of to narrow it down and the  
errors are generated when my Superfish menu (the 'over' and 'out'  
local functions) attaches functions to elements on hover. Makes no  
difference if the Superfish plugin is called on load or ready. As  
soon as the parser gets to $$.addClass() (or anything chained to $$  
which is equivalent to $(this) within the functions passed to hover),  
the errors occur. Also, if you do some 'crazy hovers' with the mouse  
between page loads you can generate more errors.

I'm *begging* for help here as this is a crushing blow for me. Can  
anyone shed light on this or is this possibly a jQuery bug?

http://www.blushtomatoes.com.au/about/

Thanks in advance.

Joel Birch.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread Joel Birch
On 14/03/2007, at 4:38 PM, David wrote:
> Hi,
>
> I know that I used to have the same problem with the original  
> Suckerfish menu (ie. not the jQuery version). The workaround was to  
> set the 'wmode' to 'transparent' on the flash file.
>
> Regards,
>
> David

I second that workaround. I remember having to do that myself and it  
works great (except for the issue I described unique to Mac FF).

Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread David

Hi,

I know that I used to have the same problem with the original Suckerfish 
menu (ie. not the jQuery version). The workaround was to set the 'wmode' 
to 'transparent' on the flash file.


Regards,

David

Joel Birch wrote:
On 14/03/2007, at 5:18 AM, Nathan Young -X ((natyoung - Artizen at  
Cisco)) wrote:
  

Hi Joel.

In addition to the layer problem with form elements we've had problems
overlaying DHTML on top of flash movies, especially in firefox.  Is  
this

a scenario you've tested with?

>Nathan



Hi Nathan,

I have not tested for overlaying over Flash - that sounds like  
trouble! I know I once ran into an issue with Mac FF where Flash  
shows through elements that have opacity other than 1 (Thickbox  
overlay over Flash in my case). There is a thread somewhere on this  
list about that. It worked fine in all other browsers though - even IE.


Apart from that I'm not sure how it would go - specifically what sort  
of problems have you experienced?


Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: Thickbox Reloaded alpha

2007-03-13 Thread Joel Birch
On 14/03/2007, at 3:03 AM, Klaus Hartl wrote:
> Mark schrieb:
>> hows the development going?
>
> I'm sorry, I'm pretty busy at the moment and I'm stuck, but I gathered
> all the feedback and hope to get things further on the weekend... I  
> have
> already started to fix a few bugs in IE.
>
>
> -- Klaus

Anything we can do to lighten the load? I'm sure many of us will  
agree that this is one of the most exciting and important plugin  
projects at the moment.

Good luck with everything Klaus.

Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Powered Sites - Keep the Links Coming

2007-03-13 Thread Joel Birch
On 14/03/2007, at 2:23 AM, Rey Bango wrote:
> Thanks Joel,
>
> I've added the site. :o)
>
> Rey...
>
> Joel Birch wrote:
>> P.S. There is the Blush site I'd like you to add too - I think maybe
>> you missed my post on that one.

Thanks Rey! Any problem with the Blush site being added? See my post  
for info what jQuery is being used for - its used quite extensively.  
Further to that info though, a few recent updates means that it now  
uses:

- my contentMenu plugin (on the FAQ page),
- my new Superfish menu plugin (main navigation).

Here's the link one more time:
http://www.blushtomatoes.com.au/

Cheers!

O:-)

Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Append bug?

2007-03-13 Thread Daemach

It appears to fail on appending a select as well :/

$('').appendTo(tbl)

fails the same way :/



Karl Rudd wrote:
> 
> Looks like it could be a bug.
> 
> In the mean time use:
> 
> var t = $("#myTable")[0];
> t.innerHTML = "" + t.innerHTML;
> 
> Hmmm not sure this will work in IE.
> 
> Karl Rudd
> 
> On 3/14/07, Daemach <[EMAIL PROTECTED]> wrote:
>>
>> I'm not having any luck with the following 2 commands - is this a bug or
>> something I'm missing?  I've tried with  as well.
>>
>> $("#myTable").append("");
>>
>> $("").appendTo("#myTable");
>> --
>> View this message in context:
>> http://www.nabble.com/Append-bug--tf3400052.html#a9468060
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Append-bug--tf3400052.html#a9468749
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How can this be modifed to accept other types of input?

2007-03-13 Thread Aaron Heimlich

Forgot to demo my custom selector:

$("#myForm :userInput")

Selects all children of #myForm that either have a type of "text",
"password", "radio", "checkbox" or "file", are  elements, or are
 elements.

On 3/14/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote:



$("input:not(:submit):not(:reset):not(:button):not(:image):not(:hidden),select,textarea")

grabs all 's that are NOT of type "submit", "reset", "button",
"image" or "hidden", all 's and all 's.

You could also do


$("input:text,input:checkbox,input:password,input:radio,input:file,select,textarea")

but you'd be selecting the same group on 's five times instead once
like in the first example.

Both of those are pretty verbose, which is very unjQuery-like. But, one of
the really cool things about jQuery selectors is that you can add your own
custom selectors really easily, like so:

jQuery.expr[":"].userInput = "/text|password|radio|checkbox|file/i.test(
a.type) || /select|textarea/i.test(a.nodeName)";

Selectors are nothing more than a piece of JavaScript code that gets
eval'd by the selection engine. The variable "a" is the DOM node that jQuery
is currently examining.

Here's a list of all of the official selectors:

http://dev.jquery.com/browser/trunk/jquery/src/selector/selector.js

And some more custom selectors (though some of these have been merged into
the jQuery core)

http://www.softwareunity.com/sandbox/JQueryMoreSelectors/


On 3/13/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:
>
> Hi, all...
>
> How can this code be modified to accept others types
> of input besides "text"?  I need to be able to include input
> from selects, radio, and checkboxes...
>
> >   // select all inputs of type text
> >   $("input:text").each(function(){
> >   Params[$(this).attr("name")] = $(this).val();
> >   }); // closes input:text function
>
> Thanks,
>
> Rick
>
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>



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





--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How can this be modifed to accept other types of input?

2007-03-13 Thread Aaron Heimlich

$("input:not(:submit):not(:reset):not(:button):not(:image):not(:hidden),select,textarea")

grabs all 's that are NOT of type "submit", "reset", "button",
"image" or "hidden", all 's and all 's.

You could also do

$("input:text,input:checkbox,input:password,input:radio,input:file,select,textarea")

but you'd be selecting the same group on 's five times instead once
like in the first example.

Both of those are pretty verbose, which is very unjQuery-like. But, one of
the really cool things about jQuery selectors is that you can add your own
custom selectors really easily, like so:

jQuery.expr[":"].userInput = "/text|password|radio|checkbox|file/i.test(
a.type) || /select|textarea/i.test(a.nodeName)";

Selectors are nothing more than a piece of JavaScript code that gets eval'd
by the selection engine. The variable "a" is the DOM node that jQuery is
currently examining.

Here's a list of all of the official selectors:

http://dev.jquery.com/browser/trunk/jquery/src/selector/selector.js

And some more custom selectors (though some of these have been merged into
the jQuery core)

http://www.softwareunity.com/sandbox/JQueryMoreSelectors/


On 3/13/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:


Hi, all...

How can this code be modified to accept others types
of input besides "text"?  I need to be able to include input
from selects, radio, and checkboxes...

>   // select all inputs of type text
>   $("input:text").each(function(){
>   Params[$(this).attr("name")] = $(this).val();
>   }); // closes input:text function

Thanks,

Rick



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread Joel Birch
On 14/03/2007, at 5:18 AM, Nathan Young -X ((natyoung - Artizen at  
Cisco)) wrote:
> Hi Joel.
>
> In addition to the layer problem with form elements we've had problems
> overlaying DHTML on top of flash movies, especially in firefox.  Is  
> this
> a scenario you've tested with?
>
> >Nathan

Hi Nathan,

I have not tested for overlaying over Flash - that sounds like  
trouble! I know I once ran into an issue with Mac FF where Flash  
shows through elements that have opacity other than 1 (Thickbox  
overlay over Flash in my case). There is a thread somewhere on this  
list about that. It worked fine in all other browsers though - even IE.

Apart from that I'm not sure how it would go - specifically what sort  
of problems have you experienced?

Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rey Bango
Hi Rick,

Your Ajax calls via .post are working fine. You're just not displaying 
the return message. Both .post calls are returning text but the only one 
thats being displayed is the one specified here:

$("#Interest").blur(function(){...}

You'll need to either have two instances of:

$("#Result").empty().append(data);

or concatenate the data and then show it all at once.

Finally, you really need to get yourself an HTTP sniffer. Its going to 
make your life much easier. Whether its Firebug, Service Capture, 
Fiddler or something else, until you get one in place you're flying blind.

Hope this helps.

Rey



Rick Faircloth wrote:
> Hi, Rey...
> 
> Link... sure... this is a demo link.
> 
> http://bodaford.whitestonemedia.com/html/trial_field_validation.cfm
> 
> I think the problem I'm having now is with the js code as I try to expand
> from validating just the Principal field to both the Principal and the
> Interest fields.
> 
> The problem is probably in this code:
> 
>   $(function() {  //jQuery makes this run when the page is loaded and
> ready
>   
>   $("#Principal").blur(function(){ //assign a blur
> event to the input
>   
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {principal:$("#Principal").val()}, function(data){
>   
>   $("#Interest").blur(function(){
>   
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {interest:$("#Interest").val()}, function(data){
>   
>   // append what you get back to the element with ID =
> Result after clearing its contents
>   $("#Result").empty().append(data);
>   
>   }); // closes Interest function(data)
>   }); // closes Interest blur function
>   }); // closes post
>   }); // closes blur
>   }); // closes document.ready
> 
> Thanks,
> 
> Rick
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Rey Bango
> Sent: Tuesday, March 13, 2007 11:46 PM
> To: jQuery Discussion.
> Subject: Re: [jQuery] Ok... one last effort to make this work... help!
> 
> Rick, do you have a link that I can look at?
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Daemach

Learn it well - once you get this code working, go through every part of it
;) 

The problem on the jQuery side was the nesting.  When you assign a function
to an event, everything needed to handle just that event should be
encapsulated:

First, set blur for the Principal element.  Post posts the form field
"principal" in your code below so you should be looking for form.principal
on the other end.  The last part of the the post function is either an
anonymous function (function (){  }) or a function call without the () - in
this case, since it looked like you were trying to get both inputs to update
the same element, it makes sense to pass the results of each post back to a
common function.

Same deal on the interest calc - it's passing the form field "interest" back
to CF so you should be looking for form.interest if you need a different
validation style.  Once you get this going, open up firebug and look at the
console tab.  every time you blur one of those fields you can see the ajax
call.  open it and look at the response tab and make sure you're getting
what you expect - you did have a  which cf chokes on
(should be value is|eq principal)  You could be getting errors on the CF
side and you won't see them unless you're looking at the response.


$(document).ready(function(){

$("#Principal").blur(function(){ 

$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()}, handleCallback) });
 
$("#Interest").blur(function(){

$.post("callpage_Validate_Mortgage_Inputs.cfm",{interest:$("#Interest").val()},
handleCallback) });
});

function handleCallback(data) {
$("#Result").empty().append(data);
}   



Hope this helps...


Rick Faircloth wrote:
> 
> Thanks for the advice on Firebug and the debug code, Daemach.
> 
> I've been using it for a few days, but haven't learned it well.
> It has been good about notifying me of syntax errors, however!
> 
> Rick
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Daemach
> Sent: Tuesday, March 13, 2007 11:51 PM
> To: discuss@jquery.com
> Subject: Re: [jQuery] Ok... one last effort to make this work... help!
> 
> 
> I second that - if you're not using firebug, you should drop everything
> else
> until you get familiar with it (seriously).  Use console.log(),
> breakpoints,
> watches, and the net tab or console for debugging ajax calls.  You can see
> what data is going to and from the server on every call.
> 
> You should also add:
> 
> jQuery.fn.debug = function() {if (typeof window['console'] !==
> 'undefined'){console.log(this);}  return this;}  
> 
> to the bottom of your jquery.js file, or create a separate plugin file
> with
> just this code in it and load it after jquery.  Then you can insert it
> into
> jquery chains to see the results of selectors in the console. 
> $("p").debug().addClass(..).etc.
> 
> 
> 
> Rick Faircloth wrote:
>> 
>> Thanks, Paul... I'll start working on that!
>> 
>> Rick
>> 
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>> Behalf Of Paul
>> Sent: Tuesday, March 13, 2007 11:25 PM
>> To: 'jQuery Discussion.'
>> Subject: Re: [jQuery] Ok... one last effort to make this work... help!
>> 
>> Two broad suggestions: First, get familiar with Firebug; in addition to
>> just
>> js errors its messages will alert you to 404 errors (which you would have
>> caused by calling a file in the wrong folder) as well as 500 errors
>> (which
>> are the result of CF errors) and save you a lot of time wondering why
>> ajax
>> isn't working.  Second, poke through the tutorials on jquery.com, which
>> explain the basics and will turn you on to the possibilities.  
>> 
>> Now back to your question, assuming you're like me and develop in
>> iterations, I would simply start by copy/pasting the .blur() binding for
>> each field:
>> 
>> $("#Some-Field-ID").blur(function(){ //assign a blur event to the input
>> $.post("callpage_Validate_Mortgage_Inputs.cfm",
>> {some-variable-name:$("#Some-Field-ID ").val()}, function(data){
>> 
>> When I start by taking the easy way out like this, I typically begin to
>> see
>> how it works and realize along the way how to make it more tidy.
>> 
>> You'll also need to handle the POST variables that will be different on
>> the
>> CF side; assuming it existed in v 4.5, CF's structKeyExists(form,
>> "some-variable-name") function would do the trick.
>> 
>> And of course, the usual disclaimer: there are better ways to accomplish
>> this task (Jorn's plugin being one of them), but this will get you
>> started.
>> 
>> -pm
>> 
>> 
>> 
>> 
>> 
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Ok...-one-last-effort-to-make-this-work...-help%21-tf3
> 399722.h

Re: [jQuery] Append bug?

2007-03-13 Thread Karl Rudd
Looks like it could be a bug.

In the mean time use:

var t = $("#myTable")[0];
t.innerHTML = "" + t.innerHTML;

Hmmm not sure this will work in IE.

Karl Rudd

On 3/14/07, Daemach <[EMAIL PROTECTED]> wrote:
>
> I'm not having any luck with the following 2 commands - is this a bug or
> something I'm missing?  I've tried with  as well.
>
> $("#myTable").append("");
>
> $("").appendTo("#myTable");
> --
> View this message in context: 
> http://www.nabble.com/Append-bug--tf3400052.html#a9468060
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rick Faircloth
Thanks for the advice on Firebug and the debug code, Daemach.

I've been using it for a few days, but haven't learned it well.
It has been good about notifying me of syntax errors, however!

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Tuesday, March 13, 2007 11:51 PM
To: discuss@jquery.com
Subject: Re: [jQuery] Ok... one last effort to make this work... help!


I second that - if you're not using firebug, you should drop everything else
until you get familiar with it (seriously).  Use console.log(), breakpoints,
watches, and the net tab or console for debugging ajax calls.  You can see
what data is going to and from the server on every call.

You should also add:

jQuery.fn.debug = function() {if (typeof window['console'] !==
'undefined'){console.log(this);}  return this;}  

to the bottom of your jquery.js file, or create a separate plugin file with
just this code in it and load it after jquery.  Then you can insert it into
jquery chains to see the results of selectors in the console. 
$("p").debug().addClass(..).etc.



Rick Faircloth wrote:
> 
> Thanks, Paul... I'll start working on that!
> 
> Rick
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul
> Sent: Tuesday, March 13, 2007 11:25 PM
> To: 'jQuery Discussion.'
> Subject: Re: [jQuery] Ok... one last effort to make this work... help!
> 
> Two broad suggestions: First, get familiar with Firebug; in addition to
> just
> js errors its messages will alert you to 404 errors (which you would have
> caused by calling a file in the wrong folder) as well as 500 errors (which
> are the result of CF errors) and save you a lot of time wondering why ajax
> isn't working.  Second, poke through the tutorials on jquery.com, which
> explain the basics and will turn you on to the possibilities.  
> 
> Now back to your question, assuming you're like me and develop in
> iterations, I would simply start by copy/pasting the .blur() binding for
> each field:
> 
> $("#Some-Field-ID").blur(function(){ //assign a blur event to the input
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {some-variable-name:$("#Some-Field-ID ").val()}, function(data){
> 
> When I start by taking the easy way out like this, I typically begin to
> see
> how it works and realize along the way how to make it more tidy.
> 
> You'll also need to handle the POST variables that will be different on
> the
> CF side; assuming it existed in v 4.5, CF's structKeyExists(form,
> "some-variable-name") function would do the trick.
> 
> And of course, the usual disclaimer: there are better ways to accomplish
> this task (Jorn's plugin being one of them), but this will get you
> started.
> 
> -pm
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context:
http://www.nabble.com/Ok...-one-last-effort-to-make-this-work...-help%21-tf3
399722.html#a9468102
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rick Faircloth
Thanks for the advice on Firebug and the tutorials.  I'll definitely work
through them soon.

Here's what happening now...
I'm getting the Interest field to validate, but now the Principal field
entries
get no response... is the problem in this code?

$(function() {  //jQuery makes this run when the page is loaded and
ready

$("#Principal").blur(function(){ //assign a blur
event to the input

$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()}, function(data){

$("#Interest").blur(function(){

$.post("callpage_Validate_Mortgage_Inputs.cfm",
{interest:$("#Interest").val()}, function(data){

// append what you get back to the element with ID =
Result after clearing its contents
$("#Result").empty().append(data);

}); // closes Interest function(data)
}); // closes Interest blur function
}); // closes post
}); // closes blur
}); // closes document.ready

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Tuesday, March 13, 2007 11:25 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Ok... one last effort to make this work... help!

Two broad suggestions: First, get familiar with Firebug; in addition to just
js errors its messages will alert you to 404 errors (which you would have
caused by calling a file in the wrong folder) as well as 500 errors (which
are the result of CF errors) and save you a lot of time wondering why ajax
isn't working.  Second, poke through the tutorials on jquery.com, which
explain the basics and will turn you on to the possibilities.  

Now back to your question, assuming you're like me and develop in
iterations, I would simply start by copy/pasting the .blur() binding for
each field:

$("#Some-Field-ID").blur(function(){ //assign a blur event to the input
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{some-variable-name:$("#Some-Field-ID ").val()}, function(data){

When I start by taking the easy way out like this, I typically begin to see
how it works and realize along the way how to make it more tidy.

You'll also need to handle the POST variables that will be different on the
CF side; assuming it existed in v 4.5, CF's structKeyExists(form,
"some-variable-name") function would do the trick.

And of course, the usual disclaimer: there are better ways to accomplish
this task (Jorn's plugin being one of them), but this will get you started.

-pm





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rick Faircloth
Hi, Rey...

Link... sure... this is a demo link.

http://bodaford.whitestonemedia.com/html/trial_field_validation.cfm

I think the problem I'm having now is with the js code as I try to expand
from validating just the Principal field to both the Principal and the
Interest fields.

The problem is probably in this code:

$(function() {  //jQuery makes this run when the page is loaded and
ready

$("#Principal").blur(function(){ //assign a blur
event to the input

$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()}, function(data){

$("#Interest").blur(function(){

$.post("callpage_Validate_Mortgage_Inputs.cfm",
{interest:$("#Interest").val()}, function(data){

// append what you get back to the element with ID =
Result after clearing its contents
$("#Result").empty().append(data);

}); // closes Interest function(data)
}); // closes Interest blur function
}); // closes post
}); // closes blur
}); // closes document.ready

Thanks,

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Tuesday, March 13, 2007 11:46 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Ok... one last effort to make this work... help!

Rick, do you have a link that I can look at?





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Append bug?

2007-03-13 Thread Daemach

I'm not having any luck with the following 2 commands - is this a bug or
something I'm missing?  I've tried with  as well.

$("#myTable").append("");

$("").appendTo("#myTable");
-- 
View this message in context: 
http://www.nabble.com/Append-bug--tf3400052.html#a9468060
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Daemach

I second that - if you're not using firebug, you should drop everything else
until you get familiar with it (seriously).  Use console.log(), breakpoints,
watches, and the net tab or console for debugging ajax calls.  You can see
what data is going to and from the server on every call.

You should also add:

jQuery.fn.debug = function() {if (typeof window['console'] !==
'undefined'){console.log(this);}  return this;}  

to the bottom of your jquery.js file, or create a separate plugin file with
just this code in it and load it after jquery.  Then you can insert it into
jquery chains to see the results of selectors in the console. 
$("p").debug().addClass(..).etc.



Rick Faircloth wrote:
> 
> Thanks, Paul... I'll start working on that!
> 
> Rick
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul
> Sent: Tuesday, March 13, 2007 11:25 PM
> To: 'jQuery Discussion.'
> Subject: Re: [jQuery] Ok... one last effort to make this work... help!
> 
> Two broad suggestions: First, get familiar with Firebug; in addition to
> just
> js errors its messages will alert you to 404 errors (which you would have
> caused by calling a file in the wrong folder) as well as 500 errors (which
> are the result of CF errors) and save you a lot of time wondering why ajax
> isn't working.  Second, poke through the tutorials on jquery.com, which
> explain the basics and will turn you on to the possibilities.  
> 
> Now back to your question, assuming you're like me and develop in
> iterations, I would simply start by copy/pasting the .blur() binding for
> each field:
> 
> $("#Some-Field-ID").blur(function(){ //assign a blur event to the input
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {some-variable-name:$("#Some-Field-ID ").val()}, function(data){
> 
> When I start by taking the easy way out like this, I typically begin to
> see
> how it works and realize along the way how to make it more tidy.
> 
> You'll also need to handle the POST variables that will be different on
> the
> CF side; assuming it existed in v 4.5, CF's structKeyExists(form,
> "some-variable-name") function would do the trick.
> 
> And of course, the usual disclaimer: there are better ways to accomplish
> this task (Jorn's plugin being one of them), but this will get you
> started.
> 
> -pm
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ok...-one-last-effort-to-make-this-work...-help%21-tf3399722.html#a9468102
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rey Bango
Rick, do you have a link that I can look at?

Rick Faircloth wrote:
> Hi, all...
> 
> I've been tinkering with jQuery for about 3 weeks now and while
> I've made some progress and gotten some things to work, I'm
> stuck on validation and I've got to get it working so I can do something
> that makes money!
> 
> Anyway... here's what I've got.  If anyone could give me the advice I need
> to get this working I'd be very grateful...
> 
> I'm trying to run validation on each form field of a form on blur.  Right
> now
> I'm just working on one form field.
> 
> I've got my page with the validation code (trying to use $post) and my form.
> I've also set up my processing page (.cfm).  However, nothing seems to be
> happening with the processing.  The form just acts like a regular form.
> 
> Firebug isn't complaining of any js errors...
> 
> Here are the 3 parts involved:
> 
> jQuery:
> 
> 
> 
> 
> function ValidatePrincipal(){
> 
> var Params = {};
> 
> $("input:text").each(function(){
> Params[$(this).attr("name")] = $(this).val();
> });
> 
> // "post" the form.  The Params object mimics form fields
> $.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
> ['Principal'], function(data){
> // this is the processing function.
>
> // append what you get back to the element with ID = Result
> after clearing its contents
> $("#Result").empty().append(data);
>   
> } // closes post function
> ); // closes ( after .post 
> } // closes { after ValidatePrincipal()
>   
> 
> 
> 
> Form HTML:
> 
> 
> 
> 
> 
> 
> 
>   
>   
>   Result: 
>   
>   
>   
>   
>   
>   Principal:  Type="Text" Value="" Size="20" Class="TextInput01"
> onBlur="ValidatePrincipal">
>   
>   
>   
>   
>   
>   Interest:  Type="Text" Value="" Size="20" Class="TextInput01">
>   
>   
>   
>   
> 
> 
> 
> 
> 
> 
> 
> And finally, the .cfm processing code:
> 
> 
> 
> 
>  
> 
>IsNumeric(REReplace(Form.Principal, "[.$,]","","All"))>
> 
>   
> 
>   
>
>   
>
>   
>   
>Reset="Yes">#Principal_Error_Message#
>   
>   
>   
> 
> 
> Any hints why this is not working?
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] finding y position

2007-03-13 Thread rolfsf

perfect - thanks! 
(and looks so damn obvious too)


Karl Swedberg-2 wrote:
> 
> Sure thing. You can get at the separate offsets (top and left) like so:
> 
> $('#my-id').offset().top;
> $('#my-id').offset().left;
> 
> I hope that's what you were looking for. If not, let me know.
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> On Mar 13, 2007, at 10:53 PM, rolfsf wrote:
> 
>>
>> thanks Karl - I've looked through dimensions.js
>>
>> and being a newbie... I still don't understand how to use offset  
>> when I only
>> want one dimension (e.g. y position)
>>
>> a little hint, maybe, and I'll be on my way
>>
>>
>>
>> Karl Swedberg-2 wrote:
>>>
>>> Hi Rolf,
>>>
>>> By far the easiest way to do that is to use the Dimensions plugin. It
>>> is amazingly accurate, even taking into account borders, padding,
>>> overflow:scroll, etc.
>>>
>>> http://docs.jquery.com/Plugins
>>>
>>> The inline documentation is quite helpful as well.
>>>
>>> --Karl
>>> _
>>> Karl Swedberg
>>> www.englishrules.com
>>> www.learningjquery.com
>>>
>>>
>>>
>>> On Mar 13, 2007, at 8:46 PM, rolfsf wrote:
>>>

 I want to find the position of the top of a div (distance from  
 top of
 window), so I can calculate and set the height of another div. How
 can I get
 that? I'm a little confused as to how to use offset, which returns
 values
 for both x and y.

 Thanks!
 -- 
 View this message in context: http://www.nabble.com/finding-y-
 position-tf3399556.html#a9466593
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
>>>
>>>
>>> ___
>>> jQuery mailing list
>>> discuss@jquery.com
>>> http://jquery.com/discuss/
>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/finding-y- 
>> position-tf3399556.html#a9467686
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/finding-y-position-tf3399556.html#a9468049
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread Joel Birch
On 14/03/2007, at 1:35 PM, John W wrote:
> Nice update on the menu Joel. Its a lot smoother now in IE6.
>
> John

I'm pleased you like it. I didn't end up going with the changes to  
the plugin itself but instead demonstrated a way for the user to  
apply the bgiframe to the relevant events. Just incase you missed the  
other posts.

I'd love to see where you have used the Superfish plugin if that is  
possible? :D

Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rick Faircloth
Thanks, Paul... I'll start working on that!

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Tuesday, March 13, 2007 11:25 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Ok... one last effort to make this work... help!

Two broad suggestions: First, get familiar with Firebug; in addition to just
js errors its messages will alert you to 404 errors (which you would have
caused by calling a file in the wrong folder) as well as 500 errors (which
are the result of CF errors) and save you a lot of time wondering why ajax
isn't working.  Second, poke through the tutorials on jquery.com, which
explain the basics and will turn you on to the possibilities.  

Now back to your question, assuming you're like me and develop in
iterations, I would simply start by copy/pasting the .blur() binding for
each field:

$("#Some-Field-ID").blur(function(){ //assign a blur event to the input
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{some-variable-name:$("#Some-Field-ID ").val()}, function(data){

When I start by taking the easy way out like this, I typically begin to see
how it works and realize along the way how to make it more tidy.

You'll also need to handle the POST variables that will be different on the
CF side; assuming it existed in v 4.5, CF's structKeyExists(form,
"some-variable-name") function would do the trick.

And of course, the usual disclaimer: there are better ways to accomplish
this task (Jorn's plugin being one of them), but this will get you started.

-pm





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Paul
Two broad suggestions: First, get familiar with Firebug; in addition to just
js errors its messages will alert you to 404 errors (which you would have
caused by calling a file in the wrong folder) as well as 500 errors (which
are the result of CF errors) and save you a lot of time wondering why ajax
isn't working.  Second, poke through the tutorials on jquery.com, which
explain the basics and will turn you on to the possibilities.  

Now back to your question, assuming you're like me and develop in
iterations, I would simply start by copy/pasting the .blur() binding for
each field:

$("#Some-Field-ID").blur(function(){ //assign a blur event to the input
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{some-variable-name:$("#Some-Field-ID ").val()}, function(data){

When I start by taking the easy way out like this, I typically begin to see
how it works and realize along the way how to make it more tidy.

You'll also need to handle the POST variables that will be different on the
CF side; assuming it existed in v 4.5, CF's structKeyExists(form,
"some-variable-name") function would do the trick.

And of course, the usual disclaimer: there are better ways to accomplish
this task (Jorn's plugin being one of them), but this will get you started.

-pm

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Tuesday, March 13, 2007 7:38 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Ok... one last effort to make this work... help!

Yay!  It works!  Thanks, Paul!

Now that that's over... besides the code that your repaired in the
javascript, I found I had another issue that didn't show up until
after the code was repaired... I had the page I was calling
*IN THE WRONG FOLDER*!!   ARR!

How stupid...

Anyway... no I need to figure out how to modify the code
to get it to work for each form field.  There's a total of three
in this small Mortgage Calculation form.

You mentioned "abstracting" the code for more inputs... I assume
that would mean modifying these two lines of the javascript, right?

$("#Principal").blur(function(){ //assign a blur event to the input
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()}, function(data){

I really don't have any idea how to code that.  Would you care to offer
a little more assistance on that?  I would try first...I'm really not trying
to impose...
but I don't have a clue where to start.

I would have never figured out the syntax that you used in the javascript.
I guess that's probably the hardest of learning to use any language.

I had actually gotten validation with Jorn's plug-in to work well, but ran
into
limitations, and I figured I'd be better off trying to validate with a
language
I know better... CF.

Thanks so much for your help!

Rick



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] finding y position

2007-03-13 Thread Karl Swedberg

Sure thing. You can get at the separate offsets (top and left) like so:

$('#my-id').offset().top;
$('#my-id').offset().left;

I hope that's what you were looking for. If not, let me know.

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



On Mar 13, 2007, at 10:53 PM, rolfsf wrote:



thanks Karl - I've looked through dimensions.js

and being a newbie... I still don't understand how to use offset  
when I only

want one dimension (e.g. y position)

a little hint, maybe, and I'll be on my way



Karl Swedberg-2 wrote:


Hi Rolf,

By far the easiest way to do that is to use the Dimensions plugin. It
is amazingly accurate, even taking into account borders, padding,
overflow:scroll, etc.

http://docs.jquery.com/Plugins

The inline documentation is quite helpful as well.

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



On Mar 13, 2007, at 8:46 PM, rolfsf wrote:



I want to find the position of the top of a div (distance from  
top of

window), so I can calculate and set the height of another div. How
can I get
that? I'm a little confused as to how to use offset, which returns
values
for both x and y.

Thanks!
--
View this message in context: http://www.nabble.com/finding-y-
position-tf3399556.html#a9466593
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/




--
View this message in context: http://www.nabble.com/finding-y- 
position-tf3399556.html#a9467686

Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] finding y position

2007-03-13 Thread rolfsf

thanks Karl - I've looked through dimensions.js

and being a newbie... I still don't understand how to use offset when I only
want one dimension (e.g. y position)

a little hint, maybe, and I'll be on my way



Karl Swedberg-2 wrote:
> 
> Hi Rolf,
> 
> By far the easiest way to do that is to use the Dimensions plugin. It  
> is amazingly accurate, even taking into account borders, padding,  
> overflow:scroll, etc.
> 
> http://docs.jquery.com/Plugins
> 
> The inline documentation is quite helpful as well.
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> On Mar 13, 2007, at 8:46 PM, rolfsf wrote:
> 
>>
>> I want to find the position of the top of a div (distance from top of
>> window), so I can calculate and set the height of another div. How  
>> can I get
>> that? I'm a little confused as to how to use offset, which returns  
>> values
>> for both x and y.
>>
>> Thanks!
>> -- 
>> View this message in context: http://www.nabble.com/finding-y- 
>> position-tf3399556.html#a9466593
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/finding-y-position-tf3399556.html#a9467686
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rick Faircloth
Yay!  It works!  Thanks, Paul!

Now that that's over... besides the code that your repaired in the
javascript, I found I had another issue that didn't show up until
after the code was repaired... I had the page I was calling
*IN THE WRONG FOLDER*!!   ARR!

How stupid...

Anyway... no I need to figure out how to modify the code
to get it to work for each form field.  There's a total of three
in this small Mortgage Calculation form.

You mentioned "abstracting" the code for more inputs... I assume
that would mean modifying these two lines of the javascript, right?

$("#Principal").blur(function(){ //assign a blur event to the input
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()}, function(data){

I really don't have any idea how to code that.  Would you care to offer
a little more assistance on that?  I would try first...I'm really not trying
to impose...
but I don't have a clue where to start.

I would have never figured out the syntax that you used in the javascript.
I guess that's probably the hardest of learning to use any language.

I had actually gotten validation with Jorn's plug-in to work well, but ran
into
limitations, and I figured I'd be better off trying to validate with a
language
I know better... CF.

Thanks so much for your help!

Rick



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Tuesday, March 13, 2007 10:08 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Ok... one last effort to make this work... help!

Rick, with modifications below this works for me.  If you need to make it
more abstract (i.e., for more than one text input) you can start from here
and add a piece at a time--I always find it easier to debug using a
functioning version to start rather than starting from errors and working
backwards...

Hope it helps convince you to stick with jQuery -- after a short learning
curve it makes life SO much simpler!

paul






___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] finding y position

2007-03-13 Thread Karl Swedberg

Hi Rolf,

By far the easiest way to do that is to use the Dimensions plugin. It  
is amazingly accurate, even taking into account borders, padding,  
overflow:scroll, etc.


http://docs.jquery.com/Plugins

The inline documentation is quite helpful as well.

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



On Mar 13, 2007, at 8:46 PM, rolfsf wrote:



I want to find the position of the top of a div (distance from top of
window), so I can calculate and set the height of another div. How  
can I get
that? I'm a little confused as to how to use offset, which returns  
values

for both x and y.

Thanks!
--
View this message in context: http://www.nabble.com/finding-y- 
position-tf3399556.html#a9466593

Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread John W

Nice update on the menu Joel. Its a lot smoother now in IE6.

John
-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9467517
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Paul
Rick, with modifications below this works for me.  If you need to make it
more abstract (i.e., for more than one text input) you can start from here
and add a piece at a time--I always find it easier to debug using a
functioning version to start rather than starting from errors and working
backwards...

Hope it helps convince you to stick with jQuery -- after a short learning
curve it makes life SO much simpler!

paul


HTML doc:




Test bed


$(function() {  //jQuery makes this run when the page is
loaded and ready
$("#Principal").blur(function(){
//assign a blur event to the input
$.post("debug.cfm", {principal:
$("#Principal").val()}, function(data){
// append what you get back to the element with ID =
Result after clearing its contents
$("#Result").empty().append(data);
}); // closes post
}); // closes blur
}); // closes document.ready










Result: 





Principal: 





Interest: 












CFM Page:
 






 

 


#Principal_Error_Message#

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Tuesday, March 13, 2007 6:34 PM
To: 'jQuery Discussion.'
Subject: [jQuery] Ok... one last effort to make this work... help!

Hi, all...

I've been tinkering with jQuery for about 3 weeks now and while
I've made some progress and gotten some things to work, I'm
stuck on validation and I've got to get it working so I can do something
that makes money!

Anyway... here's what I've got.  If anyone could give me the advice I need
to get this working I'd be very grateful...

I'm trying to run validation on each form field of a form on blur.  Right
now
I'm just working on one form field.

I've got my page with the validation code (trying to use $post) and my form.
I've also set up my processing page (.cfm).  However, nothing seems to be
happening with the processing.  The form just acts like a regular form.

Firebug isn't complaining of any js errors...

Here are the 3 parts involved:

jQuery:




function ValidatePrincipal(){

var Params = {};

$("input:text").each(function(){
Params[$(this).attr("name")] = $(this).val();
});

// "post" the form.  The Params object mimics form fields
$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
['Principal'], function(data){
// this is the processing function.
 
// append what you get back to the element with ID = Result
after clearing its contents
$("#Result").empty().append(data);

} // closes post function
); // closes ( after .post 
} // closes { after ValidatePrincipal()




Form HTML:









Result: 





Principal: 





Interest: 











And finally, the .cfm processing code:




 






 

 


#Principal_Error_Message#





Any hints why this is not working?



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Ok... one last effort to make this work... help!

2007-03-13 Thread Rick Faircloth
Hi, all...

I've been tinkering with jQuery for about 3 weeks now and while
I've made some progress and gotten some things to work, I'm
stuck on validation and I've got to get it working so I can do something
that makes money!

Anyway... here's what I've got.  If anyone could give me the advice I need
to get this working I'd be very grateful...

I'm trying to run validation on each form field of a form on blur.  Right
now
I'm just working on one form field.

I've got my page with the validation code (trying to use $post) and my form.
I've also set up my processing page (.cfm).  However, nothing seems to be
happening with the processing.  The form just acts like a regular form.

Firebug isn't complaining of any js errors...

Here are the 3 parts involved:

jQuery:




function ValidatePrincipal(){

var Params = {};

$("input:text").each(function(){
Params[$(this).attr("name")] = $(this).val();
});

// "post" the form.  The Params object mimics form fields
$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
['Principal'], function(data){
// this is the processing function.
 
// append what you get back to the element with ID = Result
after clearing its contents
$("#Result").empty().append(data);

} // closes post function
); // closes ( after .post 
} // closes { after ValidatePrincipal()




Form HTML:









Result: 





Principal: 





Interest: 











And finally, the .cfm processing code:




 






 

 


#Principal_Error_Message#





Any hints why this is not working?



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Calling all CF'ers... et al...

2007-03-13 Thread Rick Faircloth
Yeah... CF 4.5 is getting ancient, but she's still kicking!

Your validation example looked good.  Wish I could replicate it.

Glad to hear you enjoyed your ride.  Not a golfer, myself.  (27 holes!)

It's easy to stay off your bike if it's in the shop...mine was in need of
a tune-up a few repairs.  That things got about 15,000 miles on it in the
last 6 years, so some things were getting pretty worn out.

Thanks for your help.  I haven't been able to get anything working, yet,
but I'm still pestering everyone!

Where are you located?

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Tuesday, March 13, 2007 8:36 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Calling all CF'ers... et al...

Wow, CF 4.5?  That's the version I learned on--you're really old school!
I'm not sure the best way to implement what json.cfc does without the
cfc--or even without user defined functions which came around in version
5.0--but you can look at it and maybe just pull the functionality you need
out of the cfc -- http://www.epiphantastic.com/cfjson/.  

I don't know about that submitHandler function--as I said I'm new to jQuery
and it doesn't look like what I've done in the past, but it may be another
route to consider...

My bike ride was great, thanks, as was 27 holes of golf today.  How is one
supposed to work during such beautiful spring weather?? 





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Inifinite loop in IE

2007-03-13 Thread David

 Hi Guys,

I've got a simple form with checkboxes. When someone checks the 'Other' 
checkbox, a new checkbox is appended to the end of the list, so the user 
can add as many "Other' fields as they like (code is below). I've 
created a function that binds the click function to the class of the 
'Other' checkboxes. After it has appened the new checkbox it then has to 
call itself to rebind the click function to the new checkbox. This is 
working great in FF, but in IE6 and IE7 I get an infinite loop and it 
keeps adding checkboxes until I stop the script.  Can anyone please 
point out my mistake here?




Test
http://www.sitesuite.com.au/affiliate/js/jquery/jquery.js"; 
type="text/javascript">


var othercnt = 1;

function initOther() {
 $(".otherfield").unbind("click").click(function() {
   if ($(this)[0].checked == true) {
 othercnt++;
$(this).parent().parent().append('
Other: type=text name="validation_level" value="" class="input othertext">
');
   }
   else
   {
 $(this).next(".othertext").val('');
 var lastcount = othercnt;
 var lastdiv = "#other_" + lastcount;
 var lastfield = lastdiv + " .otherfield";
 if ($(lastfield).checked != true) {
   $(lastdiv).remove();
   othercnt--;
 }
   }
initOther(); // re-initialise click function on new checkbox - THIS IS THE PROBLEM
 });
}

$(function(){
 initOther();
});





   
   Validation Levels
   
   
   
   
   
   
   
   
   name=validation_level value="Basic">Basic
   name=validation_level value="Standard">Standard
   class="otherfield"> Other: value="" class="input othertext">

   
   
   
   
   
   
   



Regards,

David
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] finding y position


I want to find the position of the top of a div (distance from top of
window), so I can calculate and set the height of another div. How can I get
that? I'm a little confused as to how to use offset, which returns values
for both x and y.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/finding-y-position-tf3399556.html#a9466593
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Calling all CF'ers... et al...

Wow, CF 4.5?  That's the version I learned on--you're really old school!
I'm not sure the best way to implement what json.cfc does without the
cfc--or even without user defined functions which came around in version
5.0--but you can look at it and maybe just pull the functionality you need
out of the cfc -- http://www.epiphantastic.com/cfjson/.  

I don't know about that submitHandler function--as I said I'm new to jQuery
and it doesn't look like what I've done in the past, but it may be another
route to consider...

My bike ride was great, thanks, as was 27 holes of golf today.  How is one
supposed to work during such beautiful spring weather?? 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Tuesday, March 13, 2007 10:00 AM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Calling all CF'ers... et al...

Hi, Paul...

Enjoy your ride yesterday?

Thanks for the example code... it's beginning to make some sense
as I study it.

However, there one key sticking point... I'm using CF 4.5, so I don't
use .cfc's that you asked about when your referenced
#json.encode(st)#
and the json.cfc.

Is there another method to pass the result back to the calling page?

Can I use the same method I used in my previous attempt at validation
the "submitHandler" function? (I guess that's what was responsible for
sending
the data to and from my MortgageCalucation.cfm page...)

Here's that function...

submitHandler:function(){

varParams={};
$("input:text").each(function(){
Params[$(this).attr("name")]=$(this).val();
})

$.post("Mortgage_Calculation.cfm",Params,function(data){
$("#Result").empty().append(data);
})

}


Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Monday, March 12, 2007 11:26 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Calling all CF'ers... et al...

Okay as promised Will, here's what I do.  It's most certainly not the most
efficient method, since it's my first go 'round, but it does what I ask it
to.  I've added a few comments inline for you.  (After pasting in here I
can't even tell what's going on--and I wrote it!  Paste this into your
editor to get a clearer view...) 

A) Here is a snippet of the original html.  It simply presents a
field/label.


Ship-to location:  
  


B) Here is the jQuery bit that binds a behavior to the blur event.  In my
case this comes from a Taconite response, but I think you'd need it in your
document.ready() function for testing.  

$("#shipto_location input").blur(function (){
/* when the input within #shipto_location loses focus, pass the name
of the input and the value of the customer name input to be validated */
validateField('shipto_location',$("#customer_name input").val());
});

C) As posted before, here is the validateField function called by part B
above.

function validateField(field, criteria){
/* change the src of the row's icon (in this example,
#shipto_location img.ico) to the loading spinny */
$("#"+field+"
img.ico").attr("src","/images/office/ico-loading.gif");
/* pass the name of the field to validate, the value of said field,
and the value of an optional criteria (in this case, $("#customer_name
input").val()) */
$.get("/gateway/validate.cfm?field="+field+"&value="+$("#"+field+"
input").val()+"&criteria="+criteria,
function(response){
/* evaluate the json response */
response = eval("("+response+")");
/* display the appropriate icon; showIcon
can be called after either ajax or local validation */
showIcon(field,response.pass,response.msg);
}); 
}

D) Here's the relevant snippet from validate.cfm:




select s.shipto_id
from  shipto_locations as s inner join
  customers as c on s.customer_id = c.customer_id
where (s.shipto = ) and
(c.customer = )








...

#json.encode(st)#





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)


I think some snippets could be simplified, shouldnt they?

I'm kind of newbie on js, but i would do this:

IsNumeric: function(s){
   isNaN(s) ? false : true
},


IOr like this, function(s){ return !isNaN(s) }

2007/3/13, Karl Rudd <[EMAIL PROTECTED]>:


The ! operator does a "binary invert", returning either "true" or "false".
So:

true == !false
false == !true

So:

false == !!false
true == !!true

Combine that with what JavaScript considers "false" and you end up
with something like this:

// Test to see whether something is "null" or 0 (zero) or
"undefined" or "false"
var something = doSomething();
if ( !something )
  doSomethingElse();

Anything that is NOT "null" or 0 (zero) or "undefined" or "false", is
considered "true".

Going back to the "!!s[k]". The problem is that the value of s[k]
might not be a boolean "true" or "false", so we need to convert it to
one.

So we "!" it first and that converts it to a boolean, though if it was
a "true" value it's now "false", and vice-versa. So we "!" it again
and it comes out the "correct" way.

Karl Rudd

On 3/14/07, Daemach <[EMAIL PROTECTED]> wrote:
>
> What does the !! do?
>
>
> Dan G. Switzer, II wrote:
> >
> >>Please add:
> >>
> >>  StructKeyExists: function(s,k){
> >>  for(var n in s){
> >>  if (n == k) return true;
> >>  }
> >>  return false;
> >>  },
> >>
> >>
> >>Shall we post additions and updates here?
> >
> > This would be much more efficient:
> >
> > StructKeyExists: function(s,k){
> >   return !!s[k];
> > },
> >
> > However, it's also important to remember that a ColdFusion "structure"
> > isn't
> > the exact same thing as a JavaScript Object.
> >
> > -Dan
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/NEW-Plug-in%3A-cfjs-%28ColdFusionJavaScript%29-tf3386950.html#a9465975
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Rafael Santos Sá :: webdeveloper
www.rafael-santos.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)


Ahh that makes sense.  Thanks for taking the time :)



Karl Rudd wrote:
> 
> The ! operator does a "binary invert", returning either "true" or "false".
> So:
> 
> true == !false
> false == !true
> 
> So:
> 
> false == !!false
> true == !!true
> 
> Combine that with what JavaScript considers "false" and you end up
> with something like this:
> 
> // Test to see whether something is "null" or 0 (zero) or
> "undefined" or "false"
> var something = doSomething();
> if ( !something )
>   doSomethingElse();
> 
> Anything that is NOT "null" or 0 (zero) or "undefined" or "false", is
> considered "true".
> 
> Going back to the "!!s[k]". The problem is that the value of s[k]
> might not be a boolean "true" or "false", so we need to convert it to
> one.
> 
> So we "!" it first and that converts it to a boolean, though if it was
> a "true" value it's now "false", and vice-versa. So we "!" it again
> and it comes out the "correct" way.
> 
> Karl Rudd
> 
> On 3/14/07, Daemach <[EMAIL PROTECTED]> wrote:
>>
>> What does the !! do?
>>
>>
>> Dan G. Switzer, II wrote:
>> >
>> >>Please add:
>> >>
>> >>  StructKeyExists: function(s,k){
>> >>  for(var n in s){
>> >>  if (n == k) return true;
>> >>  }
>> >>  return false;
>> >>  },
>> >>
>> >>
>> >>Shall we post additions and updates here?
>> >
>> > This would be much more efficient:
>> >
>> > StructKeyExists: function(s,k){
>> >   return !!s[k];
>> > },
>> >
>> > However, it's also important to remember that a ColdFusion "structure"
>> > isn't
>> > the exact same thing as a JavaScript Object.
>> >
>> > -Dan
>> >
>> >
>> > ___
>> > jQuery mailing list
>> > discuss@jquery.com
>> > http://jquery.com/discuss/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/NEW-Plug-in%3A-cfjs-%28ColdFusionJavaScript%29-tf3386950.html#a9465975
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/NEW-Plug-in%3A-cfjs-%28ColdFusionJavaScript%29-tf3386950.html#a9466307
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

The ! operator does a "binary invert", returning either "true" or "false". So:

true == !false
false == !true

So:

false == !!false
true == !!true

Combine that with what JavaScript considers "false" and you end up
with something like this:

// Test to see whether something is "null" or 0 (zero) or
"undefined" or "false"
var something = doSomething();
if ( !something )
  doSomethingElse();

Anything that is NOT "null" or 0 (zero) or "undefined" or "false", is
considered "true".

Going back to the "!!s[k]". The problem is that the value of s[k]
might not be a boolean "true" or "false", so we need to convert it to
one.

So we "!" it first and that converts it to a boolean, though if it was
a "true" value it's now "false", and vice-versa. So we "!" it again
and it comes out the "correct" way.

Karl Rudd

On 3/14/07, Daemach <[EMAIL PROTECTED]> wrote:
>
> What does the !! do?
>
>
> Dan G. Switzer, II wrote:
> >
> >>Please add:
> >>
> >>  StructKeyExists: function(s,k){
> >>  for(var n in s){
> >>  if (n == k) return true;
> >>  }
> >>  return false;
> >>  },
> >>
> >>
> >>Shall we post additions and updates here?
> >
> > This would be much more efficient:
> >
> > StructKeyExists: function(s,k){
> >   return !!s[k];
> > },
> >
> > However, it's also important to remember that a ColdFusion "structure"
> > isn't
> > the exact same thing as a JavaScript Object.
> >
> > -Dan
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/NEW-Plug-in%3A-cfjs-%28ColdFusionJavaScript%29-tf3386950.html#a9465975
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Need to validate single form field...

Rick,

Sorry, I should have been more specific.

Instead of:
$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
function(data){ etc...

You want:
$.post("callpage_Validate_Mortgage_Inputs.cfm", Params['Principal'],
function(data){ etc...

And change the other thing back to
Params[$(this).attr("name")] = $(this).val();

-- Josh




- Original Message - 
From: "Rick Faircloth" <[EMAIL PROTECTED]>
To: "'jQuery Discussion.'" 
Sent: Tuesday, March 13, 2007 5:00 PM
Subject: Re: [jQuery] Need to validate single form field...


> Thanks for the reply, Josh...
> 
> So... does this look like it would be correct?
> 
>function ValidatePrincipal(){
> 
>var Params = {};
> 
>$("input:text").each(function(){
>Params['Principal'] = $(this).val();
>});
> 
>// "post" the form.  The Params object mimics form fields
>$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
> function(data){
>// this is the processing function.
> 
>// append what you get back to the element with ID = Result
> after clearing its contents
>$("#Result").empty().append(data);
> 
>} // closes post function
>); // closes ( after .post 
>} // closes { after ValidatePrincipal()
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Josh Nathanson
> Sent: Tuesday, March 13, 2007 6:42 PM
> To: jQuery Discussion.
> Subject: Re: [jQuery] Need to validate single form field...
> 
> Rick I think that would be
> 
> Params['Principal']
> 
> instead of Params.  
> 
> -- Josh
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
To: 'jQuery Discussion.'
Subject: Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

However, it's also important to remember that a ColdFusion "structure"
isn't
the exact same thing as a JavaScript Object.

-Dan

-

Gawd I miss Structs...

-ALEX

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] I made an online jukebox in jQuery

Nice work... I didn't see any large lag myself so I can't help there... I would 
suggest binding the shift+enter to the body rather then the filter box as a 
user might scroll up and down the list to see the results before deciding to 
check em all or check a few individually...

Minor points, just thought I'd mention :)

-ALEX

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jökull
Sent: Tuesday, March 13, 2007 4:08 PM
To: discuss@jquery.com
Subject: [jQuery] I made an online jukebox in jQuery


http://lab.audunsson.info/jukebox/

This will be deployed on a python music database in the future - at the
moment nothing works besides the client code.

This is my first real go at Javascript and jQuery. Read the quick-pool
instructions to see it at work. I've used jQuery plugins for the hard work.

The code is very slow and I'm probably doing something very silly. Please
let me know if you see any chance at making it faster.
-- 
View this message in context: 
http://www.nabble.com/I-made-an-online-jukebox-in-jQuery-tf3399206.html#a9465371
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

'!!' double negates the object thus converting it to a boolean.

-blair

Daemach wrote:
> What does the !! do?
>
>
> Dan G. Switzer, II wrote:
>>> Please add:
>>>
>>> StructKeyExists: function(s,k){
>>> for(var n in s){
>>> if (n == k) return true;
>>> }
>>> return false;
>>> },
>>>
>>>
>>> Shall we post additions and updates here?
>> This would be much more efficient:
>>
>> StructKeyExists: function(s,k){
>>  return !!s[k];
>> },
>>
>> However, it's also important to remember that a ColdFusion "structure"
>> isn't
>> the exact same thing as a JavaScript Object.
>>
>> -Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Need to validate single form field...

Thanks for the reply, Josh...

So... does this look like it would be correct?

function ValidatePrincipal(){

var Params = {};

$("input:text").each(function(){
Params['Principal'] = $(this).val();
});

// "post" the form.  The Params object mimics form fields
$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
function(data){
// this is the processing function.
 
// append what you get back to the element with ID = Result
after clearing its contents
$("#Result").empty().append(data);

} // closes post function
); // closes ( after .post 
} // closes { after ValidatePrincipal()



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Tuesday, March 13, 2007 6:42 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Need to validate single form field...

Rick I think that would be

Params['Principal']

instead of Params.  

-- Josh





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


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

This is a great plugin, very nice.

I recommend that you make the arguments something like this:

either:
.hoverIntent( overFn, outFn )

or:
.hoverIntent({
  sensitivity: 4,
  interval: 100,
  over: overFn,
  out: outFn
});

Which you could then implement like this:

function( on, off ) {
  var options = jQuery.extend({ sensitivity: 4, interval: 100 },
  off ? { on: on, off: off } : on );
  ...
}

--John

On 3/13/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> Very nice. I believe this will be getting a fair amount of usage!
>
> > - ability to override default settings (sensitivity, polling interval, etc)
> This would be great and probably should be done by passing an options
> hash as the third argument. Usually options as passed as the first
> argument in plugins but it makes sense to be the third in this case.
>
> I would imagine it looking something like this:
>
> jQuery.fn.hoverIntent = function(f,g,o) {
> o = jQuery.extend({ sensitivity: 4, interval: 100 }, o || {});
> ...
> };
>
>
> > - make it more jQuery $-friendly (first few attempts have failed)
> As already mentioned by Klaus, you can force block scope by wraping
> your code in the following self calling function.
>
> (function($) {
> ...
> })(jQuery);
>
> --
> Brandon Aaron
>
> On 3/13/07, Brian Cherne <[EMAIL PROTECTED]> wrote:
> > WHAT?
> > hoverIntent is a function that attempts to determine the user's intent...
> > like a crystal ball, only with mouse movement! It works like (and was
> > derived from) jQuery's built-in hover. However, instead of immediately
> > calling the onMouseOver function, it waits until the user's mouse slows down
> > enough before calling the function.
> >
> > WHERE?
> > My sorely out-dated web site.
> >  > >
> >
> > WHY?
> > To delay or prevent the accidental firing of animations or ajax calls.
> > Simple timers work for small areas, but if your target area is large it may
> > execute regardless of intent. Also, because jQuery animations cannot be
> > stopped once they've started it's best not to start them prematurely. ...
> > and I wanted something that was easy to swap in/out with hover (so
> > hoverIntent returns the same "this" and event objects as hover).
> >
> > WHAT'S NEXT?
> > Your feedback! Tear it shreds! Tell me what you think. I would like to keep
> > the script as small as possible, but if I could make this more useful (and
> > more likely to be used) I'm happy to make some enhancements... like...
> > - more compelling/verbose demo/documentation
> > - ability to override default settings (sensitivity, polling interval, etc)
> > - option of a simple onMouseOut timer
> > - make it more jQuery $-friendly (first few attempts have failed)
> > - suggestions for code style/commenting/optimization
> >
> >
> > Thanks in advance,
> > Brian.
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> >
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)


What does the !! do?


Dan G. Switzer, II wrote:
> 
>>Please add:
>>
>>  StructKeyExists: function(s,k){
>>  for(var n in s){
>>  if (n == k) return true;
>>  }
>>  return false;
>>  },
>>
>>
>>Shall we post additions and updates here?
> 
> This would be much more efficient:
> 
> StructKeyExists: function(s,k){
>   return !!s[k];
> },
> 
> However, it's also important to remember that a ColdFusion "structure"
> isn't
> the exact same thing as a JavaScript Object.
> 
> -Dan
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/NEW-Plug-in%3A-cfjs-%28ColdFusionJavaScript%29-tf3386950.html#a9465975
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

>Please add:
>
>   StructKeyExists: function(s,k){
>   for(var n in s){
>   if (n == k) return true;
>   }
>   return false;
>   },
>
>
>Shall we post additions and updates here?

This would be much more efficient:

StructKeyExists: function(s,k){
return !!s[k];
},

However, it's also important to remember that a ColdFusion "structure" isn't
the exact same thing as a JavaScript Object.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: The treemap plugin

Renato Formato schrieb:
> Jörn Zaefferer ha scritto:
>   
>> I like that. Dunno yet what I'd need that for, but I'll keep it in mind. 
>> Could you please add the link to the plugin list in the wiki and provide 
>> demo links at the top of your plugin site? Thanks.
>>
>> 
> Other than the Alexandre suggestion (in fact treemaps have been already 
> used instead of tag clouds but, as far as I know, never with a 
> javascript implementation), you can unobtrusively show statistics, even 
> hierarchically
>
> Ex: How many jQuery files have been downloaded for each version?
> You can have a table with the data and, optionally, show a treemap with 
> a hierarchical treemap for each major, minor and bugfix release. We have 
> done the same thing with SPIP. 
> (http://trac.rezo.net/trac/spip-zone/browser/_dev_/top10/stats.html)
>   
Nice.

Though my stupid point was: I don't have a particular project where I 
currently need just that. Of course it helps to know what those projects 
should look like to need it :-)

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


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

Brandon Aaron schrieb:
> I thought about this approach as well but then you gotta think that
> this is a plugin that others will use and possibly other plugins might
> depend on it as well. Then if the defaults changed, the plugin that
> depends on it could be confused and break. It is easy enough for a
> devloper to setup their own set of defaults that would not cause an
> issue like this.
>
> var myHoverDefaults = { interval: 250 };
>
> Now just pass that in and your set and don't potentially break any
> other plugins.
>
> As an example ... I'm updating my bgiframe plugin to accept an options
> hash. If I allowed a developer/plugin to change the defaults then all
> the plugins that depend on the defaults would then break.
>
> Hopefully that all made sense ... I'm writing it in a bit of a rush.
>   
Err, maybe, maybe not. Either way, I had a big mistake in my code 
example. Corrected:

jQuery.fn.hoverIntent = function (on,off,options) {
   var settings = jQuery.extend({}, jQuery.hoverIntent.defaults, options);
   ...
};
jQuery.hoverIntent = {};
jQuery.extend(jQuery.hoverIntent, {
defaults: { sensitivity: 4, interval: 100 },
setDefaults: function(settings) {
jQuery.extend(jQuery.hoverIntent.defaults, settings);
 }
});

I hope that makes more sense.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ajax- demo

This is usually done by dynamically inserting a script element. The
script element doesn't have to be from the same domain.

Have a look at the following threads from this list on Nabble.

http://www.nabble.com/Remote-Scripts-tf3033153.html#a8427636
http://www.nabble.com/Dynamically-loading-scripts-tf1913101.html#a5237431

Karl Rudd

On 3/14/07, bruce <[EMAIL PROTECTED]> wrote:
> Hi Renato..
>
> The app I'm considering can't use a proxy server on the 'current' domain.
> The issue I'm trying to solve is similar to the 'passport' app from
> microsoft awhile ago.
>
> I'm considering how to allow a central app/process act as a login/validation
> server, allowing other sites to verify that a user is who/what he claims to
> be.
>
> For this to work, I'm envisioning that there has to be a way for a a client
> site, to be able to interface/communicate with a central server/service...
>
> Thoughts/comments on how to accomodate this.
>
> I was also under the impression that widgets on a given site, are able to
> communicate back to central servers that aren't part of the app being viewed
> by the user
>
> I've seen widgets that allow you to see who's on the site you're on, where
> the widget is getting updated information from a central server that's not
> part of the site that the user is watching...
>
> -bruce
>
>
> -Original Message-
> From: Renato Formato [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 13, 2007 11:31 AM
> To: [EMAIL PROTECTED]; jQuery Discussion.
> Subject: Re: [jQuery] ajax- demo
>
>
> bruce ha scritto:
> > i'm trying to figure out how i can have a piece of ajax, so the user can
> > provide an input, which then goes to an external server to get processed,
> > with the results being returned to the page for processing by the original
> > server.
> It's not possible because of security reasons as far as I know. Ajax can
> be done only between the client and the domain from which the page is
> loaded.
>
> A workaround is to make a request to the current domain server that, in
> turn, acts like a "proxy" with the external server, getting the content
> and serving it back to the client.
>
> Ciao
> Renato
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


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

I thought about this approach as well but then you gotta think that
this is a plugin that others will use and possibly other plugins might
depend on it as well. Then if the defaults changed, the plugin that
depends on it could be confused and break. It is easy enough for a
devloper to setup their own set of defaults that would not cause an
issue like this.

var myHoverDefaults = { interval: 250 };

Now just pass that in and your set and don't potentially break any
other plugins.

As an example ... I'm updating my bgiframe plugin to accept an options
hash. If I allowed a developer/plugin to change the defaults then all
the plugins that depend on the defaults would then break.

Hopefully that all made sense ... I'm writing it in a bit of a rush.

--
Brandon Aaron

On 3/13/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Brandon Aaron schrieb:
> > Very nice. I believe this will be getting a fair amount of usage!
> >
> >
> >> - ability to override default settings (sensitivity, polling interval, etc)
> >>
> > This would be great and probably should be done by passing an options
> > hash as the third argument. Usually options as passed as the first
> > argument in plugins but it makes sense to be the third in this case.
> >
> > I would imagine it looking something like this:
> >
> > jQuery.fn.hoverIntent = function(f,g,o) {
> > o = jQuery.extend({ sensitivity: 4, interval: 100 }, o || {});
> > ...
> > };
> >
> How about this then...
>
> jQuery.fn.hoverIntent = function (on,off,options) {
>   var settings = jQuery.extend({}, jQuery.hoverIntent.defaults, options);
> ...
> };
> jQuery.hoverIntent = {};
> jQuery.extend({
> defaults: { sensitivity: 4, interval: 100 },
> setDefaults: function(settings) {
> jQuery.extend(jQuery.hoverIntent.defaults, settings);
> }
> });
>
> I like that approach. Gives your users the chance to set defaults
> directly or more then one using setDefaults:
>
> jQuery.hoverIntent.setDefaults({
> interval: 250
> });
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

On 14/03/2007, at 6:47 AM, Josh Nathanson wrote:
>> On your site for example moving from "consumer info" to  
>> "glasshouse" works
>> smoothly, but the menu doesn't disappear for a few seconds if you  
>> move
>> from
>> "glasshouse" to "city of gurya" (in ff2)
>
> Daemach, I think Joel did that on purpose, to allow for mousing  
> errors.
> There is a 400 ms onmouseout delay (adjustable) whether mousing  
> onto another
> menu item, or just anywhere out of the dropdown.
>
> -- Josh

Daemach, your observation is spot-on. Josh, you are are also right.  
The only time the delay does not occur is when mousing to another  
menu item *to which the script is attached* ie, list items that have  
ul children. The thing that closes the previous item instantly is the  
mouseover (or focus with keyboard) of the next one. Therefore the  
delay does occur when mousing over an item that does not have a ul  
child.

Background info:
I originally tried to make the menu items consistently - as you are  
suggesting - by adding the script to all items regardless of whether  
they have ul children, but ran into other quirky behaviour. That's  
when I decided that the behaviour you see now was acceptable ;) That  
said, I just tried having the plugin applied to all menu items  
regardless of if ul children exist, and it turns out that other  
changes I did after my original testing have solved that quirky  
behaviour.

The important bit:
I have altered the plugin (by applying behaviour to $("li",this)   
instead of $("li[ul]", this) - all the best changes involve deleting  
code :D ) so now the all menu items behave consistently.

Thanks Daemach and Josh (and everyone else!) for your observations  
that prompted the change. I have not updated the Blush site with this  
yet, but you can see the altered test case on my demo page:
http://users.tpg.com.au/j_birch/plugins/superfish/#example

I have made some menu items not contain ul children to demonstrate  
this issue.

Josh, a small detail - I changed the default timer to 500  
milliseconds a while ago.

Joel Birch.




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] I made an online jukebox in jQuery


http://lab.audunsson.info/jukebox/

This will be deployed on a python music database in the future - at the
moment nothing works besides the client code.

This is my first real go at Javascript and jQuery. Read the quick-pool
instructions to see it at work. I've used jQuery plugins for the hard work.

The code is very slow and I'm probably doing something very silly. Please
let me know if you see any chance at making it faster.
-- 
View this message in context: 
http://www.nabble.com/I-made-an-online-jukebox-in-jQuery-tf3399206.html#a9465371
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: The treemap plugin

Jörn Zaefferer ha scritto:
> I like that. Dunno yet what I'd need that for, but I'll keep it in mind. 
> Could you please add the link to the plugin list in the wiki and provide 
> demo links at the top of your plugin site? Thanks.
> 
Other than the Alexandre suggestion (in fact treemaps have been already 
used instead of tag clouds but, as far as I know, never with a 
javascript implementation), you can unobtrusively show statistics, even 
hierarchically

Ex: How many jQuery files have been downloaded for each version?
You can have a table with the data and, optionally, show a treemap with 
a hierarchical treemap for each major, minor and bugfix release. We have 
done the same thing with SPIP. 
(http://trac.rezo.net/trac/spip-zone/browser/_dev_/top10/stats.html)


Renato

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] looking for popup messenger style


hey
im looking for popup window that will open like msn messenger when user has
going online or sending a message... and will disappear after 5 secounds or
somthing, anyone knows about somthing like that? 
-- 
View this message in context: 
http://www.nabble.com/looking-for-popup-messenger-style-tf3399168.html#a9465265
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)


Please add:

StructKeyExists: function(s,k){
for(var n in s){
if (n == k) return true;
}
return false;
},


Shall we post additions and updates here?



Christopher Jordan wrote:
> 
> Hi fellow jQuerians!
> 
> I've just published a new plug-in that adds 42 handy ColdFusion 
> functions to the jQuery object. The methods are designed to behave like 
> their ColdFusion counterparts.
> 
> Here's the list:
> 
> Abs(number)
> ArrayAppend(array, value)
> ArrayLen(array)
> ArraySort(array, sort_type [, sort_order ])
> ArrayToList(array [, delimiter ])
> Ceiling(number)
> Compare(string1, string2)
> CompareNoCase(string1, string2)
> DateDiff(datepart, date1, date2)
> DecimalFormat(number)
> DollarFormat(number)
> Find(substring, string)
> FindNoCase(substring, string)
> Insert(substring, string, position)
> IsDate(date)
> IsNumeric(string)
> LCase(string)
> Left(string, count)
> Len(sting)
> ListAppend(list, value, [, delimiters])
> ListDeleteAt(list, position [, delimiters ])
> ListFind(list, value [, delimiters ]))
> ListFindNoCase(list, value [, delimiters ]))
> ListFirst(list, [, delimiters ])
> ListGetAt(list, position [, delimiters ]))
> ListLast(list, [, delimiters ])
> ListLen(list [, delimiters])
> ListToArray(list [, delimiters])
> LTrim(string)
> Mid(string, start, count)
> Replace(string, substring1, substring2 [, scope ])
> ReplaceNoCase(string, substring1, substring2 [, scope])
> Reverse(string)
> Right(string, count)
> Round(number [, number of decimal places])
> RTrim(string)
> StructKeyList (struct [, delimiter])
> StructKeyArray (struct)
> Trim(string)
> UCase(string)
> URLDecode(string)
> URLEncodedFormat(string)
> 
> I have plans for at least a few more ColdFusion functions in a future 
> version.
> 
> visit: http://cjordan.us to download the code. There is not a packed 
> version yet.
> 
> I find these functions useful, and while ColdFusion coders may be the 
> first to benefit, maybe folks from other languages might find them 
> useful as well. I'd love to hear suggestions and comments.
> 
> Cheers,
> Chris
> 
> 
> -- 
> http://cjordan.info
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/NEW-Plug-in%3A-cfjs-%28ColdFusionJavaScript%29-tf3386950.html#a9465290
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Combining Jquery and prototype /scriptaculous


Have a look at the following

http://docs.jquery.com/Using_jQuery_with_Other_Libraries
http://jquery.com/pipermail/discuss_jquery.com/2006-November/016262.html

-S

On 13/03/07, amircx <[EMAIL PROTECTED]> wrote:



is that possible/recommended to use both scripts on same page? they can
integrate nicely?
anyone tried ?
--
View this message in context:
http://www.nabble.com/Combining-Jquery-and-prototype--scriptaculous-tf3398974.html#a9464591
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Need to validate single form field...

Rick I think that would be

Params['Principal']

instead of Params.  

-- Josh


- Original Message - 
From: "Rick Faircloth" <[EMAIL PROTECTED]>
To: "'jQuery Discussion.'" 
Sent: Tuesday, March 13, 2007 3:14 PM
Subject: [jQuery] Need to validate single form field...


> Hi, all...
> 
> How would I modify this code to pass the value of
> a single form field called "Principal" to my .cfm validation page?
> 
> This code was written to gather all the form fields of a form into
> a single group of variables, "Params"..  would I still use "Param"
> to represent the value of the form field, "Principal"?
> 
> 
>function ValidatePrincipal(){
> 
>var Params = {};
> 
>$("input:text").each(function(){
>Params[$(this).attr("name")] = $(this).val();
>});
> 
>// "post" the form.  The Params object mimics form fields
>$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
> function(data){
>// this is the processing function.
> 
>// append what you get back to the element with ID = Result
> after clearing its contents
>$("#Result").empty().append(data);
> 
>} // closes post function
>); // closes ( after .post 
>} // closes { after ValidatePrincipal()
> 
> Thanks!
> 
> Rick
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Need to validate single form field...

Hi, all...

How would I modify this code to pass the value of
a single form field called "Principal" to my .cfm validation page?

This code was written to gather all the form fields of a form into
a single group of variables, "Params"..  would I still use "Param"
to represent the value of the form field, "Principal"?


function ValidatePrincipal(){

var Params = {};

$("input:text").each(function(){
Params[$(this).attr("name")] = $(this).val();
});

// "post" the form.  The Params object mimics form fields
$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
function(data){
// this is the processing function.
 
// append what you get back to the element with ID = Result
after clearing its contents
$("#Result").empty().append(data);

} // closes post function
); // closes ( after .post 
} // closes { after ValidatePrincipal()

Thanks!

Rick



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

Nathan Young -X (natyoung - Artizen at Cisco) schrieb:
> I think knowing what "this" is and being able to use it appropriately is 
> pretty critical.
>
> I think never having given a flying *** about self and having no idea what it 
> is, is totally natural and not indicative of anything.
>   
Thanks all for your replies.

I agree that knowing about self isn't critical, but its also true that 
these are the details that an "expert" should know about. Thanks for 
enlightening me :-)

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: The treemap plugin

Just beware if you put too much elements, it clogs the browser and then you
have to ctrl+alt+Del your way out.
I just tried with 500 elements. Boom.
If there were some safe way to threshold the plugin, i would consider it
perfect.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of John Resig
Sent: mardi 13 mars 2007 23:14
To: jQuery Discussion.
Subject: Re: [jQuery] ANNOUNCE: The treemap plugin

This is very very cool. Normally it's very painful to build good treemaps -
but you seem to have done an excellent job at making it easy (and
unobtrusive!) - great work!

--John

On 3/13/07, Renato Formato <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I wrote a jQuery plugin to show treemaps
> (http://en.wikipedia.org/wiki/Treemap) easily thanks to jQuery.
>
> A treemap is a nice way to visually show data with rectangles and colors.
>
> Let me know what do you think about it, how can I enhance it, add new 
> features and so on.
>
> Link: http://www.jquery.info/spip.php?article40
>
> Please, be kind with my English, and, if it's wrong, tell me how to 
> fix it ;)
>
> Ciao
> Renato
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.447 / Base de données virus: 268.18.10/720 - Date: 12/03/2007
19:19
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

maybe he's a buddhist coder that contemplates The Great "this" but does not
believe in the "self" ??

   _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Domigan
Sent: mardi 13 mars 2007 22:56
To: jQuery Discussion.
Subject: Re: [jQuery] jQuery newbies?


Maybe he's saying that n00bs don't know there IS a difference between this
and self...?


-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.447 / Base de données virus: 268.18.10/720 - Date: 12/03/2007
19:19
 
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: The treemap plugin

I think this would be a very good alternative to tag clouds.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: mardi 13 mars 2007 22:58
To: jQuery Discussion.
Subject: Re: [jQuery] ANNOUNCE: The treemap plugin

Renato Formato schrieb:
> Hi all,
>
> I wrote a jQuery plugin to show treemaps
> (http://en.wikipedia.org/wiki/Treemap) easily thanks to jQuery.
>
> A treemap is a nice way to visually show data with rectangles and colors.
>
> Let me know what do you think about it, how can I enhance it, add new 
> features and so on.
>
> Link: http://www.jquery.info/spip.php?article40
>
> Please, be kind with my English, and, if it's wrong, tell me how to 
> fix it ;)
>   
I like that. Dunno yet what I'd need that for, but I'll keep it in mind. 
Could you please add the link to the plugin list in the wiki and provide
demo links at the top of your plugin site? Thanks.

--
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.447 / Base de données virus: 268.18.10/720 - Date: 12/03/2007
19:19
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: The treemap plugin

This is very very cool. Normally it's very painful to build good
treemaps - but you seem to have done an excellent job at making it
easy (and unobtrusive!) - great work!

--John

On 3/13/07, Renato Formato <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I wrote a jQuery plugin to show treemaps
> (http://en.wikipedia.org/wiki/Treemap) easily thanks to jQuery.
>
> A treemap is a nice way to visually show data with rectangles and colors.
>
> Let me know what do you think about it, how can I enhance it, add new
> features and so on.
>
> Link: http://www.jquery.info/spip.php?article40
>
> Please, be kind with my English, and, if it's wrong, tell me how to fix
> it ;)
>
> Ciao
> Renato
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

True,
this means this email, self is referring to me.

Bruce P
bkdesign
  - Original Message - 
  From: Chris Domigan 
  To: jQuery Discussion. 
  Sent: Tuesday, March 13, 2007 5:55 PM
  Subject: Re: [jQuery] jQuery newbies?


  Maybe he's saying that n00bs don't know there IS a difference between this 
and self...?



--


  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Combining Jquery and prototype /scriptaculous


is that possible/recommended to use both scripts on same page? they can
integrate nicely?
anyone tried ?
-- 
View this message in context: 
http://www.nabble.com/Combining-Jquery-and-prototype--scriptaculous-tf3398974.html#a9464591
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [validation plugin] addError help!

philguillard schrieb:
> I can't add and show an error message programmatically, seems to me that 
> addErrors function doesn’t exist in validation plugin 1.0 Beta 1
>
> But I found this in the docs :
> var validator = $("#myform").validate();
> validator.addErrors({"firstname": "I know that your firstname is Pete, 
> Pete!"});
> validator.showErrors();
>
> It seems a validator.showErrors({'id': 'the error'}); doesn't provide 
> the right information.
>
> Anybody can help?
>   
Just in case you didn't get my reply on the plugins list: Use showErrors 
instead of addErrors directly. I forgot to update the example, but fixed 
it in the latest revision. This should work:

var validator = $("#myform").validate();
validator.showErrors({"firstname": "I know that your firstname is Pete, 
Pete!"});

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


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

Brandon Aaron schrieb:
> Very nice. I believe this will be getting a fair amount of usage!
>
>   
>> - ability to override default settings (sensitivity, polling interval, etc)
>> 
> This would be great and probably should be done by passing an options
> hash as the third argument. Usually options as passed as the first
> argument in plugins but it makes sense to be the third in this case.
>
> I would imagine it looking something like this:
>
> jQuery.fn.hoverIntent = function(f,g,o) {
> o = jQuery.extend({ sensitivity: 4, interval: 100 }, o || {});
> ...
> };
>   
How about this then...

jQuery.fn.hoverIntent = function (on,off,options) {
  var settings = jQuery.extend({}, jQuery.hoverIntent.defaults, options);
...
};
jQuery.hoverIntent = {};
jQuery.extend({ 
defaults: { sensitivity: 4, interval: 100 },
setDefaults: function(settings) {
jQuery.extend(jQuery.hoverIntent.defaults, settings);
}
});

I like that approach. Gives your users the chance to set defaults 
directly or more then one using setDefaults:

jQuery.hoverIntent.setDefaults({
interval: 250
});

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

I think knowing what "this" is and being able to use it appropriately is pretty 
critical.

I think never having given a flying *** about self and having no idea what it 
is, is totally natural and not indicative of anything.

>N

.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:.

Nathan Young
Cisco.com->Interface Development
A: ncy1717
E: [EMAIL PROTECTED]  

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jake McGraw
> Sent: Tuesday, March 13, 2007 2:45 PM
> To: jQuery Discussion.
> Subject: Re: [jQuery] jQuery newbies?
> 
> A quick google and a look at Javascript The Definitive Guide:
> 
> "self" is also a property of the global (window) object, one 
> which points back
> at the window object such that (window.self === window) 
> should be true (it
> isn't in Internet Explorer, but it is in Gecko-based 
> browsers, Netscape 4.78
> and Opera 7.53). I'm unsure why people use "self". It 
> requires JavaScript to
> step through the object in the DOM you actually want to 
> retrieve a property
> which points back at the object you wanted in the first 
> place. I guess it's
> useful for self-documenting code (pun not intended). I don't 
> know, I never use
> it, when I want the default window object, I use "window".
> 
> "this" always refers to the current object. Outside of any 
> function, "this"
> would refer to the global (window) object such that (this === 
> window) returns
> true. Within functions, "this" can refer to a number of 
> things, but it is
> always the "current object". Example:
> 
> So, self is property which allows an object (Window) to reference
> itself, this refers to the object which sits on the top of the current
> scope resolution stack.
> 
> btw, self is a part of Client Side Javascript, not the core language.
> 
> I maybe reading it out of context, but I don't think knowing this
> makes or breaks one's status as a professional Javascript developer.
> 
> - jake
> 
> 
> On 3/13/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> > Hi folks,
> >
> > the infamous ppk wrote in his blog:
> >
> > "I've learnt one other trick for distinguishing newbies and 
> pros: ask
> > them the difference between |this| and |self|. Usually 
> people who just
> > claim to be excellent scripters don't know the answer, 
> while real pros do."
> >
> > So obviously I am not an excellent scripter, because I 
> don't have any
> > idea on the difference between those two. And I prefer 
> discussing iton
> > this instead of crawling through the ECMA spec.
> >
> > Anyone?
> >
> > --
> > Jörn Zaefferer
> >
> > http://bassistance.de
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Here is another nice plugin idea

On 3/13/07, Stephen Woodbridge <[EMAIL PROTECTED]> wrote:
> If anyone wanted an idea for a jQuery plugin to write 
>
> http://www.scbr.com/docs/products/dhtmlxGrid/samples/1/index.html
>
> I think we have most if not all the infrastructure in existing plugins,
> but making it into a widget that you can easily drop on a page would be
> cool.

I've been developing a similar plugin lately. Mine is going to
transform large HTML tables into scrollable tables with fixed columns
and header / footer. Im a designer not a programmer and my JS skills
aren't top notch so i'm having some problems along the way.

I was also thinking of doing something like the
http://www.activewidgets.com grid next (it's a set of divs, not a
table), with a grid generated from JSON data and not from a table, but
i'm not sure if it isn't already supported by Ext. I'll double check
that after completing the forementioned HTML table plugin.

If anyone else is developing similar stuff please let me know, maybe
we could share some ideas.

cheers,
Tom Sieron
--
[EMAIL PROTECTED]

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?


Maybe he's saying that n00bs don't know there IS a difference between this
and self...?
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCE: The treemap plugin

Renato Formato schrieb:
> Hi all,
>
> I wrote a jQuery plugin to show treemaps 
> (http://en.wikipedia.org/wiki/Treemap) easily thanks to jQuery.
>
> A treemap is a nice way to visually show data with rectangles and colors.
>
> Let me know what do you think about it, how can I enhance it, add new 
> features and so on.
>
> Link: http://www.jquery.info/spip.php?article40
>
> Please, be kind with my English, and, if it's wrong, tell me how to fix 
> it ;)
>   
I like that. Dunno yet what I'd need that for, but I'll keep it in mind. 
Could you please add the link to the plugin list in the wiki and provide 
demo links at the top of your plugin site? Thanks.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

Self refers to the window object while "this" refers to a specific 
object that's being worked on.

And yep, I looked it up so I'm a n00b. ;o)

Rey

Jörn Zaefferer wrote:
> Hi folks,
> 
> the infamous ppk wrote in his blog:
> 
> "I've learnt one other trick for distinguishing newbies and pros: ask 
> them the difference between |this| and |self|. Usually people who just 
> claim to be excellent scripters don't know the answer, while real pros do."
> 
> So obviously I am not an excellent scripter, because I don't have any 
> idea on the difference between those two. And I prefer discussing iton 
> this instead of crawling through the ECMA spec.
> 
> Anyone?
> 

-- 
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Calling all CF'ers... et al...

Klaus Hartl schrieb:
> Yes, that is already useful! But it still depends on the form to be 
> submitted. Would be cool to have single fields validated on blur. That 
> would of course be useful for client-side validation as well. Maybe its 
> already implemented? I'm not uptodate with that.
>   
Currently you can specify one additional event for validation on each 
element.

I guess the combination of pure-client-side validation on keyup and 
submit with ajax-validation on blur would be the killer.

I'll investigate that.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?


As a nonprofessional, this is too much info for me, but the details are at: 
http://www.w3.org/TR/Window/#dfn-self-attribute
http://www.w3.org/TR/Window/#dfn-self-attribute 

You won't find it in the ECMA spec because it's part of the DOM

D

Daniel MacDonald wrote:
> 
> self refers to the current window in the DOM
> 
> D
> 
> 
> Jörn Zaefferer wrote:
>> 
>> Hi folks,
>> 
>> the infamous ppk wrote in his blog:
>> 
>> "I've learnt one other trick for distinguishing newbies and pros: ask 
>> them the difference between |this| and |self|. Usually people who just 
>> claim to be excellent scripters don't know the answer, while real pros
>> do."
>> 
>> So obviously I am not an excellent scripter, because I don't have any 
>> idea on the difference between those two. And I prefer discussing iton 
>> this instead of crawling through the ECMA spec.
>> 
>> Anyone?
>> 
>> -- 
>> Jörn Zaefferer
>> 
>> http://bassistance.de
>> 
>> 
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jQuery-newbies--tf3398728.html#a9464277
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Has anybody run into this?

Sam Collett schrieb:
> Perhaps using the plugin after the page has loaded (rather than when
> it is ready) would be a workaround?
>
> i.e. instead of $(document).ready, use $(window).load
>   
That wouldn't hurt the validation.
> This link may help as well:
> http://code.jenseng.com/google/
>   
Thanks, will read that.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

A quick google and a look at Javascript The Definitive Guide:

"self" is also a property of the global (window) object, one which points back
at the window object such that (window.self === window) should be true (it
isn't in Internet Explorer, but it is in Gecko-based browsers, Netscape 4.78
and Opera 7.53). I'm unsure why people use "self". It requires JavaScript to
step through the object in the DOM you actually want to retrieve a property
which points back at the object you wanted in the first place. I guess it's
useful for self-documenting code (pun not intended). I don't know, I never use
it, when I want the default window object, I use "window".

"this" always refers to the current object. Outside of any function, "this"
would refer to the global (window) object such that (this === window) returns
true. Within functions, "this" can refer to a number of things, but it is
always the "current object". Example:

So, self is property which allows an object (Window) to reference
itself, this refers to the object which sits on the top of the current
scope resolution stack.

btw, self is a part of Client Side Javascript, not the core language.

I maybe reading it out of context, but I don't think knowing this
makes or breaks one's status as a professional Javascript developer.

- jake


On 3/13/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> the infamous ppk wrote in his blog:
>
> "I've learnt one other trick for distinguishing newbies and pros: ask
> them the difference between |this| and |self|. Usually people who just
> claim to be excellent scripters don't know the answer, while real pros do."
>
> So obviously I am not an excellent scripter, because I don't have any
> idea on the difference between those two. And I prefer discussing iton
> this instead of crawling through the ECMA spec.
>
> Anyone?
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?


self refers to the current window in the DOM

D


Jörn Zaefferer wrote:
> 
> Hi folks,
> 
> the infamous ppk wrote in his blog:
> 
> "I've learnt one other trick for distinguishing newbies and pros: ask 
> them the difference between |this| and |self|. Usually people who just 
> claim to be excellent scripters don't know the answer, while real pros
> do."
> 
> So obviously I am not an excellent scripter, because I don't have any 
> idea on the difference between those two. And I prefer discussing iton 
> this instead of crawling through the ECMA spec.
> 
> Anyone?
> 
> -- 
> Jörn Zaefferer
> 
> http://bassistance.de
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jQuery-newbies--tf3398728.html#a9464043
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

http://jszen.blogspot.com/2007/03/mark-of-n00b.html 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Tuesday, March 13, 2007 4:23 PM
To: jQuery Discussion.
Subject: [jQuery] jQuery newbies?

Hi folks,

the infamous ppk wrote in his blog:

"I've learnt one other trick for distinguishing newbies and pros: ask them
the difference between |this| and |self|. Usually people who just claim to
be excellent scripters don't know the answer, while real pros do."

So obviously I am not an excellent scripter, because I don't have any idea
on the difference between those two. And I prefer discussing iton this
instead of crawling through the ECMA spec.

Anyone?

--
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery newbies?

self always referers to the the Window object (I think?)
this can be set based on the context (like jQuery does with event
handler functions)

FWIW, I don't find 'self' mentioned in the ECMA spec...

--Erik

On 3/13/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> the infamous ppk wrote in his blog:
>
> "I've learnt one other trick for distinguishing newbies and pros: ask
> them the difference between |this| and |self|. Usually people who just
> claim to be excellent scripters don't know the answer, while real pros do."
>
> So obviously I am not an excellent scripter, because I don't have any
> idea on the difference between those two. And I prefer discussing iton
> this instead of crawling through the ECMA spec.
>
> Anyone?
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] is there a simple function to swap two classes?


That makes sense - thanks!



Brandon Aaron wrote:
> 
> You can use toggleClass to toggle a particular class on/off. So you
> could chain two calls together to turn two classes on/off. One would
> be on and one would be off.
> 
> ...
> $('div').toggleClass('class1').toggleClass('class2');
> 
> Would result in:
> ...
> 
> Doing it again would swap out class2 for class1.
> 
> API docs for toggleClass:
> http://jquery.bassistance.de/api-browser/#toggleClassString
> --
> Brandon Aaron
> 
> On 3/13/07, rolfsf <[EMAIL PROTECTED]> wrote:
>>
>> Is there something like a swapClass function that will toggle between two
>> classes? Or do I need to toggle between functions that addClass and
>> removeClass?
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/is-there-a-simple-function-to-swap-two-classes--tf3397695.html#a9460455
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/is-there-a-simple-function-to-swap-two-classes--tf3397695.html#a9463846
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Jquery, Thickbox, and tracking scripts

I seem to have some issue opening an Iframe also it wont even do any 
javascript in Firefox because of the tracking script.

I have found more of the cause of the Ajax problem. In my Firebug I look 
at the error and I think it has to do with the evalScripts function not 
being able to read all my tracking scripts. This is what it says
evalScripts()jquery.jsp (line 1599)
each([script, script urchin.js, script show.php, 3 more...], function(), 
undefined)

As you can see it finds the Google Analytics just fine and the keywords 
max but the other 3 I'm guessing it doesn't find them as good scripts. I 
can't remove the scripts because its a major ecommerce site and my 
bosses wont let me. They feel the need to track and analyze everytyhing. 
This is a major issue I would think and there has to be a way around 
this. Please any help would be appreciated. I really would like to use 
Thickbox for our informational popups.




Sam Collett wrote:
> On 08/03/07, Dan Shields <[EMAIL PROTECTED]> wrote:
>   
>> I am trying to use jQuery and thick box to replace my existing popups.
>> The one thing is that on these popups, I have tracking scripts that are
>> pointed to outside domains and it seems to cause my javascript to error
>> out saying
>>
>> uncaught exception: Permission denied to call method XMLHttpRequest.open
>>
>> I see from everywhere after googling that this is from trying to pull in
>> content from another domain but really I'm not doing that I'm just
>> pulling in another page from my server, which has tracking scripts
>> pointing to other domains.
>> 
>
> Perhaps loading them via an iframe (instead of inline) would help?
> Unless you are doing that already (in which case I have no other
> suggestions).
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>   


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] forms validation error divs - help

I've put this specific question out on the list again...let's
see if we get some response...

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of amircx
Sent: Tuesday, March 13, 2007 3:11 PM
To: discuss@jquery.com
Subject: Re: [jQuery] forms validation error divs - help


nope, dont work
anybody can help?

Rick Faircloth wrote:
> 
> Now that I'm not sure about...
> 
> My first "guess" would be to try modifying a section of
> my code and adapting for those type inputs"
> 
> Original:
> 
>   // select all inputs of type text
>   $("input:text").each(function(){
>   Params[$(this).attr("name")] = $(this).val();
>   }); // closes input:text function
> 
> Perhaps add this modified version, too:
> 
>   // select all input of type select
>   $("input:select").each(function(){
>   Params[$(this).attr("name")] = $(this).val();
>   }); // close input:select function
> 
> Now, this is most likely incorrect or at the very least
> inefficient, but if it doesn't work, we'll throw out the question
> to the rest of the list, if someone doesn't see this and respond
> before.
> 
> I'm sure there's a way to modify the original code above
> to include all types of inputs, I just don't know how to code for it.
> 
> Anybody else want to help out here?
> 
> Rick
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of amircx
> Sent: Tuesday, March 13, 2007 2:31 PM
> To: discuss@jquery.com
> Subject: Re: [jQuery] forms validation error divs - help
> 
> 
> is that handle all form elements?
> if i got dropdown/checkboxes then what?
> 
> Rick Faircloth wrote:
>> 
>> Hi, amircx...
>> 
>> I think what you're missing is the last part of the code below:
>> 
>> $("#Result").empty().append(data);
>> 
>> I believe the purpose of that line is to remove the previous error
>> message
>> before a new one is displayed.
>> 
>> Here's how it fits into my entire "CalculateMortgage" function that
>> precedes
>> the code I sent yesterday...
>> 
>> See if this info help you...
>> 
>> Rick
>> 
>>  submitHandler: function(){
>>  
>>  function CalculateMortgage(){
>> 
>>  var Params = {};
>>  
>>  // select all inputs of type text
>>  $("input:text").each(function(){
>>  Params[$(this).attr("name")] = $(this).val();
>>  }); // closes input:text function
>>  
>>  // "post" the form.  The Param object mimics form fields
>>  $.post("Mortgage_Calculation.cfm", Params, function(data){
>>  // this is the processing function.
>>  
>>  // append what you get back to the element with ID = Result
>> after clearing its contents
>>  $("#Result").empty().append(data);
>>  
>>  } // closes post function
>>  ); // closes ( after .post
>>  } // closes } after CalculateMortgage = function() {
>>  
>>  } // closes the submitHandler function  
>> 
>> 
>> 
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>> Behalf Of amircx
>> Sent: Tuesday, March 13, 2007 8:49 AM
>> To: discuss@jquery.com
>> Subject: Re: [jQuery] forms validation error divs - help
>> 
>> 
>> hey rick
>> great job
>> i got some question
>> its works good, but if i got the same / diffrent error, its duplicates me
>> the error message, like "error, this field must be 15 chars at least
>> error,
>> this field must be 15 chars at least error, this field must be 15 chars
>> at
>> least"
>> 
>> and if the field is corrected or ok, its just not disappear the div error
>> msg... how can i fix it?
>> 
>> 
>> Rick Faircloth wrote:
>>>  
>>> Hi, amircx...
>>> 
>>> Here's some code I'm using... I just started jQuery about 2 weeks ago,
>>> myself.
>>> You'll see the rules and corresponding messages in the code.
>>> 
>>> Rick
>>> 
>>> $().ready(function() {
>>> 
>>> // validate Mortgage_Calculation_Form form fields on keyup
>>> $("#MC_Form").validate({
>>> 
>>>  errorPlacement: function(error, element) {
>>> 
>>> if(element.attr('id') == "Principal") {
>>>  error.appendTo("#principal_error");
>>>  }
>>> 
>>>  else
>>>  
>>>  if(element.attr('id') == "Interest") {
>>>  error.appendTo("#interest_error");
>>>  }
>>> 
>>>else
>>> 
>>>  if(element.attr('id') == "Years") {
>>>  error.appendTo("#years_error");
>>>  }
>>> 
>>> },//closes errorPlacement function
>>> 
>>>

[jQuery] How can this be modifed to accept other types of input?

Hi, all...

How can this code be modified to accept others types
of input besides "text"?  I need to be able to include input
from selects, radio, and checkboxes...

>   // select all inputs of type text
>   $("input:text").each(function(){
>   Params[$(this).attr("name")] = $(this).val();
>   }); // closes input:text function

Thanks,

Rick



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jQuery newbies?

Hi folks,

the infamous ppk wrote in his blog:

"I've learnt one other trick for distinguishing newbies and pros: ask 
them the difference between |this| and |self|. Usually people who just 
claim to be excellent scripters don't know the answer, while real pros do."

So obviously I am not an excellent scripter, because I don't have any 
idea on the difference between those two. And I prefer discussing iton 
this instead of crawling through the ECMA spec.

Anyone?

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Powered Sites - Keep the Links Coming


http://www.projectatomic.com http://www.projectatomic.com  jQuery medicrity
at its best. Home of jQuery Litebox (not as useful as Thickbox) and jQuery
Flickr (not as useful as FlickrCash).

D


Rey Bango-2 wrote:
> 
> Hey all,
> 
> I just wanted to let you know that I've been compiling the list of sites 
> and definitely noting all of the ones submitted. Thank you for providing 
> the info.
> 
> Please keep sending links as we want to have a nice list of 
> jQuery-powered sites for the jQuery web site.
> 
> Thanks,
> 
> Rey...
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jQuery-Powered-Sites---Keep-the-Links-Coming-tf2955158.html#a9463446
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Edit in place feedback needed


On Mar 13, 2007, at 7:54 PM, Rey Bango wrote:

> Much better!!! Should people re-download the plugin or was that only a
> change on the demo page?

Should redownload.  I also updated version number from 1.2.0 to 1.2.1  
for the bugfix. I am now running Parallels so I have no excuses of  
NOT testing properly with windows...

--
Mika Tuupola  http://www.appelsiini.net/~tuupola/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Reference to the element that triggered the event

Aaron Heimlich schrieb:
> I believe e.target is what you're looking for
Agreed. jQuery provides a perfect target property just for you:

$(".selectable").click( function(e) {
   $(this).toggleClass("selected");
   $(e.target).toggleClass("clicked");
   saveCookie($(this).attr("id"), 
$(this).attr("class").indexOf("selected"));
  });

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


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


Thanks Jonathan.

A simple onMouseOut interval should not be hard to add. Of course it will be
of a user-configurable duration. :)

The "hover" part of "hoverIntent" should be intact (I lifted that part of
the code straight out of jQuery). I will add that to the description/demo,
eventually, to make it clear... and if there's a situation where that's not
the case please send me some code or a URL so I can see what's broken.

I'm not sure if I'll have time tonight to work on the plug-in. But within
the next few days ... I'll post again when there's an update.

Brian.


On 3/13/07, Jonathan Sharp <[EMAIL PROTECTED]> wrote:


Hey Brian,

Great work! I have an immediate application for this and once it's a
plugin will use it for jdMenu (
http://jdsharp.us/code/jQuery/plugins/jdMenu/)! I never thought about
abstracting that behavior out but it is so clean and simple now. Great work
again!

After looking over your code (and fighting myself for feature bloat) I'd
like to suggest the possibility of having two intervals one for mouseover
and one for mouseout. The mouseout delay is very useful for example with
menus when users unintentionally mouseout when moving to a sub-menu.

One other suggestion is adding in support for handling the child node
issue that hover addresses. So if there's a child element of say the LI that
"gains hover" a mouseout for the parent LI won't be fired.

Great work and I look forward to this!

Cheers,
-Jonathan


On 3/13/07, Brian Cherne <[EMAIL PROTECTED]> wrote:
>
> Awesome! Thanks for all the positive feedback everyone! What a way to
> wake up in the morning. :)
>
> The next release will have configurable settings for sensitivity and
> polling interval. I'll try wrapping the plug-in in a self-calling function,
> but the last few times I've done that I got JavaScript errors. Is there some
> trick to it?
>
> Brian.
>
> On 3/13/07, Brandon Aaron <[EMAIL PROTECTED] > wrote:
> >
> > Very nice. I believe this will be getting a fair amount of usage!
> >
> > > - ability to override default settings (sensitivity, polling
> > interval, etc)
> > This would be great and probably should be done by passing an options
> > hash as the third argument. Usually options as passed as the first
> > argument in plugins but it makes sense to be the third in this case.
> >
> > I would imagine it looking something like this:
> >
> > jQuery.fn.hoverIntent = function(f,g,o) {
> > o = jQuery.extend({ sensitivity: 4, interval: 100 }, o || {});
> > ...
> > };
> >
> >
> > > - make it more jQuery $-friendly (first few attempts have failed)
> > As already mentioned by Klaus, you can force block scope by wraping
> > your code in the following self calling function.
> >
> > (function($) {
> > ...
> > })(jQuery);
> >
> > --
> > Brandon Aaron
> >
> > On 3/13/07, Brian Cherne < [EMAIL PROTECTED]> wrote:
> > > WHAT?
> > > hoverIntent is a function that attempts to determine the user's
> > intent...
> > > like a crystal ball, only with mouse movement! It works like (and
> > was
> > > derived from) jQuery's built-in hover. However, instead of
> > immediately
> > > calling the onMouseOver function, it waits until the user's mouse
> > slows down
> > > enough before calling the function.
> > >
> > > WHERE?
> > > My sorely out-dated web site.
> > > < http://cherne.net/brian/resources/jquery.hoverIntent.html
> > > >
> > >
> > > WHY?
> > > To delay or prevent the accidental firing of animations or ajax
> > calls.
> > > Simple timers work for small areas, but if your target area is large
> > it may
> > > execute regardless of intent. Also, because jQuery animations cannot
> > be
> > > stopped once they've started it's best not to start them
> > prematurely. ...
> > > and I wanted something that was easy to swap in/out with hover (so
> > > hoverIntent returns the same "this" and event objects as hover).
> > >
> > > WHAT'S NEXT?
> > > Your feedback! Tear it shreds! Tell me what you think. I would like
> > to keep
> > > the script as small as possible, but if I could make this more
> > useful (and
> > > more likely to be used) I'm happy to make some enhancements...
> > like...
> > > - more compelling/verbose demo/documentation
> > > - ability to override default settings (sensitivity, polling
> > interval, etc)
> > > - option of a simple onMouseOut timer
> > > - make it more jQuery $-friendly (first few attempts have failed)
> > > - suggestions for code style/commenting/optimization
> > >
> > >
> > > Thanks in advance,
> > > Brian.
> > >
> > > ___
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> > >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>

___
jQuery mailing list
discuss@jquery.c

Re: [jQuery] Why jQuery Effects doesn't work after load ajax data?

I believe you have to reattach the animate call after the AJAX load. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of JQuery - SimDigital
Sent: Tuesday, March 13, 2007 3:14 PM
To: jQuery Discussion.
Subject: [jQuery] Why jQuery Effects doesn't work after load ajax data?

I send POST params to another script and when it bring back, the effects
doesn't work.

My code:

 >> index.php <<
etc...
$(".business").click(function(){
$(".info").slideDown("fast");
$(".info").load('http://localhost/modules/esas/info.php);
}
$(".phone").click(function(){
$(".info").slideUp("fast");
}
etc...
Company XYZ



 >>info.php
555-


When the info.php is loaded, the div "phone" doesn't animate. :-( How to
solve this?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ajax with jQuery POST

here's my perl proxy cgi
#!/usr/bin/perl
use LWP::UserAgent;
use CGI;
$ua = LWP::UserAgent->new;
$ua->agent("NuBrowser/10.7 ");
$res = $ua->request(HTTP::Request->new(GET =>  $ENV{QUERY_STRING} ||
"http://www.woot.com/DefaultMicrosummary.ashx";));
$q = CGI->new;
print $q->header($res->headers->{'Content-Type'}),$res->content;
print "\n";


that's it! the comments at the end helped me debug!

On 3/13/07, abba bryant <[EMAIL PROTECTED]> wrote:
>
> You need to proxy your request. I am not going to explain how to do this (
> it's complex ) but here is a link.
> http://www.fleegix.org/articles/2005/11/07/cross-domain-ajax-requests
> I reccomend this link particularly highly if you are using PEAR libraries
> already as it uses PEAR's HTTP_Request classes.
>
>
>
> JQuery - SimDigital wrote:
> >
> > o my!
> > I can't use "http://www.otherdomain.com/search.php"; to Post data??
> >
> > The app that i was building need this everytime :-S
> >
> > Have another way to submit data (Get / Post) to another server process
> > and bring me back after with an ajax request?
> >
> >
> > Jake McGraw escreveu:
> >> Couple of things you need to do here:
> >>
> >> 1. You can not use AJAX to POST to URLs outside your current domain,
> >> not even subdomains, so, just to be sure your requesting pages on your
> >> current domain, change the target url from:
> >>
> >> "http://localhost/Ismart/modules/business/search.php";
> >>
> >> to
> >>
> >> "search.php"
> >>
> >> 2. If you're using PHP, the POST variables should automatically be
> >> loaded into both the $_POST array and the $_REQUEST array, to see
> >> whether you were successful, given:
> >>
> >> {name:"Test",city:"test"}
> >>
> >> then the following variables should be set:
> >>
> >> $_POST['name'], $_POST['city'] and $_REQUEST['name'], $_REQUEST['city']
> >>
> >> Hope that helps,
> >> - jake
> >>
> >> On 3/13/07, JQuery - SimDigital <[EMAIL PROTECTED]> wrote:
> >>
> >>> I'm trying to submit some data from form fields without reload the page.
> >>> I try a bit of codes and it doesn't work.
> >>>
> >>> Take a look what i'm doing and teach me please.
> >>>
> >>> 
> >>>
> >>> $("#button").click(function(){
> >>>
> >>> $.post("http://localhost/Ismart/modules/business/search.php";, { name:
> >>> "Test", city: "test" } );
> >>> }, function(ret){
> >>> $("#content").html(ret);
> >>> });
> >>> 
> >>>
> >>> 
> >>> 
> >>> 
> >>>
> >>> Ps.: I put fields value fixed as could be seen before (name: "Test",
> >>> city: "test" ) because i don't know how to solve this too.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ___
> >>> jQuery mailing list
> >>> discuss@jquery.com
> >>> http://jquery.com/discuss/
> >>>
> >>>
> >>
> >> ___
> >> jQuery mailing list
> >> discuss@jquery.com
> >> http://jquery.com/discuss/
> >>
> >>
> >>
> >>
> >>
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Ajax-POST-removing-spaces-from-inputs-tf3396281.html#a9462487
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Here is another nice plugin idea

If anyone wanted an idea for a jQuery plugin to write 

http://www.scbr.com/docs/products/dhtmlxGrid/samples/1/index.html

I think we have most if not all the infrastructure in existing plugins, 
but making it into a widget that you can easily drop on a page would be 
cool.

-Steve

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ajax with jQuery POST


You need to proxy your request. I am not going to explain how to do this (
it's complex ) but here is a link.
http://www.fleegix.org/articles/2005/11/07/cross-domain-ajax-requests
I reccomend this link particularly highly if you are using PEAR libraries
already as it uses PEAR's HTTP_Request classes.



JQuery - SimDigital wrote:
> 
> o my!
> I can't use "http://www.otherdomain.com/search.php"; to Post data??
> 
> The app that i was building need this everytime :-S
> 
> Have another way to submit data (Get / Post) to another server process 
> and bring me back after with an ajax request?
> 
> 
> Jake McGraw escreveu:
>> Couple of things you need to do here:
>>
>> 1. You can not use AJAX to POST to URLs outside your current domain,
>> not even subdomains, so, just to be sure your requesting pages on your
>> current domain, change the target url from:
>>
>> "http://localhost/Ismart/modules/business/search.php";
>>
>> to
>>
>> "search.php"
>>
>> 2. If you're using PHP, the POST variables should automatically be
>> loaded into both the $_POST array and the $_REQUEST array, to see
>> whether you were successful, given:
>>
>> {name:"Test",city:"test"}
>>
>> then the following variables should be set:
>>
>> $_POST['name'], $_POST['city'] and $_REQUEST['name'], $_REQUEST['city']
>>
>> Hope that helps,
>> - jake
>>
>> On 3/13/07, JQuery - SimDigital <[EMAIL PROTECTED]> wrote:
>>   
>>> I'm trying to submit some data from form fields without reload the page.
>>> I try a bit of codes and it doesn't work.
>>>
>>> Take a look what i'm doing and teach me please.
>>>
>>> 
>>>
>>> $("#button").click(function(){
>>>
>>> $.post("http://localhost/Ismart/modules/business/search.php";, { name:
>>> "Test", city: "test" } );
>>> }, function(ret){
>>> $("#content").html(ret);
>>> });
>>> 
>>>
>>> 
>>> 
>>> 
>>>
>>> Ps.: I put fields value fixed as could be seen before (name: "Test",
>>> city: "test" ) because i don't know how to solve this too.
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> jQuery mailing list
>>> discuss@jquery.com
>>> http://jquery.com/discuss/
>>>
>>> 
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
>>
>>
>>
>>   
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ajax-POST-removing-spaces-from-inputs-tf3396281.html#a9462487
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why jQuery Effects doesn't work after load ajax data?

You have to attach triggers to elements AFTER they've been loaded, do
this in the callback:

$(".info").load('http://localhost/modules/esas/info.php",function(){
$(".phone").click(function(){
   $(".info").slideUp("fast");
}
});

- jake

On 3/13/07, JQuery - SimDigital <[EMAIL PROTECTED]> wrote:
> I send POST params to another script and when it bring back, the effects
> doesn't work.
>
> My code:
>
>  >> index.php <<
> etc...
> $(".business").click(function(){
> $(".info").slideDown("fast");
> $(".info").load('http://localhost/modules/esas/info.php);
> }
> $(".phone").click(function(){
> $(".info").slideUp("fast");
> }
> etc...
> Company XYZ
> 
>
>
>  >>info.php
> 555-
>
>
> When the info.php is loaded, the div "phone" doesn't animate. :-(
> How to solve this?
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] *****SPAM***** ANNOUNCE: The treemap plugin

Cool!

I saw such interface once for a net.art project showing shareholders and
financial information



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Renato Formato
Sent: mardi 13 mars 2007 20:09
To: jQuery Discussion.
Subject: *SPAM* [jQuery] ANNOUNCE: The treemap plugin

Hi all,

I wrote a jQuery plugin to show treemaps
(http://en.wikipedia.org/wiki/Treemap) easily thanks to jQuery.

A treemap is a nice way to visually show data with rectangles and colors.

Let me know what do you think about it, how can I enhance it, add new
features and so on.

Link: http://www.jquery.info/spip.php?article40

Please, be kind with my English, and, if it's wrong, tell me how to fix it
;)

Ciao
Renato


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.447 / Base de données virus: 268.18.10/720 - Date: 12/03/2007
19:19
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Why jQuery Effects doesn't work after load ajax data?

I send POST params to another script and when it bring back, the effects 
doesn't work.

My code:

 >> index.php <<
etc...
$(".business").click(function(){
$(".info").slideDown("fast");
$(".info").load('http://localhost/modules/esas/info.php);
}
$(".phone").click(function(){
$(".info").slideUp("fast");
}
etc...
Company XYZ



 >>info.php
555-


When the info.php is loaded, the div "phone" doesn't animate. :-(
How to solve this?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

Yeah, that site is tight!  In both appearance and functionality.

-- Josh


- Original Message - 
From: "Daemach" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 13, 2007 12:56 PM
Subject: Re: [jQuery] enhanced suckerfish-style menu plugin


>
> It's possible - it just felt out of place when the menu transitioned 
> quickly
> when moving onto another menued item.
>
> Either way it looks good.
>
>
> Josh Nathanson-2 wrote:
>>
>>> On your site for example moving from "consumer info" to "glasshouse"
>>> works
>>> smoothly, but the menu doesn't disappear for a few seconds if you move
>>> from
>>> "glasshouse" to "city of gurya" (in ff2)
>>
>> Daemach, I think Joel did that on purpose, to allow for mousing errors.
>> There is a 400 ms onmouseout delay (adjustable) whether mousing onto
>> another
>> menu item, or just anywhere out of the dropdown.
>>
>> -- Josh
>>
>>
>> - Original Message - 
>> From: "Daemach" <[EMAIL PROTECTED]>
>> To: 
>> Sent: Tuesday, March 13, 2007 12:39 PM
>> Subject: Re: [jQuery] enhanced suckerfish-style menu plugin
>>
>>
>>>
>>> It looks great - the only thing I would add is that the plugin roll up
>>> the
>>> menu when you mouse over a menu item that doesn't have a dropdown
>>> attached.
>>> On your site for example moving from "consumer info" to "glasshouse"
>>> works
>>> smoothly, but the menu doesn't disappear for a few seconds if you move
>>> from
>>> "glasshouse" to "city of gurya" (in ff2)
>>>
>>> Otherwise fantastic - very nice site.
>>>
>>>
>>> thumblewend wrote:

 Hi jQuerolians,

 I'd like to offer up my new "superfish" plugin for feedback.
 Basically, it takes an existing pure CSS dropdown menu and adds the
 following features:
 - suckerfish-style hover support for IE6. The class added is
 'sfHover' by default but can be changed via the options object.
 - timed delay on mouseout to be more forgiving of mouse-piloting
 errors. Default is 400 milliseconds but can be changed via the
 options object.
 - animation of sub-menu reveal. uses a fadeIn by default but can be
 given a custom object to be used in the first argument of the animate
 function. The animation speed is also customisable but is set to
 "normal" by default.
 - keyboard accessibility. Tab through the links and the relevant sub-
 menus are revealed and hidden as needed.

 Example:
 This plugin is now used on my Blush Tomatoes site although only two
 of the main menu items have dropdowns.
 http://www.blushtomatoes.com.au/about/

 To use:
 1. begin with a pure CSS dropdown menu - it will degrade nicely to
 this when JavaScript is unavailable,

 2. add the extra selectors needed for IE as per the suckerfish
 technique, eg. #nav li.sfHover in addition to the regular #nav li:hover

 3. call the plugin on a containing div or the actual top-level ul
 element, eg. $("#nav").superfish();

 4. optionally, pass in an options object to override default
 settings, eg.
 $("#nav").superfish({
 hoverClass : "over",
 delay : 500,
 animation : {"opacity":"show","height":"show"},
 speed : "fast"
 });

 Here is the code:
 -

 (function($){
 $.fn.superfish = function(o){
 var defaults = {
 hoverClass : "sfHover",
 delay : 400,
 animation : {"opacity":"show"},
 speed : "normal"
 };
 var over = function(){
 var $$ = $(this);
 clearTimeout(this.sfTimer);
 if (!$$.is("."+o.hoverClass)) {
 $$.addClass(o.hoverClass)
 .find("ul").animate(o.animation,o.speed)
 .end()
 .siblings().removeClass(o.hoverClass);
 }
 };
 var out = function(){
 var $$ = $(this);
 this.sfTimer=setTimeout(function(){$$.removeClass
 (o.hoverClass);},o.delay);
 };
 o = $.extend(defaults, o || {});
 $("li[ul]",this)
 .hover(over,out)
 .find("a")
 .focus(function(){ $(this).parents("li[ul]").each(over); })
 .blur(function(){ $(this).parents("li[ul]").each(out); });

 return this;
 };
 })(jQuery);

 Tested on:
 Mac FF2, IE6, IE7, Safari2.
 Opera9 has flicker and seems to not support keyboard access (?)
 Not tested with three levels of menu but may work.

 All feedback is greatly appreciated.
 Joel Birch.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9461765
>>> Sent from the JQuery mailing list archive at Nabble.com.
>>>
>>>
>>> ___
>>> jQuery mailing list
>>> discuss@jquery.com
>>> http://jquery.com/discuss/
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>>

Re: [jQuery] enhanced suckerfish-style menu plugin


It's possible - it just felt out of place when the menu transitioned quickly
when moving onto another menued item.

Either way it looks good.


Josh Nathanson-2 wrote:
> 
>> On your site for example moving from "consumer info" to "glasshouse"
>> works
>> smoothly, but the menu doesn't disappear for a few seconds if you move 
>> from
>> "glasshouse" to "city of gurya" (in ff2)
> 
> Daemach, I think Joel did that on purpose, to allow for mousing errors. 
> There is a 400 ms onmouseout delay (adjustable) whether mousing onto
> another 
> menu item, or just anywhere out of the dropdown.
> 
> -- Josh
> 
> 
> - Original Message - 
> From: "Daemach" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, March 13, 2007 12:39 PM
> Subject: Re: [jQuery] enhanced suckerfish-style menu plugin
> 
> 
>>
>> It looks great - the only thing I would add is that the plugin roll up
>> the
>> menu when you mouse over a menu item that doesn't have a dropdown 
>> attached.
>> On your site for example moving from "consumer info" to "glasshouse"
>> works
>> smoothly, but the menu doesn't disappear for a few seconds if you move 
>> from
>> "glasshouse" to "city of gurya" (in ff2)
>>
>> Otherwise fantastic - very nice site.
>>
>>
>> thumblewend wrote:
>>>
>>> Hi jQuerolians,
>>>
>>> I'd like to offer up my new "superfish" plugin for feedback.
>>> Basically, it takes an existing pure CSS dropdown menu and adds the
>>> following features:
>>> - suckerfish-style hover support for IE6. The class added is
>>> 'sfHover' by default but can be changed via the options object.
>>> - timed delay on mouseout to be more forgiving of mouse-piloting
>>> errors. Default is 400 milliseconds but can be changed via the
>>> options object.
>>> - animation of sub-menu reveal. uses a fadeIn by default but can be
>>> given a custom object to be used in the first argument of the animate
>>> function. The animation speed is also customisable but is set to
>>> "normal" by default.
>>> - keyboard accessibility. Tab through the links and the relevant sub-
>>> menus are revealed and hidden as needed.
>>>
>>> Example:
>>> This plugin is now used on my Blush Tomatoes site although only two
>>> of the main menu items have dropdowns.
>>> http://www.blushtomatoes.com.au/about/
>>>
>>> To use:
>>> 1. begin with a pure CSS dropdown menu - it will degrade nicely to
>>> this when JavaScript is unavailable,
>>>
>>> 2. add the extra selectors needed for IE as per the suckerfish
>>> technique, eg. #nav li.sfHover in addition to the regular #nav li:hover
>>>
>>> 3. call the plugin on a containing div or the actual top-level ul
>>> element, eg. $("#nav").superfish();
>>>
>>> 4. optionally, pass in an options object to override default
>>> settings, eg.
>>> $("#nav").superfish({
>>> hoverClass : "over",
>>> delay : 500,
>>> animation : {"opacity":"show","height":"show"},
>>> speed : "fast"
>>> });
>>>
>>> Here is the code:
>>> -
>>>
>>> (function($){
>>> $.fn.superfish = function(o){
>>> var defaults = {
>>> hoverClass : "sfHover",
>>> delay : 400,
>>> animation : {"opacity":"show"},
>>> speed : "normal"
>>> };
>>> var over = function(){
>>> var $$ = $(this);
>>> clearTimeout(this.sfTimer);
>>> if (!$$.is("."+o.hoverClass)) {
>>> $$.addClass(o.hoverClass)
>>> .find("ul").animate(o.animation,o.speed)
>>> .end()
>>> .siblings().removeClass(o.hoverClass);
>>> }
>>> };
>>> var out = function(){
>>> var $$ = $(this);
>>> this.sfTimer=setTimeout(function(){$$.removeClass
>>> (o.hoverClass);},o.delay);
>>> };
>>> o = $.extend(defaults, o || {});
>>> $("li[ul]",this)
>>> .hover(over,out)
>>> .find("a")
>>> .focus(function(){ $(this).parents("li[ul]").each(over); })
>>> .blur(function(){ $(this).parents("li[ul]").each(out); });
>>>
>>> return this;
>>> };
>>> })(jQuery);
>>>
>>> Tested on:
>>> Mac FF2, IE6, IE7, Safari2.
>>> Opera9 has flicker and seems to not support keyboard access (?)
>>> Not tested with three levels of menu but may work.
>>>
>>> All feedback is greatly appreciated.
>>> Joel Birch.
>>>
>>> ___
>>> jQuery mailing list
>>> discuss@jquery.com
>>> http://jquery.com/discuss/
>>>
>>>
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9461765
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/ 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9462094
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] is there a simple function to swap two classes?

You can use toggleClass to toggle a particular class on/off. So you
could chain two calls together to turn two classes on/off. One would
be on and one would be off.

...
$('div').toggleClass('class1').toggleClass('class2');

Would result in:
...

Doing it again would swap out class2 for class1.

API docs for toggleClass:
http://jquery.bassistance.de/api-browser/#toggleClassString
--
Brandon Aaron

On 3/13/07, rolfsf <[EMAIL PROTECTED]> wrote:
>
> Is there something like a swapClass function that will toggle between two
> classes? Or do I need to toggle between functions that addClass and
> removeClass?
>
> Thanks
> --
> View this message in context: 
> http://www.nabble.com/is-there-a-simple-function-to-swap-two-classes--tf3397695.html#a9460455
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

> On your site for example moving from "consumer info" to "glasshouse" works
> smoothly, but the menu doesn't disappear for a few seconds if you move 
> from
> "glasshouse" to "city of gurya" (in ff2)

Daemach, I think Joel did that on purpose, to allow for mousing errors. 
There is a 400 ms onmouseout delay (adjustable) whether mousing onto another 
menu item, or just anywhere out of the dropdown.

-- Josh


- Original Message - 
From: "Daemach" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 13, 2007 12:39 PM
Subject: Re: [jQuery] enhanced suckerfish-style menu plugin


>
> It looks great - the only thing I would add is that the plugin roll up the
> menu when you mouse over a menu item that doesn't have a dropdown 
> attached.
> On your site for example moving from "consumer info" to "glasshouse" works
> smoothly, but the menu doesn't disappear for a few seconds if you move 
> from
> "glasshouse" to "city of gurya" (in ff2)
>
> Otherwise fantastic - very nice site.
>
>
> thumblewend wrote:
>>
>> Hi jQuerolians,
>>
>> I'd like to offer up my new "superfish" plugin for feedback.
>> Basically, it takes an existing pure CSS dropdown menu and adds the
>> following features:
>> - suckerfish-style hover support for IE6. The class added is
>> 'sfHover' by default but can be changed via the options object.
>> - timed delay on mouseout to be more forgiving of mouse-piloting
>> errors. Default is 400 milliseconds but can be changed via the
>> options object.
>> - animation of sub-menu reveal. uses a fadeIn by default but can be
>> given a custom object to be used in the first argument of the animate
>> function. The animation speed is also customisable but is set to
>> "normal" by default.
>> - keyboard accessibility. Tab through the links and the relevant sub-
>> menus are revealed and hidden as needed.
>>
>> Example:
>> This plugin is now used on my Blush Tomatoes site although only two
>> of the main menu items have dropdowns.
>> http://www.blushtomatoes.com.au/about/
>>
>> To use:
>> 1. begin with a pure CSS dropdown menu - it will degrade nicely to
>> this when JavaScript is unavailable,
>>
>> 2. add the extra selectors needed for IE as per the suckerfish
>> technique, eg. #nav li.sfHover in addition to the regular #nav li:hover
>>
>> 3. call the plugin on a containing div or the actual top-level ul
>> element, eg. $("#nav").superfish();
>>
>> 4. optionally, pass in an options object to override default
>> settings, eg.
>> $("#nav").superfish({
>> hoverClass : "over",
>> delay : 500,
>> animation : {"opacity":"show","height":"show"},
>> speed : "fast"
>> });
>>
>> Here is the code:
>> -
>>
>> (function($){
>> $.fn.superfish = function(o){
>> var defaults = {
>> hoverClass : "sfHover",
>> delay : 400,
>> animation : {"opacity":"show"},
>> speed : "normal"
>> };
>> var over = function(){
>> var $$ = $(this);
>> clearTimeout(this.sfTimer);
>> if (!$$.is("."+o.hoverClass)) {
>> $$.addClass(o.hoverClass)
>> .find("ul").animate(o.animation,o.speed)
>> .end()
>> .siblings().removeClass(o.hoverClass);
>> }
>> };
>> var out = function(){
>> var $$ = $(this);
>> this.sfTimer=setTimeout(function(){$$.removeClass
>> (o.hoverClass);},o.delay);
>> };
>> o = $.extend(defaults, o || {});
>> $("li[ul]",this)
>> .hover(over,out)
>> .find("a")
>> .focus(function(){ $(this).parents("li[ul]").each(over); })
>> .blur(function(){ $(this).parents("li[ul]").each(out); });
>>
>> return this;
>> };
>> })(jQuery);
>>
>> Tested on:
>> Mac FF2, IE6, IE7, Safari2.
>> Opera9 has flicker and seems to not support keyboard access (?)
>> Not tested with three levels of menu but may work.
>>
>> All feedback is greatly appreciated.
>> Joel Birch.
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9461765
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/ 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why IE hangs with this code? (Newbie to jQuery)


There is a dimensions plugin that gets the client height/width easier.
http://dev.jquery.com/browser/trunk/plugins/dimensions/dimensions.js?format=txt

Glen


On 3/13/07, Hrvoje Blažeković <[EMAIL PROTECTED]> wrote:


 When I trie with other elements that You suggested, then the functinality
in FF and Safari is broken, no class is added or remooved :(


I placed a $(document).ready function where it functions as it should. On
document load the style is added if the html is taller then 700px and it
works in all tested browsers (IE,FF & Safari)


$(document).ready(
function(){
var ys = $('html').height();
if(ys>700){
$('#wrap').addClass('over1024');
}
}
  );




This code works while the code in the for the resize() event does not work
in IE, it hangs the browser.


Hrvoje




On 13 ožu, 2007, at 13:41, Abel Tamayo wrote:

bet it's not recognizing the selector 'html'. Have you tried with document,
'body' or window?

On 3/13/07, Hrvoje Blažeković < [EMAIL PROTECTED]> wrote:
>
> Please, can someone tell me why IE hangs when executing this code?
>
>
> $(document).ready(
> function(){
> $(window).resize(
> function(){
> var ys = $('html').height();
> alert(ys);
> if(ys>700){
> $('#wrap').addClass('over1024');
> } else {
> $('#wrap').removeClass('over1024');
> }
> return false;
> }
> );
> }
>   );
>
>
>
>
>
>
> When the window is resized in IE the browser hangs, but other browsers
> (Fireworks, Safari) just do fine..
>
>
> Is there a simpler way to write this function?
>
>
> Thanks for your time
>
>
> Hrvoje
>
>
>
>  
> Hrvoje Blažeković
> tel.:  048/220 418
> fax.: 048/220 417
> e-mail: [EMAIL PROTECTED]
> 
>
>
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


 

Hrvoje Blažeković

tel.:  048/220 418

fax.: 048/220 417

e-mail: [EMAIL PROTECTED]





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin


It looks great - the only thing I would add is that the plugin roll up the
menu when you mouse over a menu item that doesn't have a dropdown attached. 
On your site for example moving from "consumer info" to "glasshouse" works
smoothly, but the menu doesn't disappear for a few seconds if you move from
"glasshouse" to "city of gurya" (in ff2)

Otherwise fantastic - very nice site.


thumblewend wrote:
> 
> Hi jQuerolians,
> 
> I'd like to offer up my new "superfish" plugin for feedback.  
> Basically, it takes an existing pure CSS dropdown menu and adds the  
> following features:
> - suckerfish-style hover support for IE6. The class added is  
> 'sfHover' by default but can be changed via the options object.
> - timed delay on mouseout to be more forgiving of mouse-piloting  
> errors. Default is 400 milliseconds but can be changed via the  
> options object.
> - animation of sub-menu reveal. uses a fadeIn by default but can be  
> given a custom object to be used in the first argument of the animate  
> function. The animation speed is also customisable but is set to  
> "normal" by default.
> - keyboard accessibility. Tab through the links and the relevant sub- 
> menus are revealed and hidden as needed.
> 
> Example:
> This plugin is now used on my Blush Tomatoes site although only two  
> of the main menu items have dropdowns.
> http://www.blushtomatoes.com.au/about/
> 
> To use:
> 1. begin with a pure CSS dropdown menu - it will degrade nicely to  
> this when JavaScript is unavailable,
> 
> 2. add the extra selectors needed for IE as per the suckerfish  
> technique, eg. #nav li.sfHover in addition to the regular #nav li:hover
> 
> 3. call the plugin on a containing div or the actual top-level ul  
> element, eg. $("#nav").superfish();
> 
> 4. optionally, pass in an options object to override default  
> settings, eg.
> $("#nav").superfish({
>   hoverClass : "over",
>   delay : 500,
>   animation : {"opacity":"show","height":"show"},
>   speed : "fast"
>   });
> 
> Here is the code:
> -
> 
> (function($){
> $.fn.superfish = function(o){
>   var defaults = {
>   hoverClass  : "sfHover",
>   delay   : 400,
>   animation   : {"opacity":"show"},
>   speed   : "normal"
>   };
>   var over = function(){
>   var $$ = $(this);
>   clearTimeout(this.sfTimer);
>   if (!$$.is("."+o.hoverClass)) {
>   $$.addClass(o.hoverClass)
>   .find("ul").animate(o.animation,o.speed)
>   .end()
>   .siblings().removeClass(o.hoverClass);
>   }
>   };
>   var out = function(){
>   var $$ = $(this);
>   this.sfTimer=setTimeout(function(){$$.removeClass 
> (o.hoverClass);},o.delay);
>   };  
>   o = $.extend(defaults, o || {});
>   $("li[ul]",this)
>   .hover(over,out)
>   .find("a")
>   .focus(function(){ 
> $(this).parents("li[ul]").each(over); })
>   .blur(function(){ $(this).parents("li[ul]").each(out); 
> });
> 
>   return this;
> };
> })(jQuery);
> 
> Tested on:
> Mac FF2, IE6, IE7, Safari2.
> Opera9 has flicker and seems to not support keyboard access (?)
> Not tested with three levels of menu but may work.
> 
> All feedback is greatly appreciated.
> Joel Birch.
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/enhanced-suckerfish-style-menu-plugin-tf3374021.html#a9461765
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


  1   2   >