[jQuery] Re: How to block control + plus/minus key?

2009-04-02 Thread RobG



On Apr 3, 2:05 pm, "Filipe"  wrote:
> hey folks,
>
> how can i block control + plus/minus key on the whole page?

Why?

--
Rob


[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-02 Thread Klaus Hartl

There's no need for all this ranting. You're simply not meeting the
markup requirements to make the tabs work.

A tab has to look like:

A Tab

I m pretty sure the documentation is showing this fact and I don't
understand why you took "straight code out of the example" and then
changed it to not work. Indeed "Nowhere in
the docs does it say you need to add code to show the first default
tab and
div." because you don't need to as long as you're using the proper
markup.


--Klaus



On 3 Apr., 07:32, expresso  wrote:
> I mean really if you take the straight code out of the example and try to run
> this, it doesn't even work!  So how are we to even use the docs?  Under the
> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works there
> but when I try this in my own page, I get the same issues.
>
> 
> 
> 
>    href="http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet" />
>    src="http://jqueryui.com/latest/jquery-1.3.2.js";>
>    src="http://jqueryui.com/latest/ui/ui.core.js";>
>    src="http://jqueryui.com/latest/ui/ui.tabs.js";>
>   
>   $(document).ready(function(){
>     $("#tabs").tabs();
>   });
>   
> 
> 
>
> 
>     
>         One
>         Two
>         Three
>     
>     
>         First tab is active by default:
>         $('#example').tabs();
>     
>     
>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> volutpat.
>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> volutpat.
>     
>     
>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> volutpat.
>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> volutpat.
>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> volutpat.
>     
> 
> 
> 
>
> Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
> the docs does it say you need to add code to show the first default tab and
> div.  In fact the docs show you an example with example code of tabs working
> without it.
>
> So then why should we assume we have to write all this extra code just to
> specify the default to load and others hidden when the docs don't even show
> that?
>
> I can see all the events, etc. on that page, but nowhere especially in the
> examples does it say you have to do anything other than add the following
> script to your page along with the structure of hyperlink-to-div id matchup:
>
>   $(document).ready(function(){
>     $("#tabs").tabs();
>   });
>   
>
> so how does one "infer" to have to create all this extra code to get basic
> features to work when the own docs are showing you none of that!?
>
> If I have to hack in more jQuery to do this, then the docs should be
> forthcoming and tell me this instead of giving me examples that essentially
> point me in a direction of "it works like this" instead of "you need to code
> a ton more to get this to work like this" type of deal.  How do I know that?
> I'm not trying to do anything here outside of get the basic tabs working and
> default  to show!  By what I infer from the docs, this is all I need!
>
> I mean is that example ONLY working because it's using the jquery css ( type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css";
> rel="stylesheet" />) in there and the jQuery tabs plugin can work like that
> IF you only use that css and anything outside that you must code your own
> logic to your own css?  I don't get this or infer that!
>
>
>
> thedad...@gmail.com wrote:
>
> > maybe this tutorial can help you .
>
> >http://15daysofjquery.com/jquery-online-movie-tutorial-by-john-resig/29/
>
> > On 4月3日, 上午10时24分, expresso  wrote:
> >> For some reason, when my first div loads, I'm seeing all 3 text show up
> >> even
> >> though they're in different  containers:
>
> >>   
> >>       $(document).ready(function() {
> >>       $('#Tabs div:Form1Content').show();
> >>       $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
> >>       });
> >>   
> >>     
> >>         
> >>              #Form1Content
> >> Images/Product/tab1.gif  
> >>              #Form2Content
> >> Images/Product/tab2.gif  
> >>              #Form3Content
> >> Images/Product/tab3.gif  
> >>         
> >>         
> >>             
> >>                form
> >>             
> >>             
> >>                examples
> >>            
> >>            
> >>                test
> >>             
> >>         

[jQuery] Re: Problems with radio buttons

2009-04-02 Thread echomrg



On Apr 2, 6:37 pm, "Richard D. Worth"  wrote:
> Change
>
> @name=
>
> to
>
> name=

Thanks!
Working perfectly now.

Marcello


[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-02 Thread expresso


I mean really if you take the straight code out of the example and try to run
this, it doesn't even work!  So how are we to even use the docs?  Under the
"Example" here: http://docs.jquery.com/UI/Tabs#events  that code works there
but when I try this in my own page, I get the same issues.




  http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet" />
  http://jqueryui.com/latest/jquery-1.3.2.js";>
  http://jqueryui.com/latest/ui/ui.core.js";>
  http://jqueryui.com/latest/ui/ui.tabs.js";>
  
  $(document).ready(function(){
$("#tabs").tabs();
  });
  


 


One
Two
Three


First tab is active by default:
$('#example').tabs();


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.






Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
the docs does it say you need to add code to show the first default tab and
div.  In fact the docs show you an example with example code of tabs working
without it.

So then why should we assume we have to write all this extra code just to
specify the default to load and others hidden when the docs don't even show
that?

I can see all the events, etc. on that page, but nowhere especially in the
examples does it say you have to do anything other than add the following
script to your page along with the structure of hyperlink-to-div id matchup:

  $(document).ready(function(){
$("#tabs").tabs();
  });
  


so how does one "infer" to have to create all this extra code to get basic
features to work when the own docs are showing you none of that!?

If I have to hack in more jQuery to do this, then the docs should be
forthcoming and tell me this instead of giving me examples that essentially
point me in a direction of "it works like this" instead of "you need to code
a ton more to get this to work like this" type of deal.  How do I know that? 
I'm not trying to do anything here outside of get the basic tabs working and
default  to show!  By what I infer from the docs, this is all I need!

I mean is that example ONLY working because it's using the jquery css (http://jqueryui.com/latest/themes/base/ui.all.css";
rel="stylesheet" />) in there and the jQuery tabs plugin can work like that
IF you only use that css and anything outside that you must code your own
logic to your own css?  I don't get this or infer that!

thedad...@gmail.com wrote:
> 
> 
> maybe this tutorial can help you .
> 
> http://15daysofjquery.com/jquery-online-movie-tutorial-by-john-resig/29/
> 
> On 4月3日, 上午10时24分, expresso  wrote:
>> For some reason, when my first div loads, I'm seeing all 3 text show up
>> even
>> though they're in different  containers:
>>
>>   
>>   $(document).ready(function() {
>>   $('#Tabs div:Form1Content').show();
>>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>>   });
>>   
>> 
>> 
>>  #Form1Content
>> Images/Product/tab1.gif  
>>  #Form2Content
>> Images/Product/tab2.gif  
>>  #Form3Content
>> Images/Product/tab3.gif  
>> 
>> 
>> 
>>form
>> 
>> 
>>examples
>>
>>
>>test
>> 
>> 
>> 
>>
>> So when this loads, I see the 2 tabs and then the text shows up below
>> like
>> this:
>>
>> form
>> examples
>> test
>>
>> instead of just "form" and the rest hidden.
>> --
>> View this message in
>> context:http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp228...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp22860795s27240p22862248.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-02 Thread expresso


I mean really if you take the straight code out of the example and try to run
this, it doesn't even work!  So how are we to even use the docs?  Under the
"Example" here: http://docs.jquery.com/UI/Tabs#events  that code works there
but when I try this in my own page, I get the same issues.




  http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet" />
  http://jqueryui.com/latest/jquery-1.3.2.js";>
  http://jqueryui.com/latest/ui/ui.core.js";>
  http://jqueryui.com/latest/ui/ui.tabs.js";>
  
  $(document).ready(function(){
$("#tabs").tabs();
  });
  


  


 #fragment-1 One 
 #fragment-2 Two 
 #fragment-3 Three 


First tab is active by default:
$('#example').tabs();


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.






expresso wrote:
> 
> Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
> the docs does it say you need to add code to show the first default tab
> and div.  In fact the docs show you an example with example code of tabs
> working without it.
> 
> So then why should we assume we have to write all this extra code just to
> specify the default to load and others hidden when the docs don't even
> show that?
> 
> I can see all the events, etc. on that page, but nowhere especially in the
> examples does it say you have to do anything other than add the following
> script to your page along with the structure of hyperlink-to-div id
> matchup:
> 
>   $(document).ready(function(){
> $("#tabs").tabs();
>   });
>   
> 
> 
> so how does one "infer" to have to create all this extra code to get basic
> features to work when the own docs are showing you none of that!?
> 
> thedad...@gmail.com wrote:
>> 
>> 
>> maybe this tutorial can help you .
>> 
>> http://15daysofjquery.com/jquery-online-movie-tutorial-by-john-resig/29/
>> 
>> On 4月3日, 上午10时24分, expresso  wrote:
>>> For some reason, when my first div loads, I'm seeing all 3 text show up
>>> even
>>> though they're in different  containers:
>>>
>>>   
>>>   $(document).ready(function() {
>>>   $('#Tabs div:Form1Content').show();
>>>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>>>   });
>>>   
>>> 
>>> 
>>>  #Form1Content
>>> Images/Product/tab1.gif  
>>>  #Form2Content
>>> Images/Product/tab2.gif  
>>>  #Form3Content
>>> Images/Product/tab3.gif  
>>> 
>>> 
>>> 
>>>form
>>> 
>>> 
>>>examples
>>>
>>>
>>>test
>>> 
>>> 
>>> 
>>>
>>> So when this loads, I see the 2 tabs and then the text shows up below
>>> like
>>> this:
>>>
>>> form
>>> examples
>>> test
>>>
>>> instead of just "form" and the rest hidden.
>>> --
>>> View this message in
>>> context:http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp228...
>>> Sent from the jQuery General Discussion mailing list archive at
>>> Nabble.com.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp22860795s27240p22862216.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-02 Thread expresso


It's still hard for me to believe I have to manually hide the rest by default
just to get my tabs working out of the box.


expresso wrote:
> 
> Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
> the docs does it say you need to add code to show the first default tab
> and div.  In fact the docs show you an example with example code of tabs
> working without it.
> 
> So then why should we assume we have to write all this extra code just to
> specify the default to load and others hidden when the docs don't even
> show that?
> 
> I can see all the events, etc. on that page, but nowhere especially in the
> examples does it say you have to do anything other than add the following
> script to your page along with the structure of hyperlink-to-div id
> matchup:
> 
>   $(document).ready(function(){
> $("#tabs").tabs();
>   });
>   
> 
> 
> so how does one "infer" to have to create all this extra code to get basic
> features to work when the own docs are showing you none of that!?
> 
> thedad...@gmail.com wrote:
>> 
>> 
>> maybe this tutorial can help you .
>> 
>> http://15daysofjquery.com/jquery-online-movie-tutorial-by-john-resig/29/
>> 
>> On 4月3日, 上午10时24分, expresso  wrote:
>>> For some reason, when my first div loads, I'm seeing all 3 text show up
>>> even
>>> though they're in different  containers:
>>>
>>>   
>>>   $(document).ready(function() {
>>>   $('#Tabs div:Form1Content').show();
>>>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>>>   });
>>>   
>>> 
>>> 
>>>  #Form1Content
>>> Images/Product/tab1.gif  
>>>  #Form2Content
>>> Images/Product/tab2.gif  
>>>  #Form3Content
>>> Images/Product/tab3.gif  
>>> 
>>> 
>>> 
>>>form
>>> 
>>> 
>>>examples
>>>
>>>
>>>test
>>> 
>>> 
>>> 
>>>
>>> So when this loads, I see the 2 tabs and then the text shows up below
>>> like
>>> this:
>>>
>>> form
>>> examples
>>> test
>>>
>>> instead of just "form" and the rest hidden.
>>> --
>>> View this message in
>>> context:http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp228...
>>> Sent from the jQuery General Discussion mailing list archive at
>>> Nabble.com.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp22860795s27240p22862061.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] How to get sliders to open and close

2009-04-02 Thread commarts

JQuery,

How to make it when one slider opens the
other one closes.

http://sucro.se/red7e/BE/


Daniel


[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-02 Thread expresso


Thanks.  And this is what really "gets to me" about the docs.  Nowhere in the
docs does it say you need to add code to show the first default tab and div. 
In fact the docs show you an example with example code of tabs working
without it.

So then why should we assume we have to write all this extra code just to
specify the default to load and others hidden when the docs don't even show
that?

I can see all the events, etc. on that page, but nowhere especially in the
examples does it say you have to do anything other than add the following
script to your page along with the structure of hyperlink-to-div id matchup:

  $(document).ready(function(){
$("#tabs").tabs();
  });
  


so how does one "infer" to have to create all this extra code to get basic
features to work when the own docs are showing you none of that!?

thedad...@gmail.com wrote:
> 
> 
> maybe this tutorial can help you .
> 
> http://15daysofjquery.com/jquery-online-movie-tutorial-by-john-resig/29/
> 
> On 4月3日, 上午10时24分, expresso  wrote:
>> For some reason, when my first div loads, I'm seeing all 3 text show up
>> even
>> though they're in different  containers:
>>
>>   
>>   $(document).ready(function() {
>>   $('#Tabs div:Form1Content').show();
>>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>>   });
>>   
>> 
>> 
>>  #Form1Content
>> Images/Product/tab1.gif  
>>  #Form2Content
>> Images/Product/tab2.gif  
>>  #Form3Content
>> Images/Product/tab3.gif  
>> 
>> 
>> 
>>form
>> 
>> 
>>examples
>>
>>
>>test
>> 
>> 
>> 
>>
>> So when this loads, I see the 2 tabs and then the text shows up below
>> like
>> this:
>>
>> form
>> examples
>> test
>>
>> instead of just "form" and the rest hidden.
>> --
>> View this message in
>> context:http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp228...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp22860795s27240p22861995.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery introduction script (Alert Message is now showing!)

2009-04-02 Thread Mohd.Tareq
On Fri, Apr 3, 2009 at 5:52 AM, yrstruly  wrote:

>
> Hallo
>
> Im new to jQuery. I have donwloaded the jquery-1.3.2min file and i
> have copied that introduction code from the website and saved it in
> the same directory as the jquery file. When i run the script it seems
> to be working and when i click on the link it goes to the website, but
> isnt this script suppose to show an alert message first, before it
> goes to the website?
>
> Please what am i doing wrong? Have a saved it correctly or is the file
> i donwloaded not valid? Please help. The code follows:
>
> 
>  
>  
>   
>   
>
>
>   
>$(document).ready(function(){
>   $("a").click(function(event){
> alert("Thanks for visiting!");
>   });
>  });
>
>
>   
>  
>  
>   http://jquery.com/";>jQuery
>  
>  
>

=== ===Go for this script you can see now ur
click function will execute first & then it will go for link


 
 
  
  


  
   $(document).ready(function(){
  $("a").click(function(event){
window.href="http://jquery.com/";; <http://jquery.com/>
alert("Thanks for visiting!");
return true;
  });
 });


  
 
 
  http://jquery.com/>">jQuery
 
 

cheers.

Ragx


[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-02 Thread thedad...@gmail.com

maybe this tutorial can help you .

http://15daysofjquery.com/jquery-online-movie-tutorial-by-john-resig/29/

On 4月3日, 上午10时24分, expresso  wrote:
> For some reason, when my first div loads, I'm seeing all 3 text show up even
> though they're in different  containers:
>
>   
>   $(document).ready(function() {
>   $('#Tabs div:Form1Content').show();
>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>   });
>   
> 
> 
>  #Form1Content
> Images/Product/tab1.gif  
>  #Form2Content
> Images/Product/tab2.gif  
>  #Form3Content
> Images/Product/tab3.gif  
> 
> 
> 
>form
> 
> 
>examples
>
>
>test
> 
> 
> 
>
> So when this loads, I see the 2 tabs and then the text shows up below like
> this:
>
> form
> examples
> test
>
> instead of just "form" and the rest hidden.
> --
> View this message in 
> context:http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp228...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] jQuery introduction script (Alert Message is now showing!)

2009-04-02 Thread yrstruly

Hallo

Im new to jQuery. I have donwloaded the jquery-1.3.2min file and i
have copied that introduction code from the website and saved it in
the same directory as the jquery file. When i run the script it seems
to be working and when i click on the link it goes to the website, but
isnt this script suppose to show an alert message first, before it
goes to the website?

Please what am i doing wrong? Have a saved it correctly or is the file
i donwloaded not valid? Please help. The code follows:


 
 
   
   


   
$(document).ready(function(){
   $("a").click(function(event){
 alert("Thanks for visiting!");
   });
 });


   
 
 
   http://jquery.com/";>jQuery
 
 


[jQuery] jQuery and Ruby on Rails

2009-04-02 Thread bigPHIL18

Hello all,

I have been reading a lot and can not find what I am looking for. I
have a Rails project, and have written a script to get the class of a
ul. I want to pass this variable gathered from the script and pass it
on to Rails. How would i got about doing this?

For your information: I wrote this jQuery script just so I could set a
variable name to the name when the mouse is clicked on the UL. From
then the I can delete the file from the server.

Thank you,
Phil


[jQuery] script tag in HTML

2009-04-02 Thread michael.marri...@ausawd.com

How can I refer to multiple sources of javascript in my HTML.
For example if in my HTML I already have a line such as :




Then I want to put in




I have tried to change the type to be say type = "text\Myjscript"
and then the following;


[jQuery] Re: help with type rendering via FaceLift (FLIR)?

2009-04-02 Thread chuck.wagner...@gmail.com

answer posted here: 
http://www.nabble.com/help-with-type-rendering-via-FaceLift-(FLIR)--td22398849s27240.html#a22858781

On Mar 8, 10:59�am, feragnoli  wrote:
> hello, I have a question about using jquery with facelift.
> I am pulling text from an input box in a form to be rendered by
> facelift.
>
> the code is this:
>
> --
>
>  � � � � "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>
> 
> Christoph Dunst
> 
> 
> 
> 
> 
>
>  charset="utf-8">
> 
>
> 
> � � � � $(document).ready(function() {
>
> � � � � � � � � // initialize FLIR
> � � � � � � � � FLIR.init({ path: 'facelift/' });
>
> � � � � � � � � // get the content of text and put it in the div
> � � � � � � � � $('#submit').submit(function(){
> � � � � � � � � � � � � $('#rendered').html($("#text").val());
> � � � � � � � � � � � � $("#rendered").each( function() { FLIR.replace(this); 
> } );
> � � � � � � � � � � � � return false;
> � � � � � � � � });
>
> � � � � });
> 
> 
>
> 
> 
> 
> 
> � � � � 8
> � � � � 10
> � � � � 12
> � � � � 14
> � � � � 18
> 
> � � � � render text
> 
>
> 
> 
>
> --
>
> for some reason, though, the script runs only the first time. when
> trying to type a new text in the input, the button would just not
> submit the form.
> has anybody an idea of what could the problem be?
> thank you.


[jQuery] Re: autocomplete and google toolbar autofill conflict

2009-04-02 Thread jaciones


There is some good information about disabling auto-fill here
http://www.google.com/support/forum/p/Toolbar/thread?tid=7dcddc95f43dac19&hl=en
http://www.google.com/support/forum/p/Toolbar/thread?tid=7dcddc95f43dac19&hl=en 

But the quick and dirty explanation is that the google toolbar looks for
specific text to decide what it is going to autofill. In fact, if there is
just the text "Name:" or "First Name:" NEAR an input field, google toolbar
will hook into it. 

I've been researching this problem for a while and it's really insidious.
Anyhow we resolved our problem by breaking up this 'nearby' text with a
span. (ie. We were having problems autocompleting a name field because the
text describing the field had "Name" in it. We broke up the Name text with a
span like Name, and that seemed to fix the google
toolbar interference)


jjh-3 wrote:
> 
> 
> I have been on this issue for the past 24hrs and I can't seem to find
> the solution. There seems to be a conflict between the jQuery
> autocomplete plug-in (http://bassistance.de/jquery-plugins/jquery-
> plugin-autocomplete/) and google toolbar's autofill function. I'm
> testing this in IE 7. What really confuses me is that the result is
> inconsistent. Sometimes the results will show and sometime it doesn't.
> 
> The problem is that when autofill is enabled, it makes the input field
> (with autocomplete) loose focus while I'm entering my triggering key
> stroke (minChars was set to 3). This triggers the onBlur event in the
> autocomplete plug-in and the result will be hidden.
> 
> My JS Code:
> var autocompleteUrl = "airport_list.php?q=60&limit=10";
> var autocompleteSettingsObj = {
>   minChars:3,
>   width: 300,
>   scrollHeight: 350,
>   formatResult: function(data, i, total) { return (data && data.length
>> 1) ? data[2] : ' '; }
> };
> //setup autocomplete
> $("#myInput").autocomplete(autocompleteUrl, autocompleteSettingsObj);
> 
> My HTML Code:
>  maxlength="50" class="myclass" autocomplete="off" />
> 
> Note: Firefox works fine.
> 
> Thanks in advance.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/autocomplete-and-google-toolbar-autofill-conflict-tp20629251s27240p22858082.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] How to block control + plus/minus key?

2009-04-02 Thread Filipe
hey folks,

how can i block control + plus/minus key on the whole page? i've tried a few 
scripts but none of them seem to work. 

thanks in advance!

filipe.

[jQuery] Re: How to cancel events

2009-04-02 Thread RobG



On Apr 3, 1:37 pm, iceangel89  wrote:
> How can i cancel a change event? i have validated text boxes on
> change. so if its not validated i want to cancel the change. how can i
> do that?

If you validate based on the change event, then the change event has
already occurred - you can't cancel it after it's happened.  If you
want to restore the value of a form control to its default:

  someInput.value = someInput.defaultValue;


but I hate form controls that do that.  Just let the user know there's
an error and let them fix it themselves.


--
Rob


[jQuery] How to cancel events

2009-04-02 Thread iceangel89

How can i cancel a change event? i have validated text boxes on
change. so if its not validated i want to cancel the change. how can i
do that?


[jQuery] Re: errorClass not set until after invalidHandler is called

2009-04-02 Thread Mac

Hi

The validator plugin contains errorList and errorMap properties. The
erorrList contains the invalid elements and the respective messages
and the errorMap contains the invalid element id and it's associated
error message. Perhaps checking these will assist with determining the
invalid element.

eg. if (validator.errorMap.selectElementId == 'undefined') { execute
code}

Using undefined since you have no errormessage to test against.

Hope that helps...

On Apr 3, 7:04 am, CrabMan  wrote:
> This makes it very difficult to determine which element is causing the
> error and execute code in response.
>
> For instance, the following does not work, because there is no way to
> determine which input caused the error because the errorClass has not
> been set yet when invalidHandler is called:
>
> $('#step_1_form').validate({
>         rules: {
>                 category_selector: "required",
>                 zip_code: "required"
>         },
>         messages: {
>                 category_selector: ""
>         },
>         invalidHandler: function() {
>                 if 
> ($('select[name^="category_selector"][class*="error"]').length >
> 0)
>                 {
>                         // EXECUTE SOME CODE SPECIFIC TO THIS ERROR
>                 }
>         }
>
> }
>
> A work around is to use setTimeout, but is obviously an undesirable
> hack:
>
> $('#step_1_form').validate({
>         rules: {
>                 category_selector: "required",
>                 zip_code: "required"
>         },
>         messages: {
>                 category_selector: ""
>         },
>         invalidHandler: function() {
>                 var displayErrors = function() {
>                         if 
> ($('select[name^="category_selector"][class*="error"]').length >
> 0)
>                         {
>                                 // EXECUTE SOME CODE SPECIFIC TO THIS ERROR
>                         }
>                 };
>                 setTimeout(displayErrors,10);
>         }
>
> }
>
> Am I correct? or is there a better way to determine the element
> causing the error, and regardless, shouldn't errorClass be set before
> invalidHandler is called anyways?


[jQuery] All div content showing up in jQuery Tabs

2009-04-02 Thread expresso


For some reason, when my first div loads, I'm seeing all 3 text show up even
though they're in different  containers:

  
  $(document).ready(function() {
  $('#Tabs div:Form1Content').show();
  $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
  });
  


 #Form1Content 
Images/Product/tab1.gif  
 #Form2Content 
Images/Product/tab2.gif  
 #Form3Content 
Images/Product/tab3.gif  



   form


   examples
   
   
   test




So when this loads, I see the 2 tabs and then the text shows up below like
this:

form
examples
test

instead of just "form" and the rest hidden.
-- 
View this message in context: 
http://www.nabble.com/All-div-content-showing-up-in-jQuery-Tabs-tp22860795s27240p22860795.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: need help: how to pass variable to attr in select statement

2009-04-02 Thread MorningZ

don't over complicate things, the selection is a simple string, treat
it like any other string concatenation done in JavaScript


$("div#mainnav .mainnav[alt='" + selectid + "']")

thats

$ ( double-quote div#

alt = single-quote double-quote + selectid + double-quote single-
quote ] double-quote



On Apr 2, 4:10 pm, mylok  wrote:
> code like below:
> var selectid = Querystring.get("id");
> $('div#mainnav .mainnav[alt="selectid?"]').addClass("color");
>
> I want to select element which attr alt = selectid(variable from
> querystring). How can I do that? Thanks.


[jQuery] Re: SUPERFISH - Possible to Animate LI's within UL?

2009-04-02 Thread Martin Evans

Actually, never mind - I figured it out.

for example, the onShow function:

onShow:  function(){ // make it bounce
obj = this.find(">li"); // assigns the li children to obj
obj.animate({height: "23px"}, 200); // applies animation to li
this.animate({marginTop: "15px"}, 200); // applies animation to
the ul
obj.animate({height: "30px"}, 200);
this.animate({marginTop: "-3px"}, 200);
obj.animate({height: "23px"}, 300);
this.animate({marginTop: "3px"}, 300);
this.animate({marginTop: "0px"}, 300);
}

http://www.retropolis.com/clients/etc/superfish/example_martin2.html

What's weird is that the onInit funtion won't let me do something
similar. (have the top level LI's drop into view).

Using:

onInit: function(){
obj = this.find(">li");
obj.css({height: "0px"});
obj.animate({height: "23px"}, 1000);
}

I get this error message in the javascript console:

this.find is not a function

Also, I guess it's not possible to animate the li's on menu close
without hacking the core code, because onHide is triggered after the
menu is made invisible, correct?

Martin


On Mar 31, 1:23 am, Martin Evans  wrote:
> Hi everyone,
>
> I've been playing with Joel's fantastic menu plugin and was wondering
> if anyone knows if it's possible to animate the LI's at the same time
> the containing UL is being animated?
>
> I've got a simple demo running that *almost* does what I want:
>
> http://www.retropolis.com/clients/etc/superfish/example_martin.html
>
> I'm making the UL's fade-in, fly up and bounce using the the animation
> object to alter margin-top and onShow callback to get the bounce. What
> I'd also like to do is animate the css height property of the LI's as
> they rise, starting out spaced apart and having them come together at
> the end of their travel, and do the opposite in reverse. Is this
> possible to do by passing a parameter, or will editing of the core
> script be required?
>
> Thank you for reading!
>
> Martin


[jQuery] Validation plugin (Remove the label messages)

2009-04-02 Thread Victorr

I've started to use the validation plugin for form validation. But I
don't want it to show the label error messages. I just want to change
the inputs background and border color. I don't know how to disable
the label messages so if someone could help me with that, that would
be super.


[jQuery] Re: FadeIn/Out mulitple images in one container

2009-04-02 Thread James

You need to place your content inside the callback function for
fadeOut. The callback is executed after the content is faded out.

$(document).ready(function() {
 $("#lakeview-gallery a").click(function(event) {
  $("#lakeview-placeholder").fadeOut(800, function() {
   // this content will start once the content is faded
out
   var image = $(this).attr("href");
   $("img#lakeview-placeholder").attr("src", image);
   $("#lakeview-placeholder").fadeIn(800);
   return false;
  });
 });
});

On Apr 2, 11:10 am, stinkysGTI  wrote:
> There's a pretty simple image replacement I'm trying to do, but can't
> get the current image to fadeOut, and the new one to fadeIn. There's
> only 3 images to choose from and always will be. With those 2 lines
> commented out, it works, just obviously without any kind of fade. I'm
> fairly new to jQuery, so any help would be greatly appreciated.
>
> $(document).ready(function() {
>         $("#lakeview-gallery a").click(function(event) {
> //              $("#lakeview-placeholder").fadeOut(800);
> //              $("#lakeview-placeholder").fadeIn(800);
>                 event.preventDefault();
>                 var image = $(this).attr("href");
>                 $("img#lakeview-placeholder").attr("src", image);
>                 });
>
> });
>
> The page can be seen here:http://www.lakeshoremontana.com/dev/floorplans.html


[jQuery] Re: Announcing a new journal for front-end developers

2009-04-02 Thread Rick Faircloth

Sounds interesting, Martin.

I'd love to see some sample articles when available.

Thanks,

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Martin Streicher
Sent: Thursday, April 02, 2009 1:06 PM
To: jQuery (English)
Subject: [jQuery] Announcing a new journal for front-end developers



2 April 2009

My name is Martin Streicher. I am pleased to announce three new
publications dedicated to web developers.

Red: The Journal of Ruby Development

Facade: The Journal of Front-end Development

Tabula: The Journal of Open Source Database Development

The three publications obviously have a great number of topics in
common between then, and much that is unique. Where ever possible,
readers will benefit from the synergies and the novelties.


These journals are to be published differently than other periodicals:

1. Each journal is published as frequently as possible so material is
timely and accessible.

2. The price for each journal can therefore vary, depending on the
scope and size of an issue.

3. You will be able to purchase individual articles or an entire issue
of each journal.

4. Each author earns a royalty for the sale or his or her individual
article and the sale of an entire issue in which his or her article
appears.

5. Each author earns a royalty from the advertising bundled in each
article and issue.

6. A portion of all revenue garnered will be awarded as grants to
further the documentation of open source technologies.

7. To guarantee the highest quality technical material, peer technical
reviewers also earn a royalty on publications sold.

8. The publications will be available in PDF form and in print-on-
demand form. (Pricing is to be determined.)

9. Each author retains copyright in his or her work, but grants
exclusive, worldwide, first serial rights to the publication for a
short period of time. Each contributing author will receive an annual
subscription to the journal he or she contributes to.

10. Subscribers will have early access to all articles in
development.

A formal author letter spelling out terms will be available shortly
but will earnestly reflect the principles above to encourage expert
contributions. Each journal will also have its own web site in the
near future.


Effective immediately, I would like to call for contributors. If you
are working in Rails, Ruby, MySQL, SQLite, PostgreSQL, JavaScript,
CSS, ORMs, EC2, S3, CloudFront, provisioning, scaling, and high-
availability, among others, and have an interesting technique, plugin,
technology, or insight, please contact me with a proposal. I'll leave
the proposal format informal for now, but please specify why your
software or approach is novel and would be of interest to your
community and peers.

Here are some story ideas to consider: Rails 2.3 novelties; Chef;
Cucumber; Sass and HAML; MariaDB; embedded search engines; jQuery;
scaling Rails; performance optimizations; sharding; CSS frameworks;
Ruby 1.9; BDD; Ruby Cocoa; PostgreSQL goodies; deployment and
monitoring; best practices; gems; plugins; and more.

You can also feel free to send community events, such as conferences,
meet-ups, lectures, brigades, startup weekends, and hack fests. Each
journal will contain community pages so readers can connect to one
another.

Classified and commercial advertisements are also accepted. You can
advertise your own or your company's services. Please contact me for
rates.


About me: From 2002-2007, I was the Editor-in-Chief of Linux Magazine
and am currently that publication's web development columnist. I am a
regular contributor to IBM developerWorks's Linux and Open Source
Zones, and also write that site's monthly "Speaking Unix" column. I
also contribute to Linux Pro Magazine and to Amazon's Web Services
Developer Center. I am currently a freelance Rails developer and
author -- and now publisher of these journals. I live in Raleigh, NC.
I am an avid comic reader, art collector, foodie, and music fan. I
have two teens, two dogs, and two cats.

I look forward to your questions and proposals.

You can reach me via email, phone, Twitter, and IM.

Email: martin.streic...@gmail.com
GTalk: martin.streicher
iChat and Yahoo: supergiantrobot
Skype: martin.s.streicher
Phone: 919.741.4182
Twitter: martinstreicher
web: http://www.linkedin.com/in/mstreicher

My thanks for your consideration.

--
Martin Streicher, Principal and Publisher
The Pixel, Byte, and Comma Company
Raleigh, NC



[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Tin

Actually, the filter works on all nodes, and if the parent (or any
ancestors) are filtered out, none of the descendants will show up
either.  As for the case sensitivity... well, it's an example.  Your
implementation of the filter function can be better :)



On Apr 2, 4:34 pm, Ravish Bhagdev  wrote:
> Looks good michael!  Couple of minor observations:
>
> - Filter only works on root nodes,
> - Is case sensitive (simple toLower on both vars used in indexof should fix
> it, so no biggie)
>
> I really like the % graph and slider thingy :-)
>
> Cheers,
> R
>
>
>
> On Thu, Apr 2, 2009 at 11:38 PM, Tin  wrote:
>
> > Ravish,
> > I've added a collapse/expand example to SlickGrid.  Check it out at
> >http://slickgrid.googlecode.com/svn/trunk/example5-collapsing.html
>
> > On Apr 2, 2:31 pm, Jack Killpatrick  wrote:
> > > Right, I was thinking maybe treetable combined with the quicksearch
> > > plugin... ie: the quicksearch plugin would search the treetable, but the
> > > side-effect is that it will show found rows, not correctly expand the
> > > tree. (so not good).
>
> > > So yeah, the search continues. I haven't seen a jquery plugin like that
> > > ext searchable tree. Maybe ask on the jquery-ui list: there's some tree
> > > work going on there.
>
> > > - Jack
>
> > > Ravish Bhagdev wrote:
> > > > Yes, it is collapsible but it dosen't have the "filter" or search
> > > > capability like the filtertree (
> >http://www.extjs.com/explorer/#filtertree)
>
> > > > So not quite as useful.
>
> > > > Ravish
>
> > > > On Thu, Apr 2, 2009 at 9:49 PM, Jack Killpatrick  > > > > wrote:
>
> > > >     The treetable plugin (below) is collapsible. You may hit a snag
> > > >     trying to find something that will open up the "found" node,
> > > >     though. I'm pretty sure that the quicksearch plugin will just pay
> > > >     attention to table elements, regardless of their visibility, but
> > > >     it would not open the parent(s) up the tree.
>
> > > >     I'm curious if you find something.
>
> > > >     - Jack
>
> > > >     Ravish Bhagdev wrote:
> > > >>     Thanks Jack,
>
> > > >>     But I'm looking for a tree that is collapsible.  I'm reading
> > > >>     jquery documentation to see how difficult it will be to implement
> > > >>     something that keeps index of all nodes in when searching hides
> > > >>     matching id of node by getting hold of the element.  Sounds a bit
> > > >>     tricky though :(
>
> > > >>     Ravish
>
> > > >>     On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick  > > >>     > wrote:
>
> > > >>         If the tree is just a list internally, you might be able to
> > > >>         use this:
>
> > > >>        http://rikrikrik.com/jquery/quicksearch/
>
> > > >>         or maybe use that with this:
>
> > > >>        http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0
>
> > > >>         - Jack
>
> > > >>         Ravish wrote:
> > > >>         > Hi,
>
> > > >>         > I've been looking for a tree widget which can be filtered
> > > >>         or searched
> > > >>         > by typing keyword in a textbox.  When trees have thousands
> > > >>         of nodes,
> > > >>         > its very difficult for users to browse manually.  Has
> > > >>         anyone ever seen
> > > >>         > such a widget (jquery based ideally but other will do as
> > > >>         well).  I am
> > > >>         > surprised to find that none of the available plugins
> > > >>         support this
> > > >>         > feature!
>
> > > >>         > Thanks


[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Ravish Bhagdev
Looks good michael!  Couple of minor observations:

- Filter only works on root nodes,
- Is case sensitive (simple toLower on both vars used in indexof should fix
it, so no biggie)

I really like the % graph and slider thingy :-)

Cheers,
R

On Thu, Apr 2, 2009 at 11:38 PM, Tin  wrote:

>
> Ravish,
> I've added a collapse/expand example to SlickGrid.  Check it out at
> http://slickgrid.googlecode.com/svn/trunk/example5-collapsing.html
>
>
> On Apr 2, 2:31 pm, Jack Killpatrick  wrote:
> > Right, I was thinking maybe treetable combined with the quicksearch
> > plugin... ie: the quicksearch plugin would search the treetable, but the
> > side-effect is that it will show found rows, not correctly expand the
> > tree. (so not good).
> >
> > So yeah, the search continues. I haven't seen a jquery plugin like that
> > ext searchable tree. Maybe ask on the jquery-ui list: there's some tree
> > work going on there.
> >
> > - Jack
> >
> >
> >
> > Ravish Bhagdev wrote:
> > > Yes, it is collapsible but it dosen't have the "filter" or search
> > > capability like the filtertree (
> http://www.extjs.com/explorer/#filtertree)
> >
> > > So not quite as useful.
> >
> > > Ravish
> >
> > > On Thu, Apr 2, 2009 at 9:49 PM, Jack Killpatrick  > > > wrote:
> >
> > > The treetable plugin (below) is collapsible. You may hit a snag
> > > trying to find something that will open up the "found" node,
> > > though. I'm pretty sure that the quicksearch plugin will just pay
> > > attention to table elements, regardless of their visibility, but
> > > it would not open the parent(s) up the tree.
> >
> > > I'm curious if you find something.
> >
> > > - Jack
> >
> > > Ravish Bhagdev wrote:
> > >> Thanks Jack,
> >
> > >> But I'm looking for a tree that is collapsible.  I'm reading
> > >> jquery documentation to see how difficult it will be to implement
> > >> something that keeps index of all nodes in when searching hides
> > >> matching id of node by getting hold of the element.  Sounds a bit
> > >> tricky though :(
> >
> > >> Ravish
> >
> > >> On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick  > >> > wrote:
> >
> > >> If the tree is just a list internally, you might be able to
> > >> use this:
> >
> > >>http://rikrikrik.com/jquery/quicksearch/
> >
> > >> or maybe use that with this:
> >
> > >>http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0
> >
> > >> - Jack
> >
> > >> Ravish wrote:
> > >> > Hi,
> >
> > >> > I've been looking for a tree widget which can be filtered
> > >> or searched
> > >> > by typing keyword in a textbox.  When trees have thousands
> > >> of nodes,
> > >> > its very difficult for users to browse manually.  Has
> > >> anyone ever seen
> > >> > such a widget (jquery based ideally but other will do as
> > >> well).  I am
> > >> > surprised to find that none of the available plugins
> > >> support this
> > >> > feature!
> >
> > >> > Thanks
> >
>


[jQuery] Re: Select Last

2009-04-02 Thread Mauricio (Maujor) Samy Silva



I want to get the last  in the _sub_ list. Here is what I've tried
with no success. Ideas?

$('.list li li:last a').addClass('last-li');
$('.list li ul li:last a').addClass('last-li');
$('.list li:has(ul) li:last a').addClass('last-li');

-

$('.list ul li:last-child a');

Maurício 



[jQuery] FadeIn/Out mulitple images in one container

2009-04-02 Thread stinkysGTI

There's a pretty simple image replacement I'm trying to do, but can't
get the current image to fadeOut, and the new one to fadeIn. There's
only 3 images to choose from and always will be. With those 2 lines
commented out, it works, just obviously without any kind of fade. I'm
fairly new to jQuery, so any help would be greatly appreciated.

$(document).ready(function() {
$("#lakeview-gallery a").click(function(event) {
//  $("#lakeview-placeholder").fadeOut(800);
//  $("#lakeview-placeholder").fadeIn(800);
event.preventDefault();
var image = $(this).attr("href");
$("img#lakeview-placeholder").attr("src", image);
});
});


The page can be seen here: http://www.lakeshoremontana.com/dev/floorplans.html


[jQuery] Re: multiple dynamic jcarousel instances

2009-04-02 Thread Jason

Here is an example on how to have multiple jCarousels on one page.
Summary: you need to name each jCarousel with a different ID.

http://sorgalla.com/projects/jcarousel/examples/static_multiple.html


On Apr 2, 12:22 pm, amuhlou  wrote:
> Hello,
>
> I'm working with thejCarouselplugin and would like to have multiple
> carousels on one page, each dynamically pulling the scrolling items
> from an array.  I am wondering what sort of modifications I would need
> to make to the jcarousel_functions.php file and page xhtml to
> accommodate 2+ instances?
>
> Here's my sample:http://static.spartaninternet.com/sandbox/carousel/
>
> And here is the code from the jcarousel_functions.php file:
>
> 
> $jcarousel_items = array(
>     array(
>         'title' => 'Face 1',
>         'src' => 'images/thumbs/beach.jpg',
>
>     ),
>
>     array(
>         'title' => 'Face on a dock',
>         'src' => 'images/thumbs/beach2.jpg',
>
>     ),
>     array(
>         'title' => 'blue monkey face',
>         'src' => 'images/thumbs/beachsunset.jpg',
>
>     ),
>     array(
>         'title' => 'scooter face',
>         'src' => 'images/thumbs/frogs.jpg',
>
>     ),
>     array(
>         'title' => 'fun face',
>         'src' => 'images/thumbs/market.jpg',
>
>     ),
>     array(
>         'title' => 'Flower 6',
>         'src' => 'images/thumbs/monkey.jpg',
>
>     ),
>     array(
>         'title' => 'Flower 7',
>         'src' => 'images/thumbs/monkey2.jpg',
>
>     ),
>     array(
>         'title' => 'Flower 8',
>         'src' => 'images/thumbs/rooftops.jpg',
>
>     ),
>     array(
>         'title' => 'Flower 9',
>         'src' => 'images/thumbs/volcano.jpg',
>
>     ),
>     array(
>         'title' => 'Flower 10',
>         'src' => 'images/thumbs/waterfall.jpg',
>
>     ),
> );
>
> /**
>  * This function returns the number items. Typically, this
>  * would fetch it from a database (SELECT COUNT(*) FROM items) or
>  * from a directory.
>  */
> function jcarousel_countItems()
> {
>         global $jcarousel_items;
>
>         return count($jcarousel_items);
>
> }
>
> /**
>  * This function returns the items. Typically, this
>  * would fetch it from a database (SELECT * FROM items LIMIT $limit
> OFFSET $offset) or
>  * from a directory.
>  */
> function jcarousel_getItems($limit = null, $offset = null)
> {
>         global $jcarousel_items;
>
>         // Copy items over
>         $return = $jcarousel_items;
>
>         if ($offset !== null) {
>                 $return = array_slice($return, $offset);
>         }
>
>         if ($limit !== null) {
>                 $return = array_slice($return, 0, $limit);
>         }
>
>         return $return;
>
> }
>
> ?>
>
> Thanks!


[jQuery] Announcing a new journal for front-end developers

2009-04-02 Thread Martin Streicher


2 April 2009

My name is Martin Streicher. I am pleased to announce three new
publications dedicated to web developers.

Red: The Journal of Ruby Development

Facade: The Journal of Front-end Development

Tabula: The Journal of Open Source Database Development

The three publications obviously have a great number of topics in
common between then, and much that is unique. Where ever possible,
readers will benefit from the synergies and the novelties.


These journals are to be published differently than other periodicals:

1. Each journal is published as frequently as possible so material is
timely and accessible.

2. The price for each journal can therefore vary, depending on the
scope and size of an issue.

3. You will be able to purchase individual articles or an entire issue
of each journal.

4. Each author earns a royalty for the sale or his or her individual
article and the sale of an entire issue in which his or her article
appears.

5. Each author earns a royalty from the advertising bundled in each
article and issue.

6. A portion of all revenue garnered will be awarded as grants to
further the documentation of open source technologies.

7. To guarantee the highest quality technical material, peer technical
reviewers also earn a royalty on publications sold.

8. The publications will be available in PDF form and in print-on-
demand form. (Pricing is to be determined.)

9. Each author retains copyright in his or her work, but grants
exclusive, worldwide, first serial rights to the publication for a
short period of time. Each contributing author will receive an annual
subscription to the journal he or she contributes to.

10. Subscribers will have early access to all articles in
development.

A formal author letter spelling out terms will be available shortly
but will earnestly reflect the principles above to encourage expert
contributions. Each journal will also have its own web site in the
near future.


Effective immediately, I would like to call for contributors. If you
are working in Rails, Ruby, MySQL, SQLite, PostgreSQL, JavaScript,
CSS, ORMs, EC2, S3, CloudFront, provisioning, scaling, and high-
availability, among others, and have an interesting technique, plugin,
technology, or insight, please contact me with a proposal. I'll leave
the proposal format informal for now, but please specify why your
software or approach is novel and would be of interest to your
community and peers.

Here are some story ideas to consider: Rails 2.3 novelties; Chef;
Cucumber; Sass and HAML; MariaDB; embedded search engines; jQuery;
scaling Rails; performance optimizations; sharding; CSS frameworks;
Ruby 1.9; BDD; Ruby Cocoa; PostgreSQL goodies; deployment and
monitoring; best practices; gems; plugins; and more.

You can also feel free to send community events, such as conferences,
meet-ups, lectures, brigades, startup weekends, and hack fests. Each
journal will contain community pages so readers can connect to one
another.

Classified and commercial advertisements are also accepted. You can
advertise your own or your company's services. Please contact me for
rates.


About me: From 2002-2007, I was the Editor-in-Chief of Linux Magazine
and am currently that publication's web development columnist. I am a
regular contributor to IBM developerWorks's Linux and Open Source
Zones, and also write that site's monthly "Speaking Unix" column. I
also contribute to Linux Pro Magazine and to Amazon's Web Services
Developer Center. I am currently a freelance Rails developer and
author -- and now publisher of these journals. I live in Raleigh, NC.
I am an avid comic reader, art collector, foodie, and music fan. I
have two teens, two dogs, and two cats.

I look forward to your questions and proposals.

You can reach me via email, phone, Twitter, and IM.

Email: martin.streic...@gmail.com
GTalk: martin.streicher
iChat and Yahoo: supergiantrobot
Skype: martin.s.streicher
Phone: 919.741.4182
Twitter: martinstreicher
web: http://www.linkedin.com/in/mstreicher

My thanks for your consideration.

--
Martin Streicher, Principal and Publisher
The Pixel, Byte, and Comma Company
Raleigh, NC


[jQuery] Problem with jQuery form pluging redirecting

2009-04-02 Thread David

I use the form plugin
$(document).ready(function() {
var options = {
target:'#divShow',
beforeSubmit:  showRequest,
success:   showResponse
};
$('#myForm').ajaxForm(options);
});

This works, but in the form php file, I'm trying a redirection but the
page redirected displays in #divShow. How can I do to redirect to the
page not to be displayed in the div?

http://localhost/";);
?>
Thanks


[jQuery] Select Last

2009-04-02 Thread Panman

Sounds simple but I cannot get it to work. Here is the structure.


  Abc
  Abc

  Abc
  Abc
  123

  
  Abc
  Abc


I want to get the last  in the _sub_ list. Here is what I've tried
with no success. Ideas?

$('.list li li:last a').addClass('last-li');
$('.list li ul li:last a').addClass('last-li');
$('.list li:has(ul) li:last a').addClass('last-li');


[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Tin

Ravish,
I've added a collapse/expand example to SlickGrid.  Check it out at
http://slickgrid.googlecode.com/svn/trunk/example5-collapsing.html


On Apr 2, 2:31 pm, Jack Killpatrick  wrote:
> Right, I was thinking maybe treetable combined with the quicksearch
> plugin... ie: the quicksearch plugin would search the treetable, but the
> side-effect is that it will show found rows, not correctly expand the
> tree. (so not good).
>
> So yeah, the search continues. I haven't seen a jquery plugin like that
> ext searchable tree. Maybe ask on the jquery-ui list: there's some tree
> work going on there.
>
> - Jack
>
>
>
> Ravish Bhagdev wrote:
> > Yes, it is collapsible but it dosen't have the "filter" or search
> > capability like the filtertree (http://www.extjs.com/explorer/#filtertree)
>
> > So not quite as useful.
>
> > Ravish
>
> > On Thu, Apr 2, 2009 at 9:49 PM, Jack Killpatrick  > > wrote:
>
> >     The treetable plugin (below) is collapsible. You may hit a snag
> >     trying to find something that will open up the "found" node,
> >     though. I'm pretty sure that the quicksearch plugin will just pay
> >     attention to table elements, regardless of their visibility, but
> >     it would not open the parent(s) up the tree.
>
> >     I'm curious if you find something.
>
> >     - Jack
>
> >     Ravish Bhagdev wrote:
> >>     Thanks Jack,
>
> >>     But I'm looking for a tree that is collapsible.  I'm reading
> >>     jquery documentation to see how difficult it will be to implement
> >>     something that keeps index of all nodes in when searching hides
> >>     matching id of node by getting hold of the element.  Sounds a bit
> >>     tricky though :(
>
> >>     Ravish
>
> >>     On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick  >>     > wrote:
>
> >>         If the tree is just a list internally, you might be able to
> >>         use this:
>
> >>        http://rikrikrik.com/jquery/quicksearch/
>
> >>         or maybe use that with this:
>
> >>        http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0
>
> >>         - Jack
>
> >>         Ravish wrote:
> >>         > Hi,
>
> >>         > I've been looking for a tree widget which can be filtered
> >>         or searched
> >>         > by typing keyword in a textbox.  When trees have thousands
> >>         of nodes,
> >>         > its very difficult for users to browse manually.  Has
> >>         anyone ever seen
> >>         > such a widget (jquery based ideally but other will do as
> >>         well).  I am
> >>         > surprised to find that none of the available plugins
> >>         support this
> >>         > feature!
>
> >>         > Thanks


[jQuery] Re: Excluding some children in a selector

2009-04-02 Thread Richard D. Worth
On Thu, Apr 2, 2009 at 4:14 PM, Thierry  wrote:

>
> I have the following structure for tr:
>
> 
>   
>   
>   
>  
>   
> 
>
> I also have the following javascript:
>
> $("#world tr").click(function() {
>   // do stuffs
> });


this selector doesn't seem to match your html, as it reads "all TRs within
the item with an id of world" but the item with an id of world is a TR, and
wouldn't contain any unless you've got nested tables. Perhaps you meant #
world.tr or ?


>
> Is there a way to prevent the above event from triggering when the
> hello button is clicked?


check event.target inside the click callback

$("#world").click(function(event) {
  if (!$(event.target).is("button")) {
//do stuff
  }
});

- Richard


[jQuery] Re: Too much recusion/Out of Memory

2009-04-02 Thread Matt Critchlow

Using the dev version of jquery i got the following for the recursion
issues:

too much recursion
[Break on this error] if ( selector.nodeType ) {
jquery-1.3.2.js (line 41)
too much recursion
[Break on this error] return new jQuery.fn.init( selector, context );
jquery-1.3.2.js (line 26)
too much recursion
[Break on this error] hidden = this.nodeType == 1 && jQuery(this).is
(":hidden"),
jquery-1.3.2.js (line 3871)
too much recursion
[Break on this error] queue[0].call(this);
jquery-1.3.2.js (line 1405)
too much recursion
[Break on this error] var msg = "Error in hook: "+ exc +" fn=\n"+fn
+"\n stack=\n";
firebug-...ervice.js (line 1952)

however in IE i get the following error:
Out of memory  jquery-1.3.2.js, line 1427 character 2

Which is:

context = context || document;


On Apr 2, 11:16 am, Matt Critchlow  wrote:
> I am making a lot of use of jQuery's load method to replace my main
> content, then firing a callback function to either just bind some
> events or do an ajax call to load some data into the page(search
> results for example). I do this in the pageload function for the
> history plugin to manage everything. This all seems very normal and
> trivial to me though(for jQuery to handle), so I'm not sure it has
> anything to do with the issue..
>
> Thanks for sharing your experience too.
>
> On Apr 2, 11:10 am, Donny Kurnia  wrote:
>
> > Matt wrote:
> > > Hi All,
>
> > > I realize this is kind of vague, but I can't link to the site yet
> > > since we're still in development. I'm using the latest jquery, and the
> > > history plugin to dynamically load html into a "main" div section
> > > depending on user action. In Firebug, I sometimes notice 3 "too much
> > > recursion" messages, one in jquery, one in sizzle, and then one in
> > > firebug itself. Then in IE i actually get a message popup that says
> > > "Out of memory". It's frustrating because it doesn't happen every
> > > time, and the site continues to function fine. This feels like a
> > > memory leak to me, but I'm not sure how to dig into it. Does anyone
> > > know anything regarding how the history plugin with the latest version
> > > of jquery might introduce this?
>
> > > Thanks all,
>
> > > Matt
>
> > I got the same message in firebug. I'm only use Malsup's form plugins to
> > submit one form via ajax, and some code to load ajax data as json. I'm
> > still use jquery 1.2.6.
>
> > I never had this message before in old version of firebug. I wonder
> > whether this is firebug's bug, or something else.
>
> > --
> > Donny 
> > Kurniahttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] Re: IE 6 and prepend()

2009-04-02 Thread James

What is your specific check to know that it's not prepending it?
Since I don't know any styles that may be associated with the 'sitm'
class and the context that the div is being prepended to, it's very
difficult to help.

Try using:
$('.listProdImage').prepend('TEST');
to see if the word TEST shows up.

Otherwise, post a demo so that we can look at the issue.

On Apr 2, 9:43 am, bluejohn  wrote:
> hi,
>
> ie6 doesn't desplay the div specified in  prepend() but Firefox does.
> The .css() works fine.
>
> 
>      $(document).ready(function(){
>               $('.listProdImage').prepend('
'); >               $('img.imageBorder').css({'border':'1px solid > #3A91CE'}); >      }); > > > Any suggestions?

[jQuery] Re: Simple selector not working in 1.3.1 and webkit (safari and chrome)

2009-04-02 Thread John Resig

You should remove the @ from your selectors, they're invalid.

--John



On Thu, Apr 2, 2009 at 12:10 PM, ale  wrote:
>
> Hi,
>
> I relative new to JQuery but I have some code that works fine in
> Firefox, IE and Opera, but seem to be having a problem with Chrome and
> Safari.
>
> Here is  part of the code:
>
> $("form#quiz_form_1").submit(function(){
>
>      alert("This is testing");
>
>      $.post("question_result.asp",{ quiz_answer: $("input
> [...@name='quiz_answer_1']:checked").val(), currdiv: $("input
> [...@name='currdiv_1']").val() },
>       function(xml)
>      {
>            question_response(xml);
>       });//end of $.post
>
>       return false;
>  });
>
> here is the function question_response
>
> function question_response(xml)
>        {
>
>                //next div to show
>                var next = $("nextdiv",xml).text();
>                var current = next - 1;
>
>                                 alert("This is test");
>
>
>                //if the it was the correct answer
>                if ( $("answer",xml).text() == "1")
>                {
>                        //display next part of the story
>                        $("#story_"+next).slideToggle("slow");
>
>                        //diplay next quiz
>                        $("#quiz_"+next).slideToggle("slow");
>
>                        //display message to answer
>                        $("#answer_"+current).html($("message",xml).text());
>
>                }
>                else
>                {
>                        //display message
>                        $("#answer_"+current).html($("message",xml).text());
>                }
>    }
>
> I place alert screens for debugging, the alert screen in the function
> question_response is never display in safari or Chrome I don't know if
> there is problem with the Ajax code.
>
> Thanks!
>
>
> On Feb 4, 5:05 am, Javier Martinez  wrote:
>> Sure!
>>
>> Createdhttp://dev.jquery.com/ticket/4058
>>
>> Hope there is some easy patch, if not, I will regret to 1.2.6 inmediately :(
>>
>> 2009/2/3 John Resig 
>>
>>
>>
>>
>>
>> > That's odd. Could you file a bug on this?
>> >http://dev.jquery.com/newticket
>>
>> > Thanks!
>>
>> > --John
>>
>> > On Tue, Feb 3, 2009 at 10:39 AM, Javier Martinez 
>> > wrote:
>> > > I'm creating a component for an application I'm developing and I have
>> > > upgraded jquery to the last version to get it's speed boost.
>> > > After some testing I have seen that my component is not working correctly
>> > in
>> > > webkit browsers because there is some bug with the new Sizzle selector of
>> > > the new jquery.
>> > > I can't provide my source files, but I have created a simple test case
>> > that
>> > > shows this error.
>>
>> > > > > >     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
>> > > http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>> > > 
>> > >     
>> > >     
>> > >     
>> > >         $(function() {
>> > >             var container = $('#container');
>>
>> > >             var containerSelecteds = function() {
>> > >                 return container.find('ul.selected');
>> > >             };
>>
>> > >             var bodySelecteds = function() {
>> > >                 return $('ul.selected');
>> > >             };
>>
>> > >             var select = function(nodes) {
>> > >                 containerSelecteds().removeClass('selected');
>>
>> > >                 nodes.addClass('selected');
>>
>> > >                 // the container html show me that the element has the
>> > class
>> > > "selected"
>> > >                 alert(container.html());
>>
>> > >                 // webkit (chrome and safari) says that there are no
>> > > elements inside of  with the class "selected"
>> > >                 alert(containerSelecteds().length);
>>
>> > >                 // but the element exists in the dom, and it has the
>> > > classname "selected" !!
>> > >                 alert(bodySelecteds().length);
>> > >             };
>>
>> > >             var element = $('
    > > > class="someclass">
  • MyText
').appendTo(container); >> > >             select(element, false); >> > >         }); >> > >     >> > > >> > > >> > >     >> > > >> > > >> >> > > I will try to explain the error: I'm inserting a node inside the >> > "container" >> > > div, and applying a classname "selected" to this node. After this, I want >> > to >> > > select the nodes inside "container" that have this classname. Firefox, >> > IE, >> > > etc, says that there is one node inside "container". But webkit browsers >> > > says that there is a node with this classname in the dom, but not inside >> > > "container". >> >> > > I think that this is a quite simple css selector, so I don't know why it >> > > fails. >> >> > > Thanks. >> >> > > PD: it doesn't fails with jquery 1.2.6- Hide quoted text - >> >> - Show quoted text - >

[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Jack Killpatrick
Right, I was thinking maybe treetable combined with the quicksearch 
plugin... ie: the quicksearch plugin would search the treetable, but the 
side-effect is that it will show found rows, not correctly expand the 
tree. (so not good).


So yeah, the search continues. I haven't seen a jquery plugin like that 
ext searchable tree. Maybe ask on the jquery-ui list: there's some tree 
work going on there.


- Jack

Ravish Bhagdev wrote:
Yes, it is collapsible but it dosen't have the "filter" or search 
capability like the filtertree (http://www.extjs.com/explorer/#filtertree)


So not quite as useful.

Ravish

On Thu, Apr 2, 2009 at 9:49 PM, Jack Killpatrick > wrote:


The treetable plugin (below) is collapsible. You may hit a snag
trying to find something that will open up the "found" node,
though. I'm pretty sure that the quicksearch plugin will just pay
attention to table elements, regardless of their visibility, but
it would not open the parent(s) up the tree.

I'm curious if you find something.

- Jack


Ravish Bhagdev wrote:

Thanks Jack,

But I'm looking for a tree that is collapsible.  I'm reading
jquery documentation to see how difficult it will be to implement
something that keeps index of all nodes in when searching hides
matching id of node by getting hold of the element.  Sounds a bit
tricky though :(

Ravish

On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick mailto:j...@ihwy.com>> wrote:


If the tree is just a list internally, you might be able to
use this:

http://rikrikrik.com/jquery/quicksearch/

or maybe use that with this:

http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0

- Jack



Ravish wrote:
> Hi,
>
> I've been looking for a tree widget which can be filtered
or searched
> by typing keyword in a textbox.  When trees have thousands
of nodes,
> its very difficult for users to browse manually.  Has
anyone ever seen
> such a widget (jquery based ideally but other will do as
well).  I am
> surprised to find that none of the available plugins
support this
> feature!
>
> Thanks
>
>














[jQuery] Re: Excluding some children in a selector

2009-04-02 Thread Mauricio (Maujor) Samy Silva



$("#world tr").click(function() {
  // do stuffs
});

Is there a way to prevent the above event from triggering when the
hello button is clicked?


$("#world tr").click(function() {
   $('input[name="hello"]').attr('disabled', 'disabled');
// do stuffs
});

$('input[name="hello"]').removeAttr('disabled');

Maurício 



[jQuery] Re: Getting all children, not just immediate children??

2009-04-02 Thread Ricardo

I guess div.togglecontainer is not the actual parent of 'this' but a
higher ancestor? Try

$(this).parents('div.togglecontainer:first').find
('div.toggletarget').slideToggle();

On Apr 1, 6:21 pm, Brian Gallagher  wrote:
> Don't know how the space got there, but not in my original.
> I just quickly tried $(this).find("div.toggletarget").slideToggle(); but it
> didn't work as I suspected.
>
> As you can see in my snippit post I left the commented line in :
> $(this).parent('div.togglecontainer').find('div.toggletarget').slideToggle();
>
> The was I see this is : this, the togglebutton, get it's parent
> togglecontainer and find it's child toggletarget. This doesn't work though.
> Is my logic wrong?
>
> Any other ideas?
>
> Thanks
>
> -Brian
>
> On Wed, Apr 1, 2009 at 8:48 PM, mkmanning  wrote:
>
> > siblings() returns..siblings. Brothers/sisters, which aren't
> > descendants.
> > To get immediate children (sons/daughters), use children()
> > To get descendants (sons/daughters, grandchildren, great-
> > grandchildren, etc.) then use find()
>
> > btw, do you mean to have a space here: .slideToggl e(); ?
>
> > On Apr 1, 10:04 am, Hector Virgen  wrote:
> > > $(this).siblings() only returns the immediate descendents of 'this'.
>
> > > Try using $(this).find() instead.
> > > -Hector
>
> > > On Wed, Apr 1, 2009 at 9:28 AM, sinkingfish 
> > wrote:
>
> > > > Hi I trying to write a script which allows for easily hiding and
> > revealing
> > > > content by just specifying the correct class names.
>
> > > > The problem I'm having is that my current script will only toggle
> > elements
> > > > if the 'toggletarget' is a immediate sibling of the 'togglebutton'. My
> > > > problem is that the 'togglebutton' may or may not be nested within
> > div's,
> > > > tables etc.
>
> > > > Is their a way to find all the children of an element? Am I missing
> > > > something?
>
> > > > Ta
>
> > > > $(function(){
> > > >        $("div.togglecontainer span.togglebutton").click(function() {
> > > >                $(this).siblings("div.toggletarget").slideToggle();
>
> > //$(this).parent('div.togglecontainer').find('div.toggletarget').slideToggl
> > e();
> > > >            }).css('cursor', 'pointer');
> > > >        $('div.toggletarget').hide();
> > > > });
> > > > --
> > > > View this message in context:
> > > >http://www.nabble.com/Getting-all-children%2C-not-just-immediate-chil.
> > ..
> > > > Sent from the jQuery General Discussion mailing list archive at
> > Nabble.com.


[jQuery] Re: Too much recusion/Out of Memory

2009-04-02 Thread Matt Critchlow

I know what you're saying, unfortunately i can't share the code right
now.. I'll try and see if i can get it down to a small enough subset
that i could pass something along. I figured i would just put the
issue out there to see if anything obvious clicked for anyone. Not
surprising that it doesn't.

thanks.

On Apr 2, 1:43 pm, Ricardo  wrote:
> Sometimes when I flush my toilet the water takes longer to actually
> come down, I wonder if any of you guys know what could be the problem?
>
> j/k :)
>
> Do you have any code you are allowed to share? Start stripping the JS
> to the point where you only have the code necessary to cause the
> error, then you have an useful test-case.
>
> cheers,
> - ricardo
>
> On Apr 2, 3:33 pm, Matt Critchlow  wrote:
>
> > I should add, sometimes IE gives a stack overflow notice also, but
> > again, not on every load() or history plugin pageload() call. In case
> > this triggers anything in anyone's mind. Thanks.
>
> > On Apr 2, 11:16 am, Matt Critchlow  wrote:
>
> > > I am making a lot of use of jQuery's load method to replace my main
> > > content, then firing a callback function to either just bind some
> > > events or do an ajax call to load some data into the page(search
> > > results for example). I do this in the pageload function for the
> > > history plugin to manage everything. This all seems very normal and
> > > trivial to me though(for jQuery to handle), so I'm not sure it has
> > > anything to do with the issue..
>
> > > Thanks for sharing your experience too.
>
> > > On Apr 2, 11:10 am, Donny Kurnia  wrote:
>
> > > > Matt wrote:
> > > > > Hi All,
>
> > > > > I realize this is kind of vague, but I can't link to the site yet
> > > > > since we're still in development. I'm using the latest jquery, and the
> > > > > history plugin to dynamically load html into a "main" div section
> > > > > depending on user action. In Firebug, I sometimes notice 3 "too much
> > > > > recursion" messages, one in jquery, one in sizzle, and then one in
> > > > > firebug itself. Then in IE i actually get a message popup that says
> > > > > "Outofmemory". It's frustrating because it doesn't happen every
> > > > > time, and the site continues to function fine. This feels like a
> > > > >memoryleak to me, but I'm not sure how to dig into it. Does anyone
> > > > > know anything regarding how the history plugin with the latest version
> > > > > of jquery might introduce this?
>
> > > > > Thanks all,
>
> > > > > Matt
>
> > > > I got the same message in firebug. I'm only use Malsup's form plugins to
> > > > submit one form via ajax, and some code to load ajax data as json. I'm
> > > > still use jquery 1.2.6.
>
> > > > I never had this message before in old version of firebug. I wonder
> > > > whether this is firebug's bug, or something else.
>
> > > > --
> > > > Donny 
> > > > Kurniahttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Ravish Bhagdev
Yes, it is collapsible but it dosen't have the "filter" or search capability
like the filtertree (http://www.extjs.com/explorer/#filtertree)

So not quite as useful.

Ravish

On Thu, Apr 2, 2009 at 9:49 PM, Jack Killpatrick  wrote:

>  The treetable plugin (below) is collapsible. You may hit a snag trying to
> find something that will open up the "found" node, though. I'm pretty sure
> that the quicksearch plugin will just pay attention to table elements,
> regardless of their visibility, but it would not open the parent(s) up the
> tree.
>
> I'm curious if you find something.
>
> - Jack
>
>
> Ravish Bhagdev wrote:
>
> Thanks Jack,
>
> But I'm looking for a tree that is collapsible.  I'm reading jquery
> documentation to see how difficult it will be to implement something that
> keeps index of all nodes in when searching hides matching id of node by
> getting hold of the element.  Sounds a bit tricky though :(
>
> Ravish
>
> On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick  wrote:
>
>>
>> If the tree is just a list internally, you might be able to use this:
>>
>> http://rikrikrik.com/jquery/quicksearch/
>>
>> or maybe use that with this:
>>
>> http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0
>>
>> - Jack
>>
>>
>>
>> Ravish wrote:
>> > Hi,
>> >
>> > I've been looking for a tree widget which can be filtered or searched
>> > by typing keyword in a textbox.  When trees have thousands of nodes,
>> > its very difficult for users to browse manually.  Has anyone ever seen
>> > such a widget (jquery based ideally but other will do as well).  I am
>> > surprised to find that none of the available plugins support this
>> > feature!
>> >
>> > Thanks
>> >
>> >
>>
>>
>>
>>
>>
>
>
> >
>


[jQuery] [Validate] errorClass not set until after invalidHandler is called

2009-04-02 Thread CrabMan

This makes it very difficult to determine which element is causing the
error and execute code in response.

For instance, the following does not work, because there is no way to
determine which input caused the error because the errorClass has not
been set yet when invalidHandler is called:

$('#step_1_form').validate({
rules: {
category_selector: "required",
zip_code: "required"
},
messages: {
category_selector: ""
},
invalidHandler: function() {
if 
($('select[name^="category_selector"][class*="error"]').length >
0)
{
// EXECUTE SOME CODE SPECIFIC TO THIS ERROR
}
}
}


A work around is to use setTimeout, but is obviously an undesirable
hack:

$('#step_1_form').validate({
rules: {
category_selector: "required",
zip_code: "required"
},
messages: {
category_selector: ""
},
invalidHandler: function() {
var displayErrors = function() {
if 
($('select[name^="category_selector"][class*="error"]').length >
0)
{
// EXECUTE SOME CODE SPECIFIC TO THIS ERROR
}
};
setTimeout(displayErrors,10);
}
}


Am I correct? or is there a better way to determine the element
causing the error, and regardless, shouldn't errorClass be set before
invalidHandler is called anyways?


[jQuery] Re: Using Append to Copy Table Row - Would like to Create Unique Ids

2009-04-02 Thread Ricardo

function addTableRow(table) {
 var $tr = $(table).find('tr:last').clone();
 $tr.find('input').attr('id', function(){
  var parts = this.id.match(/(\D+)(\d+)$/);
  return parts[1] + ++parts[2];
 });
 $(table).append($tr);
 return true;
};

cheers,
- ricardo

On Apr 2, 10:09 am, plumwd  wrote:
> I have a form, containing a table with rows of items for users to fill
> in.  I currently have it set up so that the user can add an additional
> row in case they need to add more information.
>
> This works wonderfully, but I'm wondering if there's a way to generate
> a unique id for each cloned field.
>
> My function is currently this:
>
> function addTableRow(table) {
>         $(table).append($(table + ' tr:last').clone());
>         return true;
>   }
>
> and is called from an onclick passing in the table id.
>
> The table row contains the following information:
>
> 
>         
>         ft
>          name="txtBarnRemarks1[]">
>  
>
> What I would like is when I clone the row for the ids to be
> incremented by 1 so the next row would have ids:
>
> txtBarnParts2, txtBarnWidth2, txtBarnRemarks2...and so on.
>
> Is there a way to do this?
>
> Thanks!


[jQuery] Re: Excluding some children in a selector

2009-04-02 Thread Thierry L

The behaviour is the same as before, are there any other suggestions?
I have a partial solution where I add a class to each of the td except
for the one containing the input and run the selector on that class.
It runs as expected but nothing happens when just the table cell is
pressed around the input button.

On Apr 2, 4:41 pm, Eric Garside  wrote:
> $('button', $('#world tr').click(function(){
>         // Do stuff for #world tr onclick
>     })).click(function(e){
>     e.stopImmediatePropagation();
>     return true;
>
> });
>
> On Apr 2, 4:14 pm, Thierry  wrote:
>
>
>
> > I have the following structure for tr:
>
> > 
> >    
> >    
> >    
> >       
> >    
> > 
>
> > I also have the following javascript:
>
> > $("#world tr").click(function() {
> >    // do stuffs
>
> > });
>
> > Is there a way to prevent the above event from triggering when the
> > hello button is clicked?


[jQuery] IE 6 and prepend()

2009-04-02 Thread bluejohn

hi,

ie6 doesn't desplay the div specified in  prepend() but Firefox does.
The .css() works fine.


 $(document).ready(function(){
  $('.listProdImage').prepend('
'); $('img.imageBorder').css({'border':'1px solid #3A91CE'}); }); Any suggestions?

[jQuery] Re: Simple selector not working in 1.3.1 and webkit (safari and chrome)

2009-04-02 Thread ale

Hi,

I relative new to JQuery but I have some code that works fine in
Firefox, IE and Opera, but seem to be having a problem with Chrome and
Safari.

Here is  part of the code:

$("form#quiz_form_1").submit(function(){

  alert("This is testing");

  $.post("question_result.asp",{ quiz_answer: $("input
[...@name='quiz_answer_1']:checked").val(), currdiv: $("input
[...@name='currdiv_1']").val() },
   function(xml)
  {
question_response(xml);
   });//end of $.post

   return false;
 });

here is the function question_response

function question_response(xml)
{

//next div to show
var next = $("nextdiv",xml).text();
var current = next - 1;

 alert("This is test");


//if the it was the correct answer
if ( $("answer",xml).text() == "1")
{
//display next part of the story
$("#story_"+next).slideToggle("slow");

//diplay next quiz
$("#quiz_"+next).slideToggle("slow");

//display message to answer
$("#answer_"+current).html($("message",xml).text());

}
else
{
//display message
$("#answer_"+current).html($("message",xml).text());
}
}

I place alert screens for debugging, the alert screen in the function
question_response is never display in safari or Chrome I don't know if
there is problem with the Ajax code.

Thanks!


On Feb 4, 5:05�am, Javier Martinez  wrote:
> Sure!
>
> Createdhttp://dev.jquery.com/ticket/4058
>
> Hope there is some easy patch, if not, I will regret to 1.2.6 inmediately :(
>
> 2009/2/3 John Resig 
>
>
>
>
>
> > That's odd. Could you file a bug on this?
> >http://dev.jquery.com/newticket
>
> > Thanks!
>
> > --John
>
> > On Tue, Feb 3, 2009 at 10:39 AM, Javier Martinez 
> > wrote:
> > > I'm creating a component for an application I'm developing and I have
> > > upgraded jquery to the last version to get it's speed boost.
> > > After some testing I have seen that my component is not working correctly
> > in
> > > webkit browsers because there is some bug with the new Sizzle selector of
> > > the new jquery.
> > > I can't provide my source files, but I have created a simple test case
> > that
> > > shows this error.
>
> > >  > > � � "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > > http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> > > 
> > > � � 
> > > � � 
> > > � � 
> > > � � � � $(function() {
> > > � � � � � � var container = $('#container');
>
> > > � � � � � � var containerSelecteds = function() {
> > > � � � � � � � � return container.find('ul.selected');
> > > � � � � � � };
>
> > > � � � � � � var bodySelecteds = function() {
> > > � � � � � � � � return $('ul.selected');
> > > � � � � � � };
>
> > > � � � � � � var select = function(nodes) {
> > > � � � � � � � � containerSelecteds().removeClass('selected');
>
> > > � � � � � � � � nodes.addClass('selected');
>
> > > � � � � � � � � // the container html show me that the element has the
> > class
> > > "selected"
> > > � � � � � � � � alert(container.html());
>
> > > � � � � � � � � // webkit (chrome and safari) says that there are no
> > > elements inside of  with the class "selected"
> > > � � � � � � � � alert(containerSelecteds().length);
>
> > > � � � � � � � � // but the element exists in the dom, and it has the
> > > classname "selected" !!
> > > � � � � � � � � alert(bodySelecteds().length);
> > > � � � � � � };
>
> > > � � � � � � var element = $('
    > > class="someclass">
  • MyText
').appendTo(container); > > > � � � � � � select(element, false); > > > � � � � }); > > > � � > > > > > > > > > � � > > > > > > > > > > I will try to explain the error: I'm inserting a node inside the > > "container" > > > div, and applying a classname "selected" to this node. After this, I want > > to > > > select the nodes inside "container" that have this classname. Firefox, > > IE, > > > etc, says that there is one node inside "container". But webkit browsers > > > says that there is a node with this classname in the dom, but not inside > > > "container". > > > > I think that this is a quite simple css selector, so I don't know why it > > > fails. > > > > Thanks. > > > > PD: it doesn't fails with jquery 1.2.6- Hide quoted text - > > - Show quoted text -

[jQuery] LiveQuery / Facebox / IE problem

2009-04-02 Thread Benjamin

Hi.
I am trying to make a form inside a facebox, that submits to an ajax
page (signin.php) and then recieves the result in the facebox.

It works perfectly in FF and safari, but of course not in IE6..

It seems like the form doesnt submit at all, and i have a really hard
time figuring out what is wrong.

I guess this is the code that causes the problem, but tell me if you
need the code of the ajax file as well.


validateSignin = function(result) {

if (result == 1) {

window.location.href = window.location.href;
}

if (result == 2) {

document.getElementById('signin_response').innerHTML= 
'Username or
Password incorrect!';
}
}

$('#signinButton').livequery('click', function(event) {

var http_request = false;

email = document.getElementById('email_f').value;
password = document.getElementById('password_f').value;

$.ajax({
type: 'POST',
url: root+'v2/_ajax/signIn.php',
data: 'email='+email+'&password='+password,
success: function(msg) {

validateSignin(msg);

}
});

return false;
});

The page is located at http://www.thombler.com/myblocs/v2/
Click the sign in button in the top right corner to test the facebox.

Any help will be highly appreciated..!

/Benjamin


[jQuery] Implementing Uploadify in a CakePHP project

2009-04-02 Thread Robert McWay

I am trying to implement the Uploadify jQuery plugin...but am having
trouble calling the upload script specified in the "script"
parameter...This is due to the fact that i am using CakePHP, and the
"Pretty URLs" are breaking it. After some research through this forum,
i came across a post where someone was having a similar problem in
CodeIgniter...The solution was to strip the pagepath variable from the
uploadify script, to allow use of pretty urls...however i still cannot
get the script to find my upload script...

My jQuery function:

$('#PhotoFilename').fileUpload({
  'uploader': '/uploader.swf',
  'script': '/photos/upload',
  'folder': '/app/webroot/files',
  'cancelImg': '/img/cancel.png',
  'multi': true
   });

..from jquery.uploadify: setting the pagepath to nothing...

var f="&pagepath=";

I have tried using a relative path, as well as an absolute path, for
teh "script" parameter, but nothing has worked...Any insight would be
much appreciated...


[jQuery] jQuery Drop Shadows - IE7 Error

2009-04-02 Thread Forrest

I am using the jquery drop shadows plugin. It works fine in Firefox,
but does not show up in IE7, instead it generates error 12949.

Would appreciate some help on this.

Thanks.


[jQuery] IE 6 and prepend()

2009-04-02 Thread bluejohn

Hi,


I IE6 doesn't prepend the html I specify below but firefox works
fine.  The css() works fine.



$(document).ready(function(){
 $('.listProdImage').prepend('
'); $('img.imageBorder').css({'border':'1px solid #3A91CE'}); }); Any suggestions

[jQuery] [validate] errorClass not set until after invalidHandler is called

2009-04-02 Thread CrabMan

This makes it very difficult to determine which element is causing the
error and execute code in response.

For instance, the following does not work, because there is no way to
determin which input caused the error because the errorClass has not
been set yet when invalidHandler is called:

$('#step_1_form').validate({
rules: {
category_selector: "required",
zip_code: "required"
},
messages: {
category_selector: ""
},
invalidHandler: function() {
if 
($('select[name^="category_selector"][class*="error"]').length >
0)
{
// EXECUTE SOME CODE SPECIFIC TO THIS ERROR
}
}
}


A work around is to use setTimeout, but is obviously an undesirable
hack:

$('#step_1_form').validate({
rules: {
category_selector: "required",
zip_code: "required"
},
messages: {
category_selector: ""
},
invalidHandler: function() {
var displayErrors = function() {
if 
($('select[name^="category_selector"][class*="error"]').length >
0)
{
// EXECUTE SOME CODE SPECIFIC TO THIS ERROR
}
};
setTimeout(displayErrors,10);
}
}


Am I correct? or is there a better way to determine the element
causing the error, and regardless, shouldn't errorClass be set before
invalidHandler is called anyways?


[jQuery] async treeview input types

2009-04-02 Thread jkozer

I am relatively new to jquery and have a question about the treeview
control by Jörn Zaefferer. I have done some searching about input
types for this control and have only been able to find the source.php
input using json. I am wondering if this control is open to XML or
unordered list inputs or is it just json? Do I have to use XSL and
convert the XML to json for this to work? I admit that I do not know
much about reading php and unfortunately don't have the time to
learn.


Here is what I have: I am using ASP.NET 2.0. I have an xml file that I
am converting over to a ul using recursive XSL. I display the ul on
the aspx page. I was hoping to be able and fetch the ul asynchronously
from the aspx page to an html page where I have Jörn's async control
set up but it does not seem to be working. When I copy the ul source
from the aspx page to the html page and use the basic scripting
control it works as planned. I know that I have some disconnect
between how the basic and async example work.

I know that Jörn explained how the load function will look for if
($_REQUEST['root'] == "source"): but I know that I am missing
something or perhaps have been looking at this stuff for too long. Has
anyone accomplished anything similar. Thanks in advance for the help



[jQuery] need help: how to pass variable to attr in select statement

2009-04-02 Thread mylok

code like below:
var selectid = Querystring.get("id");
$('div#mainnav .mainnav[alt="selectid?"]').addClass("color");

I want to select element which attr alt = selectid(variable from
querystring). How can I do that? Thanks.


[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Jack Killpatrick
The treetable plugin (below) is collapsible. You may hit a snag trying 
to find something that will open up the "found" node, though. I'm pretty 
sure that the quicksearch plugin will just pay attention to table 
elements, regardless of their visibility, but it would not open the 
parent(s) up the tree.


I'm curious if you find something.

- Jack

Ravish Bhagdev wrote:

Thanks Jack,

But I'm looking for a tree that is collapsible.  I'm reading jquery 
documentation to see how difficult it will be to implement something 
that keeps index of all nodes in when searching hides matching id of 
node by getting hold of the element.  Sounds a bit tricky though :(


Ravish

On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick > wrote:



If the tree is just a list internally, you might be able to use this:

http://rikrikrik.com/jquery/quicksearch/

or maybe use that with this:

http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0

- Jack



Ravish wrote:
> Hi,
>
> I've been looking for a tree widget which can be filtered or
searched
> by typing keyword in a textbox.  When trees have thousands of nodes,
> its very difficult for users to browse manually.  Has anyone
ever seen
> such a widget (jquery based ideally but other will do as well).
 I am
> surprised to find that none of the available plugins support this
> feature!
>
> Thanks
>
>









[jQuery] Re: How to specify a delay with bind?

2009-04-02 Thread Ricardo

There's a plugin called hoverIntent that deals with this exact issue:
http://cherne.net/brian/resources/jquery.hoverIntent.html

- ricardo

On Apr 2, 9:59 am, wjp  wrote:
> Hi,
>
> I have something like:
>
> $('#myDiv').bind("mouseleave",function() {
>     $('#myDiv).slideUp(450);
>
> })
>
> Essentialy I have a give that appears from a click event with some
> content. When the user mouses out of the div it slides away.
> However I'd like to have some for a delay so if the users mouse
> pointer leaves the div but comes back in within 1 sec the div does not
> slide up. THis is to stop the user from accidently moving the mouse
> out whilst moved down the contents of the div.
>
> Any ideas on how I could do this?
> thanks
> Wayne


[jQuery] Re: Too much recusion/Out of Memory

2009-04-02 Thread Ricardo

Sometimes when I flush my toilet the water takes longer to actually
come down, I wonder if any of you guys know what could be the problem?

j/k :)

Do you have any code you are allowed to share? Start stripping the JS
to the point where you only have the code necessary to cause the
error, then you have an useful test-case.

cheers,
- ricardo

On Apr 2, 3:33 pm, Matt Critchlow  wrote:
> I should add, sometimes IE gives a stack overflow notice also, but
> again, not on every load() or history plugin pageload() call. In case
> this triggers anything in anyone's mind. Thanks.
>
> On Apr 2, 11:16 am, Matt Critchlow  wrote:
>
> > I am making a lot of use of jQuery's load method to replace my main
> > content, then firing a callback function to either just bind some
> > events or do an ajax call to load some data into the page(search
> > results for example). I do this in the pageload function for the
> > history plugin to manage everything. This all seems very normal and
> > trivial to me though(for jQuery to handle), so I'm not sure it has
> > anything to do with the issue..
>
> > Thanks for sharing your experience too.
>
> > On Apr 2, 11:10 am, Donny Kurnia  wrote:
>
> > > Matt wrote:
> > > > Hi All,
>
> > > > I realize this is kind of vague, but I can't link to the site yet
> > > > since we're still in development. I'm using the latest jquery, and the
> > > > history plugin to dynamically load html into a "main" div section
> > > > depending on user action. In Firebug, I sometimes notice 3 "too much
> > > > recursion" messages, one in jquery, one in sizzle, and then one in
> > > > firebug itself. Then in IE i actually get a message popup that says
> > > > "Out of memory". It's frustrating because it doesn't happen every
> > > > time, and the site continues to function fine. This feels like a
> > > > memory leak to me, but I'm not sure how to dig into it. Does anyone
> > > > know anything regarding how the history plugin with the latest version
> > > > of jquery might introduce this?
>
> > > > Thanks all,
>
> > > > Matt
>
> > > I got the same message in firebug. I'm only use Malsup's form plugins to
> > > submit one form via ajax, and some code to load ajax data as json. I'm
> > > still use jquery 1.2.6.
>
> > > I never had this message before in old version of firebug. I wonder
> > > whether this is firebug's bug, or something else.
>
> > > --
> > > Donny 
> > > Kurniahttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] Re: Excluding some children in a selector

2009-04-02 Thread Eric Garside

$('button', $('#world tr').click(function(){
// Do stuff for #world tr onclick
})).click(function(e){
e.stopImmediatePropagation();
return true;
});

On Apr 2, 4:14 pm, Thierry  wrote:
> I have the following structure for tr:
>
> 
>    
>    
>    
>       
>    
> 
>
> I also have the following javascript:
>
> $("#world tr").click(function() {
>    // do stuffs
>
> });
>
> Is there a way to prevent the above event from triggering when the
> hello button is clicked?


[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Ravish Bhagdev
Wow!! Look at this: http://www.extjs.com/explorer/#filtertree

This is exactly what I was looking for.  Is there anything similar built
with jquery (my preferred js lib)

Ravish


On Thu, Apr 2, 2009 at 9:30 PM, Ravish Bhagdev wrote:

> Thanks Jack,
>
> But I'm looking for a tree that is collapsible.  I'm reading jquery
> documentation to see how difficult it will be to implement something that
> keeps index of all nodes in when searching hides matching id of node by
> getting hold of the element.  Sounds a bit tricky though :(
>
> Ravish
>
>
> On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick  wrote:
>
>>
>> If the tree is just a list internally, you might be able to use this:
>>
>> http://rikrikrik.com/jquery/quicksearch/
>>
>> or maybe use that with this:
>>
>> http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0
>>
>> - Jack
>>
>>
>>
>> Ravish wrote:
>> > Hi,
>> >
>> > I've been looking for a tree widget which can be filtered or searched
>> > by typing keyword in a textbox.  When trees have thousands of nodes,
>> > its very difficult for users to browse manually.  Has anyone ever seen
>> > such a widget (jquery based ideally but other will do as well).  I am
>> > surprised to find that none of the available plugins support this
>> > feature!
>> >
>> > Thanks
>> >
>> >
>>
>>
>>
>> >>
>>
>


[jQuery] Re: A Tree which can be filtered or searched....

2009-04-02 Thread Ravish Bhagdev
Thanks Jack,

But I'm looking for a tree that is collapsible.  I'm reading jquery
documentation to see how difficult it will be to implement something that
keeps index of all nodes in when searching hides matching id of node by
getting hold of the element.  Sounds a bit tricky though :(

Ravish

On Thu, Apr 2, 2009 at 4:56 PM, Jack Killpatrick  wrote:

>
> If the tree is just a list internally, you might be able to use this:
>
> http://rikrikrik.com/jquery/quicksearch/
>
> or maybe use that with this:
>
> http://blog.cubicphuse.nl/2008/11/12/jquery-treetable-2-0
>
> - Jack
>
>
>
> Ravish wrote:
> > Hi,
> >
> > I've been looking for a tree widget which can be filtered or searched
> > by typing keyword in a textbox.  When trees have thousands of nodes,
> > its very difficult for users to browse manually.  Has anyone ever seen
> > such a widget (jquery based ideally but other will do as well).  I am
> > surprised to find that none of the available plugins support this
> > feature!
> >
> > Thanks
> >
> >
>
>
>
> >
>


[jQuery] Re: Need a jQuery 'equal height columns' script

2009-04-02 Thread sammahoney

Well, I found the original, so here it is -
http://v3.thewatchmakerproject.com/journal/354/equalising-box-baselines-with-javascript

Anyone know of anything similar for jQuery?


[jQuery] [validate] Possible bug (IE 7) when setting error messages after remote validation

2009-04-02 Thread pbarnes

Jörn,

I'm using your jQuery Validation plugin for an ASP.NET site. Because
ASP.NET dynamically generates unfriendly form element names (e.g.,
ctl00$ContentPlaceHolderBody$uxPhoneNumber) I have been replacing the
"name" attribute when the page loads with something more friendly
(e.g., phoneNumber) so that I can use these names in the validation
code (and also so that I only have to hard code ASP.NET id values in
my JavaScript file, instead of both id and name attribute values).

I do the name replacement before calling Validate() on the form.

However, I discovered that this throws an error in IE 7 on fields that
do remote validation and are invalidated. I couldn't figure out the
problem, but it had to do with a name attribute lookup in
jquery.validation.js, and the lookup returning null. This does not
occur for local validation on the same field (e.g., required or
minlength), nor does it occur when the remote validation is true.

All other browsers (Opera 9, FF 3.0, Safari, etc.) showed no errors.
It's only IE 7 (and probably IE 6).

Swapping out the ASP.NET TextBox control with an HTML input field set
to the friendly name I want resolved the issue in IE. So it has
something to do with the name attribute replacement. Very odd.

Patrick


[jQuery] Excluding some children in a selector

2009-04-02 Thread Thierry

I have the following structure for tr:


   
   
   
  
   


I also have the following javascript:

$("#world tr").click(function() {
   // do stuffs
});

Is there a way to prevent the above event from triggering when the
hello button is clicked?


[jQuery] Re: Need a jQuery 'equal height columns' script

2009-04-02 Thread Jack Killpatrick
Ah, I see. Sorry, I hadn't looked at the jsbin link. I don't know of a 
plugin to do something like that, but if your outer container's height 
is specified you could use jquery's .outerHeight({margin:true}) to get 
the height of the DOM nodes above the last one, then subtract that from 
the container height and set the height of the bottom DOM node to the 
remainder. I think.


- Jack

sammahoney wrote:

Thanks for the reply, but unfortunately neither of them are what I
need - I've already tested both. They both only work if the elements
to be equalized are starting on the same row. These two scripts work
by basically finding the height of the tallest column, then applying
it to the shorter columns. But in my case, I need something exactly
like the script I showed in my example - http://jsbin.com/ofehi -
where the 3 boxes are being given different heights so the baseline of
each is on the same row, as opposed to being given all the same
height. I guess it's like an inverted version of the scripts you
listed!

On Apr 2, 6:00 pm, Jack Killpatrick  wrote:
  

http://www.cssnewbie.com/equalheights-jquery-plugin/

http://www.tomdeater.com/jquery/equalize_columns/

- Jack

sammahoney wrote:


Hi All
  
I have an old script for equalizing columns. Can't remember where I

got it, but I need something similar in jQuery - I've found a few so
far, but they all equalize columns that start on the same row on a
page - I need something that can equalize columns that start at
different heights...
  
You can see a basic example of it here -http://jsbin.com/ofehi- you

can view the source to see the script.
  
Any links to jQuery scripts that can do something similar would be

much appreciated.
  
Cheers
  
Sam
  


  




[jQuery] layer DIVs and slide

2009-04-02 Thread Todd

is it possible to have layer DIVs and slide? I am trying to have an
div to slide in and out with the mouseover and mouseleave. I have that
working but I want the image to slide in behind the top div. I tried
the z-index but when the bottom div slides in the top drops below the
div sliding in.


[jQuery] Re: listnav plugin

2009-04-02 Thread Jack Killpatrick
The other day if I looked at the rendered HTML using Firebug, the span 
that you were using was not being displayed (it was hidden on the page), 
but I just looked again and that's not happening now. I ran it through a 
validator and got a message that the id "home" is used more than once 
(once in  and the other in ). You might 
want to fix that and see if anything changes, but I kinda doubt that's 
what's causing the issue.


Hmm, I just noticed this:

type="text/javascript">
type="text/javascript">


Change the order of those: jquery has to be loaded before the script for 
the plugin.


To make the .listNav styling in your common/style.css file get applied 
to the list, also add the class to the div you made for the navigation:




- Jack

Kizzle wrote:

what do you mean hidden in the html? how do you call up the function
and connect it to the list? I'm trying to understand how this works so
i can see where it is faulting. thanks for your help!



On Apr 2, 9:56 am, Kizzle  wrote:
  

I ran it through the validator and no errors that would cause that. I
feel like I am missing something simple. anyone have any suggestions?

On Mar 26, 2:28 pm, Jack Killpatrick  wrote:





Something is causing your glossary-nav span to be hidden in the HTML
(and also not found by the listnav plugin). Try running the HTML through
a validator. I tried seeing what was causing the span to be hidden,
using Firebug, but didn't immediately see the cause.
  
- Jack
  
kristy...@gmail.com wrote:
  

I'm having trouble installing this. Not quite sure why it isn't
working. Does anyone have a tutorial online on how to implement this
or could look over mine and see what i'm doing wrong? I imagine it's
something simple. thanks!

Kristy lee

http://www.klcreativedesign.com/suasion/glossary



  




[jQuery] Re: Cycle plugin and paging


Well I figured it out

[code]
$(document).ready(function(){
$('.rotator').each(function(){
$(this).after('');
$(this).cycle({
fx: 'turnDown',
speed:  'fast',
timeout: 0,
pager:$(this).next()
});
});
});
[/code]

[html]




  






[/html]

hope this helps ohters

Mike

On Apr 2, 2:50 pm, Mean Mike  wrote:
> Hello all
>
> I am trying to work with the cycle plugin and I'm having a bit of a
> problem (what's new?) here is the scenario . I have multiple groups of
> images that I want to cycle but I don't want to target them by id I
> would rather target them by class however I also would like to use
> paging. so I tried this
>
> [code]
>         $(document).ready(function(){
>                 $('.pics')
>                 .after('                         //pager: '#nav'
>                 });
>         });
> [/code]
>
> [html]
>         
>             
>             
>             
>         
>         
>
>         
>             
>             
>             
>         
> [/html]
>
> Does anyone know what I'm doing wrong ?
>
> any help would be greatly appreciated
>
> thanks
> Mike


[jQuery] Re: inserting commas into a price value


Thanks Michael! Works well.
-Adam

On Apr 2, 12:04 pm, mkmanning  wrote:
> http://plugins.jquery.com/project/currencyFormat
>
> On Apr 2, 9:58 am, Adam  wrote:
>
>
>
> > I am trying to manipulate a simple value (text node) which is a home
> > price from 123456789 to be 123,456,789. Anyone have a resource?
> > Thanks!
> > -Adam


[jQuery] multiple dynamic jcarousel instances


Hello,

I'm working with the jCarousel plugin and would like to have multiple
carousels on one page, each dynamically pulling the scrolling items
from an array.  I am wondering what sort of modifications I would need
to make to the jcarousel_functions.php file and page xhtml to
accommodate 2+ instances?

Here's my sample: http://static.spartaninternet.com/sandbox/carousel/

And here is the code from the jcarousel_functions.php file:

 'Face 1',
'src' => 'images/thumbs/beach.jpg',

),

array(
'title' => 'Face on a dock',
'src' => 'images/thumbs/beach2.jpg',

),
array(
'title' => 'blue monkey face',
'src' => 'images/thumbs/beachsunset.jpg',

),
array(
'title' => 'scooter face',
'src' => 'images/thumbs/frogs.jpg',

),
array(
'title' => 'fun face',
'src' => 'images/thumbs/market.jpg',

),
array(
'title' => 'Flower 6',
'src' => 'images/thumbs/monkey.jpg',

),
array(
'title' => 'Flower 7',
'src' => 'images/thumbs/monkey2.jpg',

),
array(
'title' => 'Flower 8',
'src' => 'images/thumbs/rooftops.jpg',

),
array(
'title' => 'Flower 9',
'src' => 'images/thumbs/volcano.jpg',

),
array(
'title' => 'Flower 10',
'src' => 'images/thumbs/waterfall.jpg',

),
);

/**
 * This function returns the number items. Typically, this
 * would fetch it from a database (SELECT COUNT(*) FROM items) or
 * from a directory.
 */
function jcarousel_countItems()
{
global $jcarousel_items;

return count($jcarousel_items);
}

/**
 * This function returns the items. Typically, this
 * would fetch it from a database (SELECT * FROM items LIMIT $limit
OFFSET $offset) or
 * from a directory.
 */
function jcarousel_getItems($limit = null, $offset = null)
{
global $jcarousel_items;

// Copy items over
$return = $jcarousel_items;

if ($offset !== null) {
$return = array_slice($return, $offset);
}

if ($limit !== null) {
$return = array_slice($return, 0, $limit);
}

return $return;
}

?>

Thanks!


[jQuery] Re: Need a jQuery 'equal height columns' script


Here's how my example looks without any script, just so you can see. I
need to go from this - http://jsbin.com/eguze - to this - http://jsbin.com/ofehi

On Apr 2, 7:11 pm, sammahoney  wrote:
> Thanks for the reply, but unfortunately neither of them are what I
> need - I've already tested both. They both only work if the elements
> to be equalized are starting on the same row. These two scripts work
> by basically finding the height of the tallest column, then applying
> it to the shorter columns. But in my case, I need something exactly
> like the script I showed in my example -http://jsbin.com/ofehi-
> where the 3 boxes are being given different heights so the baseline of
> each is on the same row, as opposed to being given all the same
> height. I guess it's like an inverted version of the scripts you
> listed!
>
> On Apr 2, 6:00 pm, Jack Killpatrick  wrote:
>
> >http://www.cssnewbie.com/equalheights-jquery-plugin/
>
> >http://www.tomdeater.com/jquery/equalize_columns/
>
> > - Jack
>
> > sammahoney wrote:
> > > Hi All
>
> > > I have an old script for equalizing columns. Can't remember where I
> > > got it, but I need something similar in jQuery - I've found a few so
> > > far, but they all equalize columns that start on the same row on a
> > > page - I need something that can equalize columns that start at
> > > different heights...
>
> > > You can see a basic example of it here -http://jsbin.com/ofehi-you
> > > can view the source to see the script.
>
> > > Any links to jQuery scripts that can do something similar would be
> > > much appreciated.
>
> > > Cheers
>
> > > Sam


[jQuery] Cycle plugin and paging


Hello all

I am trying to work with the cycle plugin and I'm having a bit of a
problem (what's new?) here is the scenario . I have multiple groups of
images that I want to cycle but I don't want to target them by id I
would rather target them by class however I also would like to use
paging. so I tried this

[code]
$(document).ready(function(){
$('.pics')
.after('











[/html]

Does anyone know what I'm doing wrong ?

any help would be greatly appreciated

thanks
Mike


[jQuery] Re: inserting commas into a price value

Thank you kindly.  I'll be implementing that this evening :)

On Thu, Apr 2, 2009 at 11:33 AM, mkmanning  wrote:

>
> For the phone, you can just do a regex:
>
> var p = '99';
> p.replace(/(\d{3})(\d{3})(\d{4})/, "($1) $2-$3")
>
> On Apr 2, 11:18 am, Charlie Griefer  wrote:
> > nice! :)
> > um... err... I've actually got a need to take a 10 digit number and
> convert
> > it to US phone format (e.g. 99 becomes (999) 999-).  Any
> chance
> > of whipping that up? :)
> >
> > I did look at the plugin you just posted, thinking I could tweak it to
> fit
> > my needs.  But it's a bit over my head :\
> >
> > On Thu, Apr 2, 2009 at 11:04 AM, mkmanning 
> wrote:
> >
> > >http://plugins.jquery.com/project/currencyFormat
> >
> > > On Apr 2, 9:58 am, Adam  wrote:
> > > > I am trying to manipulate a simple value (text node) which is a home
> > > > price from 123456789 to be 123,456,789. Anyone have a resource?
> > > > Thanks!
> > > > -Adam
> >
> > --
> > I have failed as much as I have succeeded. But I love my life. I love my
> > wife. And I wish you my kind of success.
>



-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Wiring using jQuery vs. a static string in onClick


Performance wise, there should not really be any performance issues -
if you do it right.
A good reason to use jQuery for this is to separate coding from
markup, and also your data (RN, Location A, 1 Shift, etc.) from your
coding. Also, like you said, it'll keep the page's filesize small. If
your server supports gzip, it'll be even smaller. If you keep your JS
code on a separate file, minified, and gzipped, it's even better.

The main bottleneck is attaching the onclick event to every link, and
having hundreds of links. This basically would mean you would have to
do an event bind hundreds of times which, processing-wise, will be
slow.
The solution is using event delegation. Basically you just bind an
onclick once to the parent element of all the links (probably your
table). Anytime someone clicks within that element, you'll fire that
click event, which will check whether the user clicked on your valid
link or not (eg. images, or other text within the table). If not,
ignore. If so, do your Javascript.

Since your links will need to provide some kind of reference to the
data, you'll have to give each link a unique id attribute so that your
Javascript code can use to call the associated data with the clicked
link. Hopefully your data does have some kind of unique ID for each
row. All the data you can separate and have organized into JSON
format, or as a set of arrays, whichever you prefer.

Here are some links to get you started on event delegation:
http://www.learningjquery.com/2008/03/working-with-events-part-1
http://lab.distilldesign.com/event-delegation/

Hope that helps.

On Apr 1, 11:42 am, Adam Patt  wrote:
> I am setting an onClick for many rows doing this:
>
> copy
>
> I could set this information as attributes in other parts of the table
> structure to get what I needed to make a way to wire these up via
> jQuery.  I could have hundreds of these links to wire up.  I know that
> my current way will produce more html that the page will have to
> download and process, but is there likely to be any noticeable
> performance difference between doing a static link like this vs.
> jQuery setup in $(document).ready when it comes to page loading or
> general JS page performance?


[jQuery] Re: more than 1 $.getJSON in click event


2009/4/2 James :

Hi James!

> The code looks fine. Have you tried using the Firebug plug-in for
> Firefox to debug the AJAX calls? It can help you see whether the call
> was made, the request data sent, the response data, errors, etc.

I'm using Firebug. The call is working fine. I can see the result
(some string). No errors. Nothing only the string what I want to print
it.

-- 
- -
--  Csanyi Andras  -- http://sayusi.hu -- Sayusi Ando
--  "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell


[jQuery] Re: $.trim(string) or string.trim()


"will jQuery add it in the future"

that doesn't really make sense, as it's a String object thing, not
really a jQuery object thing

and it's super easy to add with one single line

String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,
''); };

bam

var s = "  i am string with whitespace";

s.trim() >   "i am a string with whitespace"



James wrote:
> jQuery does have a trim function:
> http://docs.jquery.com/Utilities/jQuery.trim
> Although it's not in the syntax of "string".trim().
>
> return jQuery != MooTools;
>
> On Apr 1, 5:46 pm, yifang  wrote:
> > mootools support syntax like this "string".trim()
> > will jquery support such features in the future?
> > thanks.


[jQuery] Re: Too much recusion/Out of Memory


I should add, sometimes IE gives a stack overflow notice also, but
again, not on every load() or history plugin pageload() call. In case
this triggers anything in anyone's mind. Thanks.

On Apr 2, 11:16 am, Matt Critchlow  wrote:
> I am making a lot of use of jQuery's load method to replace my main
> content, then firing a callback function to either just bind some
> events or do an ajax call to load some data into the page(search
> results for example). I do this in the pageload function for the
> history plugin to manage everything. This all seems very normal and
> trivial to me though(for jQuery to handle), so I'm not sure it has
> anything to do with the issue..
>
> Thanks for sharing your experience too.
>
> On Apr 2, 11:10 am, Donny Kurnia  wrote:
>
> > Matt wrote:
> > > Hi All,
>
> > > I realize this is kind of vague, but I can't link to the site yet
> > > since we're still in development. I'm using the latest jquery, and the
> > > history plugin to dynamically load html into a "main" div section
> > > depending on user action. In Firebug, I sometimes notice 3 "too much
> > > recursion" messages, one in jquery, one in sizzle, and then one in
> > > firebug itself. Then in IE i actually get a message popup that says
> > > "Out of memory". It's frustrating because it doesn't happen every
> > > time, and the site continues to function fine. This feels like a
> > > memory leak to me, but I'm not sure how to dig into it. Does anyone
> > > know anything regarding how the history plugin with the latest version
> > > of jquery might introduce this?
>
> > > Thanks all,
>
> > > Matt
>
> > I got the same message in firebug. I'm only use Malsup's form plugins to
> > submit one form via ajax, and some code to load ajax data as json. I'm
> > still use jquery 1.2.6.
>
> > I never had this message before in old version of firebug. I wonder
> > whether this is firebug's bug, or something else.
>
> > --
> > Donny 
> > Kurniahttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] Re: inserting commas into a price value


For the phone, you can just do a regex:

var p = '99';
p.replace(/(\d{3})(\d{3})(\d{4})/, "($1) $2-$3")

On Apr 2, 11:18 am, Charlie Griefer  wrote:
> nice! :)
> um... err... I've actually got a need to take a 10 digit number and convert
> it to US phone format (e.g. 99 becomes (999) 999-).  Any chance
> of whipping that up? :)
>
> I did look at the plugin you just posted, thinking I could tweak it to fit
> my needs.  But it's a bit over my head :\
>
> On Thu, Apr 2, 2009 at 11:04 AM, mkmanning  wrote:
>
> >http://plugins.jquery.com/project/currencyFormat
>
> > On Apr 2, 9:58 am, Adam  wrote:
> > > I am trying to manipulate a simple value (text node) which is a home
> > > price from 123456789 to be 123,456,789. Anyone have a resource?
> > > Thanks!
> > > -Adam
>
> --
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] Re: $.trim(string) or string.trim()


jQuery does have a trim function:
http://docs.jquery.com/Utilities/jQuery.trim
Although it's not in the syntax of "string".trim().

return jQuery != MooTools;

On Apr 1, 5:46 pm, yifang  wrote:
> mootools support syntax like this "string".trim()
> will jquery support such features in the future?
> thanks.


[jQuery] Re: more than 1 $.getJSON in click event


The code looks fine. Have you tried using the Firebug plug-in for
Firefox to debug the AJAX calls? It can help you see whether the call
was made, the request data sent, the response data, errors, etc.

On Apr 2, 5:27 am, András Csányi  wrote:
> Hi all!
>
> I want to do the next: I have one string on the website. The user
> click to the string and the click action is run more than 1 $.getJSON
> call.
> Sometimes is needed every call output write on the website. But if I
> put more than 1 $.getJSON call in one click events function (see the
> example) I can write the first $.getJSON call output to the website,
> but the second $.getJSON output I can't write.
>
> I think the code is good because I changed the parameters and always
> the first output is okay.
> So I'm courious what a hell is the problem. I'm not an big javascript
> and jquery magician... :)
>
> Thanks for the help and sorry because of my english ;)
>
> So, here is the source code:
>
> $(document).ready(
>   function() {
>     $("#test").click(
>       function() {
>         $.getJSON("index/test",
>           function(var_982505985){
>             $("#target2").html(var_982505985);});
>         $.getJSON("index/test2",
>           function(var_1366133349){
>             $("#target3").html(var_1366133349);});
>       }
>     )
>   }
> );
>
> --
> - -
> --  Csanyi Andras  --http://sayusi.hu-- Sayusi Ando
> --  "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell


[jQuery] Re: Validation one field depends on the value of another field


The infamous jQuery Validate Plug-in gets the job done:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

On Apr 2, 3:03 am, dremay  wrote:
> Hello,
>
> I want to validate a field by using JQuery and it also need to
> consider the value of another field during the checking.
>
> I have the following:
>
> 
>
> 
>
> When someone press the submit button, i want to validate the place
> value by using Ajax.. And also need to pass the value of region.
>
> Please help me
>
> Thank You


[jQuery] Re: inserting commas into a price value

nice! :)
um... err... I've actually got a need to take a 10 digit number and convert
it to US phone format (e.g. 99 becomes (999) 999-).  Any chance
of whipping that up? :)

I did look at the plugin you just posted, thinking I could tweak it to fit
my needs.  But it's a bit over my head :\

On Thu, Apr 2, 2009 at 11:04 AM, mkmanning  wrote:

>
> http://plugins.jquery.com/project/currencyFormat
>
> On Apr 2, 9:58 am, Adam  wrote:
> > I am trying to manipulate a simple value (text node) which is a home
> > price from 123456789 to be 123,456,789. Anyone have a resource?
> > Thanks!
> > -Adam
>



-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Problem using jquery library in php file


Do you have all of the other required files also? Such as the jQuery
library and jQuery UI library files, CSS files, etc.
It would be helpful if you could provide a link to your page or some
kind of demo of it not working.

On Apr 2, 3:58 am, jusko  wrote:
> I have a little problem. I have a website all implemented with php. So
> all the files have the extension .php.
> The thing is i want to use an jquery accordion but when i link the php
> file, where i have the accordion, to the external jquery library it
> doesnt work.
> I have a main file (main.php) and inside it on a div i have a "include
> menu.php". The menu.php is where the accordion is. I'm able to see the
> accordion on he main.php, but no animation works...just the links on
> the accordion. The slide functions don't work...any thoughts??
>
> Thanks in advance!!!
> Cheers
> Jusko


[jQuery] Re: Too much recusion/Out of Memory


I am making a lot of use of jQuery's load method to replace my main
content, then firing a callback function to either just bind some
events or do an ajax call to load some data into the page(search
results for example). I do this in the pageload function for the
history plugin to manage everything. This all seems very normal and
trivial to me though(for jQuery to handle), so I'm not sure it has
anything to do with the issue..

Thanks for sharing your experience too.

On Apr 2, 11:10 am, Donny Kurnia  wrote:
> Matt wrote:
> > Hi All,
>
> > I realize this is kind of vague, but I can't link to the site yet
> > since we're still in development. I'm using the latest jquery, and the
> > history plugin to dynamically load html into a "main" div section
> > depending on user action. In Firebug, I sometimes notice 3 "too much
> > recursion" messages, one in jquery, one in sizzle, and then one in
> > firebug itself. Then in IE i actually get a message popup that says
> > "Out of memory". It's frustrating because it doesn't happen every
> > time, and the site continues to function fine. This feels like a
> > memory leak to me, but I'm not sure how to dig into it. Does anyone
> > know anything regarding how the history plugin with the latest version
> > of jquery might introduce this?
>
> > Thanks all,
>
> > Matt
>
> I got the same message in firebug. I'm only use Malsup's form plugins to
> submit one form via ajax, and some code to load ajax data as json. I'm
> still use jquery 1.2.6.
>
> I never had this message before in old version of firebug. I wonder
> whether this is firebug's bug, or something else.
>
> --
> Donny Kurniahttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] Re: How to specify a delay with bind?


Something like (untested):

var myTimeout = null;

$('#myDiv').bind("mouseleave", function() {
myTimeout = window.setTimeout(function() {
 $("#myDiv").slideUp(450);
}, 1000);  // <-- 1000ms
});

$('#myDiv').bind("mouseenter",function() {
window.clearTimeout(myTimeout);
});

When you mouseleave, it sets a 1000ms (1 second) timeout, which is
also stored as variable myTimeout. If you mouseenter again, it'll
clear that timeout so it won't execute.

On Apr 2, 2:59 am, wjp  wrote:
> Hi,
>
> I have something like:
>
> $('#myDiv').bind("mouseleave",function() {
>     $('#myDiv).slideUp(450);
>
> })
>
> Essentialy I have a give that appears from a click event with some
> content. When the user mouses out of the div it slides away.
> However I'd like to have some for a delay so if the users mouse
> pointer leaves the div but comes back in within 1 sec the div does not
> slide up. THis is to stop the user from accidently moving the mouse
> out whilst moved down the contents of the div.
>
> Any ideas on how I could do this?
> thanks
> Wayne


[jQuery] Re: Too much recusion/Out of Memory


Matt wrote:
> Hi All,
> 
> I realize this is kind of vague, but I can't link to the site yet
> since we're still in development. I'm using the latest jquery, and the
> history plugin to dynamically load html into a "main" div section
> depending on user action. In Firebug, I sometimes notice 3 "too much
> recursion" messages, one in jquery, one in sizzle, and then one in
> firebug itself. Then in IE i actually get a message popup that says
> "Out of memory". It's frustrating because it doesn't happen every
> time, and the site continues to function fine. This feels like a
> memory leak to me, but I'm not sure how to dig into it. Does anyone
> know anything regarding how the history plugin with the latest version
> of jquery might introduce this?
> 
> Thanks all,
> 
> Matt
> 

I got the same message in firebug. I'm only use Malsup's form plugins to
submit one form via ajax, and some code to load ajax data as json. I'm
still use jquery 1.2.6.

I never had this message before in old version of firebug. I wonder
whether this is firebug's bug, or something else.

--
Donny Kurnia
http://hantulab.blogspot.com
http://www.plurk.com/user/donnykurnia



[jQuery] Re: window.location get a var and its value


Try a function like this:

function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i=0; i 1

(http://www.webdeveloper.com/forum/archive/index.php/t-90289.html)

On Apr 2, 2:58 am, heohni 
wrote:
> Hi,
>
> I have at a certain moment this in my address bar: .search.php?
> search_done=1.
> I need to extract the "search_done" because I want to pass this to a
> function which should check if search_done equals 1 or not.
> Anbody with a hint for me?
>
> Thanks


[jQuery] Re: a better selection method


Much nicer. Thanks for the tip!

On Thu, Apr 2, 2009 at 1:43 PM, mkmanning  wrote:
>
> Actually there's an easier way as long as the links and the items
> being hidden/show have a one-to-one relationship.
>
> $(document).ready(function(){
>  var a = $('ul.selector li a'), div = $('div.youtube').children
> ('div');
>  a.click(function(){
>        $(div.hide().get(a.index(this))).show();
>        return false;
>  });
> }
>
>
> On Apr 2, 9:12 am, brian  wrote:
>> First, I'd change the HTML to:
>>
>> 
>>         one
>>         two
>>         three
>> 
>> 
>>         
>>                 1
>>         
>>         
>>                 2
>>         
>>         
>>                 3
>>         
>> 
>>
>> You should use IDs instead of classes because you want to target a
>> specific element. I left the "selector" class because I figure you may
>> want to have several sets of these items on a page.
>>
>> The ID on the link will be applied to the selector used to target a div.
>>
>> $(function (
>> {
>>         $('.selector a').click(function()
>>         {
>>                 $('#target_' + $(this).attr('id'))
>>                         .siblings('div:visible').hide('fast')
>>                         .end().show('fast');
>>                 return false;
>>         });
>>
>> });
>>
>> I'd probably also change the links for buttons.
>>
>> On Wed, Apr 1, 2009 at 12:09 PM, Johnny  wrote:
>>
>> > Hello, I'm wondering if there is a better method for the following
>> > solution. I would like to find a way to not have to repeat the same
>> > function over and over in jQuery. So for instance, I have a collection
>> > of hidden divs, and a collection of selectors below it to show the
>> > specified div and hide all the others.
>>
>> > 
>> >            
>> >            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
>> > In dignissim, est ut ultricies gravida, est leo euismod libero, ut
>> > commodo massa libero nec felis.
>> >            
>> >            
>> >            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
>> > In dignissim, est ut ultricies gravida, est leo euismod libero, ut
>> > commodo massa libero nec felis.
>> >            
>> >            
>> >            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
>> > In dignissim, est ut ultricies gravida, est leo euismod libero, ut
>> > commodo massa libero nec felis.
>> >            
>> > 
>>
>> >        
>> >            one
>> >            two
>> >            three
>> >         
>>
>> >        $(document).ready(function(){
>> >                $('a.one').click(function() {
>> >                        $('div.1').show('fast')
>> >                        .siblings('div:visible').hide('fast');
>> >                });
>> >                $('a.two').click(function() {
>> >                        $('div.2').show('fast')
>> >                        .siblings('div:visible').hide('fast');
>> >                });
>> >                $('a.three').click(function() {
>> >                        $('div.3').show('fast')
>> >                        .siblings('div:visible').hide('fast');
>> >                });
>> >       });
>>
>> > Is there a way to shorten the jQuery to just one function that works
>> > for each of those cases instead of having to repeat the function for
>> > each class name?
>>
>> > Thanks!


[jQuery] Re: Chrome bug


 is not valid, I think.
You should try:
''
instead.

On Apr 1, 11:59 pm, Javier Martinez  wrote:
> Chrome has errors selecting more than one element where these elements are
> not inserted yet.
>
> Test case (execute this snippet in some page):
>
> alert($('').find('#from,
> #to').length);
>
> The version I'm using is 1.3.2


[jQuery] Re: inserting commas into a price value


http://plugins.jquery.com/project/currencyFormat

On Apr 2, 9:58 am, Adam  wrote:
> I am trying to manipulate a simple value (text node) which is a home
> price from 123456789 to be 123,456,789. Anyone have a resource?
> Thanks!
> -Adam


[jQuery] Too much recusion/Out of Memory


Hi All,

I realize this is kind of vague, but I can't link to the site yet
since we're still in development. I'm using the latest jquery, and the
history plugin to dynamically load html into a "main" div section
depending on user action. In Firebug, I sometimes notice 3 "too much
recursion" messages, one in jquery, one in sizzle, and then one in
firebug itself. Then in IE i actually get a message popup that says
"Out of memory". It's frustrating because it doesn't happen every
time, and the site continues to function fine. This feels like a
memory leak to me, but I'm not sure how to dig into it. Does anyone
know anything regarding how the history plugin with the latest version
of jquery might introduce this?

Thanks all,

Matt


[jQuery] Re: [Validate] Pass on message on success, and have a "start message"


None of these is trivial to implement, but not impossible either.

3. needs a custom method, look at the existing methods and addMethod
for reference: http://docs.jquery.com/Plugins/Validation/Validator/addMethod

2. could be achieved using showErrors, though you'd need to replicate
some of the default functionality

1. sounds like it would be covered by 2. already

Jörn

On Wed, Apr 1, 2009 at 7:32 PM, jo...@retype.se  wrote:
>
> Hello.
>
> I just started implementing the jquery Validate-plugin on a site i'm
> working on.
>
> I'm new to jQuery and have not been deeply interested in javascript
> earlier.
>
> However, everything works fine. Thanks!
>
> I have a few problems though, that i need som help on how to fix.
>
> 1. Im using sucess: "valid" to print a label with the class valid when
> somethings entered correct. Is it possible without to much pain to
> pass on a message to the valid-label? Like "Thats right!". Either one
> globally or even better one for each input.
>
> 2. Is there possible to have a (again without to much work) label
> there from the start, with a separate class containing a hint about
> the input box? Which then switches to .error or .valid when the user
> starts to type in the input?
>
> 3. And a last one, is there possible to validate digits/numbers but
> still allow dashes and whitespaces?
>
> Thanks in advance!
>


[jQuery] Re: a better selection method


Actually there's an easier way as long as the links and the items
being hidden/show have a one-to-one relationship.

$(document).ready(function(){
  var a = $('ul.selector li a'), div = $('div.youtube').children
('div');
  a.click(function(){
$(div.hide().get(a.index(this))).show();
return false;
  });
}


On Apr 2, 9:12 am, brian  wrote:
> First, I'd change the HTML to:
>
> 
>         one
>         two
>         three
> 
> 
>         
>                 1
>         
>         
>                 2
>         
>         
>                 3
>         
> 
>
> You should use IDs instead of classes because you want to target a
> specific element. I left the "selector" class because I figure you may
> want to have several sets of these items on a page.
>
> The ID on the link will be applied to the selector used to target a div.
>
> $(function (
> {
>         $('.selector a').click(function()
>         {
>                 $('#target_' + $(this).attr('id'))
>                         .siblings('div:visible').hide('fast')
>                         .end().show('fast');
>                 return false;
>         });            
>
> });
>
> I'd probably also change the links for buttons.
>
> On Wed, Apr 1, 2009 at 12:09 PM, Johnny  wrote:
>
> > Hello, I'm wondering if there is a better method for the following
> > solution. I would like to find a way to not have to repeat the same
> > function over and over in jQuery. So for instance, I have a collection
> > of hidden divs, and a collection of selectors below it to show the
> > specified div and hide all the others.
>
> > 
> >            
> >            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
> > In dignissim, est ut ultricies gravida, est leo euismod libero, ut
> > commodo massa libero nec felis.
> >            
> >            
> >            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
> > In dignissim, est ut ultricies gravida, est leo euismod libero, ut
> > commodo massa libero nec felis.
> >            
> >            
> >            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
> > In dignissim, est ut ultricies gravida, est leo euismod libero, ut
> > commodo massa libero nec felis.
> >            
> > 
>
> >        
> >            one
> >            two
> >            three
> >         
>
> >        $(document).ready(function(){
> >                $('a.one').click(function() {
> >                        $('div.1').show('fast')
> >                        .siblings('div:visible').hide('fast');
> >                });
> >                $('a.two').click(function() {
> >                        $('div.2').show('fast')
> >                        .siblings('div:visible').hide('fast');
> >                });
> >                $('a.three').click(function() {
> >                        $('div.3').show('fast')
> >                        .siblings('div:visible').hide('fast');
> >                });
> >       });
>
> > Is there a way to shorten the jQuery to just one function that works
> > for each of those cases instead of having to repeat the function for
> > each class name?
>
> > Thanks!


[jQuery] Problem with variable scope


Hi there, I have a quastion for you.

I am developing an application with PHP - JQuery - Google Map.

Here is the link:
http://www.nothingisclear.net/ndovadoIgnition/index.php/newTrip

You can see inside the source page, that I load several js into the
div="wrapper"

Inside newtrip.js i have a initialize two google map object outside
every function:

$(document).ready(function(){

var data = [];
var fromMap = new GMap2(document.getElementById('fromMap'));
var toMap = new GMap2(document.getElementById('toMap'));
var geo = new GClientGeocoder();

$("#fromLocation").focus(function(){
$("#fromMap").show();
loadGoogleMap("fromMap", fromMap);
})


As you can see, I fire the loadGoogleMap function with two parameters:
the div name and the map object.
The loadGoogleMap is situated into the file gmap2.function.je that I
include into the document before the newtrip.js.

We decided to keep the function separated to reach a better code
quality.

My question is, why I have to pass the mapObject as a parameter of the
function?
indeed i have to pass it as a parameter becaouse of the it is nt
reachable

I this that if I declare the frommap object outside every function it
would be global for the page.

Am i wrong??


[jQuery] Re: Need a jQuery 'equal height columns' script


Thanks for the reply, but unfortunately neither of them are what I
need - I've already tested both. They both only work if the elements
to be equalized are starting on the same row. These two scripts work
by basically finding the height of the tallest column, then applying
it to the shorter columns. But in my case, I need something exactly
like the script I showed in my example - http://jsbin.com/ofehi -
where the 3 boxes are being given different heights so the baseline of
each is on the same row, as opposed to being given all the same
height. I guess it's like an inverted version of the scripts you
listed!

On Apr 2, 6:00 pm, Jack Killpatrick  wrote:
> http://www.cssnewbie.com/equalheights-jquery-plugin/
>
> http://www.tomdeater.com/jquery/equalize_columns/
>
> - Jack
>
> sammahoney wrote:
> > Hi All
>
> > I have an old script for equalizing columns. Can't remember where I
> > got it, but I need something similar in jQuery - I've found a few so
> > far, but they all equalize columns that start on the same row on a
> > page - I need something that can equalize columns that start at
> > different heights...
>
> > You can see a basic example of it here -http://jsbin.com/ofehi- you
> > can view the source to see the script.
>
> > Any links to jQuery scripts that can do something similar would be
> > much appreciated.
>
> > Cheers
>
> > Sam


[jQuery] Re: Superfish - missing menu items


well, now in IE my submenus wont work :)

On Apr 2, 11:59 am, mklebel  wrote:
> nevermind, apparently I need to link each menu item, otheriwse it
> ignores it. hmm
>
> On Apr 2, 11:49 am, mklebel  wrote:
>
> >http://rhinotechgroup.com/dev/
>
> > 2 of my parent menu items display, but not the rest of them. I have
> > all of my menu items set to display. They also show up when I view
> > source, but the css is hiding them.


[jQuery] Re: Superfish - missing menu items


nevermind, apparently I need to link each menu item, otheriwse it
ignores it. hmm

On Apr 2, 11:49 am, mklebel  wrote:
> http://rhinotechgroup.com/dev/
>
> 2 of my parent menu items display, but not the rest of them. I have
> all of my menu items set to display. They also show up when I view
> source, but the css is hiding them.


[jQuery] inserting commas into a price value


I am trying to manipulate a simple value (text node) which is a home
price from 123456789 to be 123,456,789. Anyone have a resource?
Thanks!
-Adam


[jQuery] Re: Can't get key capture events to work in ie


So I changed the code from e.which to e.keyCode based on someone
else's entry and it works in Firefox, IE7 and IE8 and Safari. Not sure
if this is the best solution, but it is working right now.
- Mike

On Apr 2, 11:19 am, mberger  wrote:
> The key capture events (keypress, keyup, keydown) all work fine in
> Firefox. But I can't get IE7 to do anything with them. Specifically, I
> am trying to capture the Enter key. I have tried both jquery 1.2.6 and
> 1.3.2
>
> Before trying to do anything with the key capture, this is all I am
> trying to do currently:
>
>   $("input").keydown(function(e){
>     if (e.which == 13){
>      alert("Enter key pressed");
>     }
>   });
>
> I register this event on document ready. As I said, it works fine in
> Firefox and Safari. In ie, the alert does not fire at all. If I try to
> just alert(e.which), the alert fires and says "undefined" for every
> key, and reports correctly in Firefox. Interestingly, the demo 
> athttp://docs.jquery.com/Events/keypressworks fine in ie. However,
> looking at that code its embedded in a frame and in a try catch block
> and in a window.onload, not a jquery document ready. Anyone got
> suggestions?
> Thanks,
> - Mike


[jQuery] Superfish - missing menu items


http://rhinotechgroup.com/dev/

2 of my parent menu items display, but not the rest of them. I have
all of my menu items set to display. They also show up when I view
source, but the css is hiding them.


  1   2   >