[jQuery] Re: IE z-index problems with superfish and jquery.cycle.plugin.

2008-12-03 Thread elvisparsley

I took out relative from the jquery cycle plugin, but superfish still
goes behind the images.

Mm.

Any more help?
Please



[jQuery] Re: IE z-index problems with superfish and jquery.cycle.plugin.

2008-12-03 Thread elvisparsley

Thanks Uwe for your reply.

I read about relative thing.
I haven't tried it yet.

But superfish has relative so that child can have absolute to position
itself.

As you said, it will screw up some parts.

Superfish has bigframe.js for the same problem with frames, but it
does not work for other things.

I will try to remove relative and I will see.

I hope some one will help me out.



[jQuery] Re: IE z-index problems with superfish and jquery.cycle.plugin.

2008-12-03 Thread Uwe C. Schroeder

On Wednesday 03 December 2008, elvisparsley wrote:
> I have images with jquery cycle under superfish.
> Dropdown submenu of superfish over the images goes behind the images.
>
> I put z-index: 100; for the superfish menu and it works with firefox
> but not with IE.
>
> Can anyone help me out with this problem?
>
> Thanks in advance.

I've had a similar problem recently which nobody could answer. However, what I 
found is this:
if you have an element that is floating and has a position of "relative", 
superfish will go below it in all IE versions I have to test (not 
firefox,chrome or safari). Remove the "relative" positioning and everything 
is fine, but it might screw up whichever element you have that shines thru.

I don't know if that's the same issue you have, but symptoms sure look very 
similar.

HTH

Uwe



[jQuery] IE z-index problems with superfish and jquery.cycle.plugin.

2008-12-03 Thread elvisparsley

I have images with jquery cycle under superfish.
Dropdown submenu of superfish over the images goes behind the images.

I put z-index: 100; for the superfish menu and it works with firefox
but not with IE.

Can anyone help me out with this problem?

Thanks in advance.


[jQuery] Re: Is there a createElement equivalent in jQuery?

2008-12-03 Thread Jeffrey Kretz

That represent the element inside a jquery object.

If you did this:

var div = $(document.body).find('div');

You would get an object with a number of jquery specific properties.  Inside
it would be an array of the actual DOM objects it fount.

The same as when you create a new object.

var div = $('').appendTo(document.body);

You can do jquery stuff like div.hide(), but you can also access the
underlying DOM element:

div[0]

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yansky
Sent: Wednesday, December 03, 2008 10:20 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Is there a createElement equivalent in jQuery?



Thanks, I didn't know that you could bind an event handler like that. :)

BTW, does the "var div" now reference the new element, or does it represent
the event handler?


Jeffrey Kretz wrote:
> 
> 
> You can do it this way:
> 
> var div = $('.appendTo(document.body)
>.attr('property',value)
>.css({prop:val})
>.bind('click',fn);
> 
> JK
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Yansky
> Sent: Wednesday, December 03, 2008 9:21 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Is there a createElement equivalent in jQuery?
> 
> 
> 
> Hi, I was just wondering if there was a createElement equivalent in
> jQuery. 
> e.g. var el = document.createElement('div');
> 
> I know I can create it with the inbuilt innerHTML way in jQuery - $(' id="foo" />');
> But I like to add event handlers to the element I've just created without
> having to traverse the dom to find it and then assign an event listener.
> 
> e.g. This is how I like to do it:
> var altPlayerControlsA3 = document.createElement('a');
> altPlayerControlsA3.href='#';
> altPlayerControlsA3.setAttribute('style','margin:5px;');
> altPlayerControlsA3.id="myytplayerControlsMute";  
> altPlayerControlsA3.textContent="Mute";
> altPlayerControlsA3.addEventListener('click', function(e){
> 
>   e.preventDefault();
>   
>   //do stuff
>   
> }, false);
> 
> document.body.appendChild(altPlayerControlsA3);
> 
> but with jQuery I seem to have to do it like this:
> 
> $('body').append(" style="margin:5px;">Mute");
> $('#myytplayerControlsMute').click(function(){...
> 
> Is jQuery able to create elements not using innerHTML?
> -- 
> View this message in context:
>
http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--tp20827
> 512s27240p20827512.html
> Sent from the jQuery General Discussion mailing list archive at
> Nabble.com.
> 
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--tp20827
512s27240p20828020.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: Is there a createElement equivalent in jQuery?

2008-12-03 Thread Yansky


Thanks, I didn't know that you could bind an event handler like that. :)

BTW, does the "var div" now reference the new element, or does it represent
the event handler?


Jeffrey Kretz wrote:
> 
> 
> You can do it this way:
> 
> var div = $('.appendTo(document.body)
>.attr('property',value)
>.css({prop:val})
>.bind('click',fn);
> 
> JK
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Yansky
> Sent: Wednesday, December 03, 2008 9:21 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Is there a createElement equivalent in jQuery?
> 
> 
> 
> Hi, I was just wondering if there was a createElement equivalent in
> jQuery. 
> e.g. var el = document.createElement('div');
> 
> I know I can create it with the inbuilt innerHTML way in jQuery - $(' id="foo" />');
> But I like to add event handlers to the element I've just created without
> having to traverse the dom to find it and then assign an event listener.
> 
> e.g. This is how I like to do it:
> var altPlayerControlsA3 = document.createElement('a');
> altPlayerControlsA3.href='#';
> altPlayerControlsA3.setAttribute('style','margin:5px;');
> altPlayerControlsA3.id="myytplayerControlsMute";  
> altPlayerControlsA3.textContent="Mute";
> altPlayerControlsA3.addEventListener('click', function(e){
> 
>   e.preventDefault();
>   
>   //do stuff
>   
> }, false);
> 
> document.body.appendChild(altPlayerControlsA3);
> 
> but with jQuery I seem to have to do it like this:
> 
> $('body').append(" style="margin:5px;">Mute");
> $('#myytplayerControlsMute').click(function(){...
> 
> Is jQuery able to create elements not using innerHTML?
> -- 
> View this message in context:
> http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--tp20827
> 512s27240p20827512.html
> Sent from the jQuery General Discussion mailing list archive at
> Nabble.com.
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--tp20827512s27240p20828020.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Trouble with Facebox and Ajax submitted form

2008-12-03 Thread benjam

I have a form inside a div that is shown via Facebox.

I seem to be having troubles getting the form to submit via ajax, it
always wants to submit normally.

Here is a test page: http://www.iohelix.net/misc/chat_test/

Any suggestions would be appreciated.


[jQuery] Re: Is there a createElement equivalent in jQuery?

2008-12-03 Thread Jeffrey Kretz

You can do it this way:

var div = $('mailto:[EMAIL PROTECTED] On
Behalf Of Yansky
Sent: Wednesday, December 03, 2008 9:21 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Is there a createElement equivalent in jQuery?



Hi, I was just wondering if there was a createElement equivalent in jQuery. 
e.g. var el = document.createElement('div');

I know I can create it with the inbuilt innerHTML way in jQuery - $('');
But I like to add event handlers to the element I've just created without
having to traverse the dom to find it and then assign an event listener.

e.g. This is how I like to do it:
var altPlayerControlsA3 = document.createElement('a');
altPlayerControlsA3.href='#';
altPlayerControlsA3.setAttribute('style','margin:5px;');
altPlayerControlsA3.id="myytplayerControlsMute";
altPlayerControlsA3.textContent="Mute";
altPlayerControlsA3.addEventListener('click', function(e){

  e.preventDefault();
  
  //do stuff
  
}, false);

document.body.appendChild(altPlayerControlsA3);

but with jQuery I seem to have to do it like this:

$('body').append("Mute");
$('#myytplayerControlsMute').click(function(){...

Is jQuery able to create elements not using innerHTML?
-- 
View this message in context:
http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--tp20827
512s27240p20827512.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: Can I make image change only by part of it?

2008-12-03 Thread David .Wu

Hi, my question is, there are maybe many area in one map, how to show
different pictures when mouse over each of them.

On 11月14日, 上午12時42分, livefree75 <[EMAIL PROTECTED]> wrote:
> I couldn't get your link to load, but it sounds like you may need to
> do something similar to the following.  The image you're mapping would
> need to be either relative or absolutely positioned.
>
> Note that #map_area is the  area you're mousing over.
> #bg_image is the image the map is on.
>
> Not sure if this would work - you may need to get the top/left/width/
> height of the map area some other way.
>
> $("#map_area").mouseover(function()  {
>var bg_image = $("#bg_image");
>var hover_img = document.createElement("img");
>$(hover_img).css({
>   position: 'absolute',
>   top  : $(this).css('top'),
>   left  : $(this).css('left'),
>   zIndex : (bg_image.css("z-index") + 1)
>}).
>   width($(this).width()).
>   height($(this).height()).
>   mouseout(function()  {
>  $(this).remove();
>   }).
>   insertAfter(bg_image);
>
> });
>
> Jamie


[jQuery] Is there a createElement equivalent in jQuery?

2008-12-03 Thread Yansky


Hi, I was just wondering if there was a createElement equivalent in jQuery. 
e.g. var el = document.createElement('div');

I know I can create it with the inbuilt innerHTML way in jQuery - $('');
But I like to add event handlers to the element I've just created without
having to traverse the dom to find it and then assign an event listener.

e.g. This is how I like to do it:
var altPlayerControlsA3 = document.createElement('a');
altPlayerControlsA3.href='#';
altPlayerControlsA3.setAttribute('style','margin:5px;');
altPlayerControlsA3.id="myytplayerControlsMute";
altPlayerControlsA3.textContent="Mute";
altPlayerControlsA3.addEventListener('click', function(e){

  e.preventDefault();
  
  //do stuff
  
}, false);

document.body.appendChild(altPlayerControlsA3);

but with jQuery I seem to have to do it like this:

$('body').append("Mute");
$('#myytplayerControlsMute').click(function(){...

Is jQuery able to create elements not using innerHTML?
-- 
View this message in context: 
http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--tp20827512s27240p20827512.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] drawing on the web fastest!!!

2008-12-03 Thread Dirceu Barquette
Hi there,

I realized new "Isabela Draw" version (1.3).
Now very fast. I've changed the algorithm to "create div elements at run
time". I hope you appreciate.

Ag suggestions and comments are welcome.

Thanks advance.

Dirceu Barquette


[jQuery] Re: Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread ajpiano

in general you can comma separate selectors.

$(".class1,#foo,td");

On Dec 3, 9:36 pm, light-blue <[EMAIL PROTECTED]> wrote:
> Yes, perfect! Thanks!
>
> On Dec 3, 6:00 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
>
> > I would recommend your elements having two classes.  One which stays the
> > same, and the second one which changes.
>
> > e.g.
>
> > 
> > 
> > 
> > 
>
> > Then you could grab it with
>
> > $('div.jcalendar');
>
> > JK
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> > Behalf Of light-blue
> > Sent: Wednesday, December 03, 2008 5:40 PM
> > To: jQuery (English)
> > Subject: [jQuery] Targetting .class-0 .class-1 .class-2 .class-3
>
> > This is a beginner question. Does anyone know how to target
>
> > $('.jquery-calendar-0')
> > $('.jquery-calendar-1')
> > $('.jquery-calendar-2')
> > $('.jquery-calendar-3')
> > etc...
>
> > I need to run the following, where X is the number, but I don't know
> > how many X exist until after the page renders.
> > $('.jquery-calendar-X').calendar( {stuff} )
>
> > I can't find the solution in Learning Jquery (Chaffer and Swedberg),
> > at least not in Chapter 2 How to Get Anything You Want. ;-)
>
> > Thanks!


[jQuery] Re: jQuery.uploader released: Flash based jQuery uploader

2008-12-03 Thread web_dev123

Hey

Just checked the plugin.  Looks awsome.  I'll make sure to implement
on my next project!

Keep it up.

J


[jQuery] Re: Replacing Checkboxes with label + yes/no radiobuttons?

2008-12-03 Thread Sridhar

not sure if there is a plug-in but you can easily achieve this as
follows


jQuery(function($) {
$('input:checkbox').each(function() {
var chk = $(this);
var chkName = chk.attr("name");
chk.replaceWith("Yes No 
"); }); }); On Dec 3, 3:04 pm, Oskar Austegard <[EMAIL PROTECTED]> wrote: > Anyone aware of a plugin that allows you to selectively replace > checkboxes with yes/no radiobuttons? > > i.e. I'd want this: > > > > converted to something like this: > > Yes   name="foo" value="off" />No

[jQuery] jquery.cycle scrollDown FX

2008-12-03 Thread web_dev123

Hey

I'm having issues with the jquery.cycle using the scrollDown fx.
I'm using the following jquery + plugins and I'm pretty sure I'm just
missing a plugin file...





CODE:

$('#newsTicker').cycle({
fx: 'fade',
timeout: 2000,
delay:  -2000

//fx:'scrollDown',
//sync:   0,
//delay: -2000

});

The fade works fine, but when I comments out the fade and 2 other
lines and uncomment the scrollDown pieces of code, nothing displays.

The divs are pretty simple too:


This is where the first news 
article
will go.  We will now
be featuring only one article at a 


This is where the second news 
article
will go.  We will now
be featuring only one article at a 


This is where the third news 
article
will go.  We will now
be featuring only one 



Live example at: http://john1.netfirms.com/VAM/news.html
Any help is appreciated.


[jQuery] Re: jQuery.uploader released: Flash based jQuery uploader

2008-12-03 Thread Methnen

On Nov 28, 6:17 am, "Gilles (Webunity)" <[EMAIL PROTECTED]> wrote:
> Short memo;http://jQuery.webunity.nl/
> Check it out, 2 demo's online!

Giles,

BEAUTIFUL!

I've been looking desperately for something along these lines and have
just run into one dead end after another.

I'm working trying it out without my project right now.

One question.  Your docs and examples don't ever mention, that I can
tell, how the data is handed off to the backend script.  Are the
images just going to be in the $_FILES global (to give a PHP example)?

Jamie


[jQuery] Re: setTimeout function call...

2008-12-03 Thread QuadCom

That is just awesome, thanks very much.

Just like you said, I did see the syntax as setTimeout("funcName()",
2000); everywhere, even on tutorial sites. I could have saved a few
hours, 3 advil and my sanity if I found this out earlier.


[jQuery] Re: setTimeout function call...

2008-12-03 Thread QuadCom

That is just awesome, thanks very much.

Just like you said, I did see the syntax as setTimeout("funcName()",
2000); everywhere, even on tutorial sites. I could have saved a few
hours, 3 advil and my sanity if I found this out earlier.


[jQuery] Re: Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread light-blue

Yes, perfect! Thanks!

On Dec 3, 6:00 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> I would recommend your elements having two classes.  One which stays the
> same, and the second one which changes.
>
> e.g.
>
> 
> 
> 
> 
>
> Then you could grab it with
>
> $('div.jcalendar');
>
> JK
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of light-blue
> Sent: Wednesday, December 03, 2008 5:40 PM
> To: jQuery (English)
> Subject: [jQuery] Targetting .class-0 .class-1 .class-2 .class-3
>
> This is a beginner question. Does anyone know how to target
>
> $('.jquery-calendar-0')
> $('.jquery-calendar-1')
> $('.jquery-calendar-2')
> $('.jquery-calendar-3')
> etc...
>
> I need to run the following, where X is the number, but I don't know
> how many X exist until after the page renders.
> $('.jquery-calendar-X').calendar( {stuff} )
>
> I can't find the solution in Learning Jquery (Chaffer and Swedberg),
> at least not in Chapter 2 How to Get Anything You Want. ;-)
>
> Thanks!


[jQuery] Re: siblings() not working properly in IE7

2008-12-03 Thread Sridhar

can you just post the sample html code and the jquery code you are
using? you can just copy the rendered html and the jquery you are
using and post here.

On Dec 3, 6:47 pm, Marc <[EMAIL PROTECTED]> wrote:
> Has anyone ever seen the behavior where $('#someId').siblings()
> returns an empty set in IE7 while returning a non-empty set in FF3?
> This seems to specifically happen when #someId refers to a 
> element. I can't seem to reproduce the problem for all similar
> situations, but I can't for the life of me figure out why my page is
> inconsistent. I would post a link to the page, but the project is a
> closed system and I can't really open it up.
>
> Thanks,
> Marc


[jQuery] Re: Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread Sridhar

I wonder why you would have a separate css class for each div. you
could do it using the solution given by JK or you could set the id of
each div tag that starts like 'jCalendar' and reference the elements
using the regular expression $('div[id^=jCalendar]')

sridhar.

On Dec 3, 9:00 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> I would recommend your elements having two classes.  One which stays the
> same, and the second one which changes.
>
> e.g.
>
> 
> 
> 
> 
>
> Then you could grab it with
>
> $('div.jcalendar');
>
> JK
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of light-blue
> Sent: Wednesday, December 03, 2008 5:40 PM
> To: jQuery (English)
> Subject: [jQuery] Targetting .class-0 .class-1 .class-2 .class-3
>
> This is a beginner question. Does anyone know how to target
>
> $('.jquery-calendar-0')
> $('.jquery-calendar-1')
> $('.jquery-calendar-2')
> $('.jquery-calendar-3')
> etc...
>
> I need to run the following, where X is the number, but I don't know
> how many X exist until after the page renders.
> $('.jquery-calendar-X').calendar( {stuff} )
>
> I can't find the solution in Learning Jquery (Chaffer and Swedberg),
> at least not in Chapter 2 How to Get Anything You Want. ;-)
>
> Thanks!


[jQuery] Re: Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread Jeffrey Kretz

I would recommend your elements having two classes.  One which stays the
same, and the second one which changes.

e.g.






Then you could grab it with

$('div.jcalendar');

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of light-blue
Sent: Wednesday, December 03, 2008 5:40 PM
To: jQuery (English)
Subject: [jQuery] Targetting .class-0 .class-1 .class-2 .class-3


This is a beginner question. Does anyone know how to target

$('.jquery-calendar-0')
$('.jquery-calendar-1')
$('.jquery-calendar-2')
$('.jquery-calendar-3')
etc...

I need to run the following, where X is the number, but I don't know
how many X exist until after the page renders.
$('.jquery-calendar-X').calendar( {stuff} )

I can't find the solution in Learning Jquery (Chaffer and Swedberg),
at least not in Chapter 2 How to Get Anything You Want. ;-)

Thanks!



[jQuery] Re: listnav plugin

2008-12-03 Thread Jack Killpatrick





I've got a rev almost ready with an onClick (of the nav strip) event
handler option and some options for handling numbers. Your
event-oriented suggestions are good, I'm thinking about them. Re: xhr,
can you elaborate a bit on what you'd be looking for?

Thanks,
Jack

Alexsandro_xpt wrote:

  My examples is about add itens on the list in run-time, xhr, delete in
run-time, events onadd, ondelete.
Things like that above.

On Dec 2, 4:29 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
  
  
Alexsandro, can you give me a few examples, so I can be sure I understand what you're looking for?
Thanks,
Jack
Alexsandro_xpt wrote:Hello all, I would like to add somes methods like refresh/add/remove item from list too. Thz. On 1 dez, 05:04, idgcorp<[EMAIL PROTECTED]>wrote:Hi Jack, thanks for the reply, yes Im just adding/removing via jq Ive created a workaround that solves this one for me. Also I just posted another question, I would love to get this new one solved its driving me nuts!http://groups.google.com/group/jquery-en/browse_thread/thread/d10260b... On Nov 26, 7:58 pm, Jack Killpatrick<[EMAIL PROTECTED]>wrote:Glad you like the plugin. Can you give me a little more about your use case so I'm sure I know what you're asking for? IE, are you just adding/removing LI's?- Jackidgcorp wrote:I have implemented this 
awesome plugin with great success and would like to know if its possible to refresh the plugin after appending/ removing data from the list.Can I break the connection and then rebind the data?

  
  
  







[jQuery] Targetting .class-0 .class-1 .class-2 .class-3

2008-12-03 Thread light-blue

This is a beginner question. Does anyone know how to target

$('.jquery-calendar-0')
$('.jquery-calendar-1')
$('.jquery-calendar-2')
$('.jquery-calendar-3')
etc...

I need to run the following, where X is the number, but I don't know
how many X exist until after the page renders.
$('.jquery-calendar-X').calendar( {stuff} )

I can't find the solution in Learning Jquery (Chaffer and Swedberg),
at least not in Chapter 2 How to Get Anything You Want. ;-)

Thanks!


[jQuery] Re: How to animate frameset properties?

2008-12-03 Thread ricardobeat

You can only animate CSS properties, the col width is not one of them.
Get rid of the frames and use some clean code :)

On Dec 3, 9:40 pm, andriscs <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I know it's kinda lame, but I should animate the setting of a
> frameset's cols property.
> So far I managed to learn that html properties can be animated using
> anime({prop:”value”},duration)
> I created for example a font size changer using that code.
> As I work now with frames, I tried to modify a frameset’s properties:
> first I used the following code:
> top.$("#main_frame").attr("cols","0%,*");
> It worked fine, the left frame disappeared. I just wanted to make it
> with animation, so I tried the following:
> top.$("#main_frame").animate({cols:"0%,*"},600);
> but nothing happened. Is it because attribute ’cols’ cannot be
> animated by jQuery’s inner mechanism? Honestly, I don’t feel much
> difference between animating width property and cols property. Do you
> have any idea of how to animate that kind of operation?
> If not possbile what else solution would you suggest me to hide a left
> sided navigation menu that resides in a frame?


[jQuery] TableSorter + Validate problem

2008-12-03 Thread jsrobinson

Problem: Can't use Validate on forms inside a table sorted by
TableSorter

I have a table with rows, each row is a form. I run TableSorter on it
at load time to sort on default columns. When I click submit for a
given form/row, Validate validates the wrong form. When I turn off
the
default sort, Validate works fine.

I have tried:

1) Giving each form it's own id
2) use validate() + classes
3) use validate(rules:{...})

Any ideas?

The actual application is not available publically (of course) so I
have boiled it down into an example:
http://jquery.magiclamp.net/validate-tablesorter.html
Clicking on any submit button after the first will try to validate
the
first form.

Thank you in advance for any help that might be provided!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: validate - can a call a function only if the form is validated?

2008-12-03 Thread squiddy

Hey,

I didn't work with validation in jQuery yet, but I assume you are
talking about http://docs.jquery.com/Plugins/Validation here?
You could use the submitHandler option to define your own callback
function (see http://docs.jquery.com/Plugins/Validation/validate#options).

$("#my_form").validate({
   submitHandler: function(form) {
// do your stuff here

form.submit();
   }
})

Same goes for invalidHandler, if the input is not valid.

squiddy

On 4 Dez., 00:19, thought <[EMAIL PROTECTED]> wrote:
> Hi.
> I'm using jquery.validate for a contact form.
>
> I'd like to know how to add behaviours conditional to the success of
> the form validation.
>
> Like, if the form has been validated, I'd like to go ahead with some
> DOM manipulations or a redirect.
>
> Is this possible?
>
> Thanks


[jQuery] siblings() not working properly in IE7

2008-12-03 Thread Marc

Has anyone ever seen the behavior where $('#someId').siblings()
returns an empty set in IE7 while returning a non-empty set in FF3?
This seems to specifically happen when #someId refers to a 
element. I can't seem to reproduce the problem for all similar
situations, but I can't for the life of me figure out why my page is
inconsistent. I would post a link to the page, but the project is a
closed system and I can't really open it up.

Thanks,
Marc


[jQuery] validate - can a call a function only if the form is validated?

2008-12-03 Thread thought

Hi.
I'm using jquery.validate for a contact form.

I'd like to know how to add behaviours conditional to the success of
the form validation.

Like, if the form has been validated, I'd like to go ahead with some
DOM manipulations or a redirect.

Is this possible?

Thanks


[jQuery] How to animate frameset properties?

2008-12-03 Thread andriscs

Hi,

I know it's kinda lame, but I should animate the setting of a
frameset's cols property.
So far I managed to learn that html properties can be animated using
anime({prop:”value”},duration)
I created for example a font size changer using that code.
As I work now with frames, I tried to modify a frameset’s properties:
first I used the following code:
top.$("#main_frame").attr("cols","0%,*");
It worked fine, the left frame disappeared. I just wanted to make it
with animation, so I tried the following:
top.$("#main_frame").animate({cols:"0%,*"},600);
but nothing happened. Is it because attribute ’cols’ cannot be
animated by jQuery’s inner mechanism? Honestly, I don’t feel much
difference between animating width property and cols property. Do you
have any idea of how to animate that kind of operation?
If not possbile what else solution would you suggest me to hide a left
sided navigation menu that resides in a frame?



[jQuery] Re: change image background

2008-12-03 Thread squiddy

Hi,

how about checking the current background image directly instead of
toggling a variable?

var image = $('#chess-board-flip').css('background-image');
if(image == 'url(a.jpg')) {
  $('#chess-board-flip').css('background-image', 'url(b.jpg');
} else {
  $('#chess-board-flip').css('background-image', 'url(a.jpg');
}

squiddy


On 3 Dez., 22:58, "Alfredo Alessandrini" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've write this function:
>
> http://dpaste.com/95869/
>
> for change the background image on mouse click
>
> My problem is that there are others funcions that can change the
> background image, and my the function must change the images whatever
> it is:
>
> if there is the image "bw-board2.png" change with "bw-board.png" and 
> viceversa.
>
> There is a better system for write my function?
>
> Thanks,
>
> Alfredo


[jQuery] Re: setTimeout function call...

2008-12-03 Thread Balazs Endresz

You can see setTimeout("funcName()", 2000); everywhere on the net but
it's actually quite ridiculous as it's much easier (and faster) to
just pass a function reference to it like this:

setTimeout(sendit, 2000);

also this will solve the scoping issues as well.

If you want to pass some arguments too then:

setTimeout(function(){
  sendit(a,b)
}, 2000);

On Dec 3, 11:13 pm, QuadCom <[EMAIL PROTECTED]> wrote:
> Holy @!$! that was fast. Thanks guys,
>
> This is all in doc.ready. If I move the regular functions out, I
> cannot use the 'olde' var in them. If I set the 'olde' var outside of
> doc.ready, I can't use it inside doc.ready.
>
> I'm sure there is a simple fix for this but the little grey cells are
> smoking already.
>
> [code]
>
> // get the original email address for comparison
> var olde = $('#editaemail').val();
>
> // Define global error vars
> var emailerror = 0;
> var passworderror = 0;
>
> // Save button on form starts the whole thing
> $('#editasave').click(function(){
>         newe = $('#editaemail').val();
>         url = '/myaccount/process.cfm?t=' + new  Date().getTime();
>         $('#editasave').attr("disabled","disabled").attr("value","One
> Moment");
>         if(olde != newe){
>                 $('#editasave').attr("value","Checking Email");
>                 $.post(url, {checkname: newe}, chkmail, "json");
>         }
>         else{
>                 $('#emailerror, .emailerror').hide();
>                 emailerror = 0;
>                 checkeditapass();
>         }
>
> });
>
> // Checks the results of the post call to see if the email already
> exists in the DB
> // Displays error information and sets appropriate vars in the case of
> an error
> function chkmail(data){
>         if (data.exists == 1){
>                 $('#emailerror, .emailerror').show();
>                 emailerror = 1;
>         }
>         else{
>                 $('#emailerror, .emailerror').hide();
>                 var olde = $('#editaemail').val();
>                 emailerror = 0;
>         }
>
>         //These always cause an 'undefined' error when the function is
> included within doc.ready
>         setTimeout("checkeditapass()", 2000);
>
> }
>
> // Checks the password fields to make sure they are the same
> // Displays error information and sets appropriate vars in the case of
> an error
> function checkeditapass(){
>         $('#editasave').attr("value","Checking Passwords");
>         p1 = $('#editapassword1').val();
>         p2 = $('#editapassword2').val();
>
>         if (p1 != p2){
>                 $('#passerror, .passerror').show();
>                 passworderror = 1;
>         }
>
>         else{
>                 $('#passerror, .passerror').hide();
>                 passworderror = 0;
>         }
>
>         //These always cause an 'undefined' error when the function is
> included within doc.ready
>         setTimeout("checkeditavars()", 2000);
>
> }
>
> // Checks the global error vars and only submits the form if there are
> no errors
> function checkeditavars(){
>         if(emailerror == 0 && passworderror == 0) {
>                 $('#editasave').attr("value","Saving Changes");
>                 setTimeout("sendit()", 2000);
>         }
>
>         else
>         {
>                 $('#editasave').removeAttr("disabled").attr("value","Save 
> Changes");
>         }
>
> }
>
> // Actually sends the form data through form plugin and unblocks the
> UI
> function sendit(){
>         $('#editaform').ajaxSubmit(function(){
>                 $('#editasave').attr("value","Changes Saved");
>                 url = '/myaccount/process.cfm?getdetail=1&t=' + new  
> Date().getTime
> ();
>                 $('#accountcontent').load(url, function(){
>                         $.unblockUI();
>                 });
>         });}
>
> [/code]


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread SLR

> Even more than that, if you were to return $(this) you wouldn't be chaining
> on the original object.
>
>     // Return the same object that this function was
>     // called as a method of (i.e. the jQuery object).
>     return this;
>
>     // Return a *new* jQuery object that contains the
>     // same DOM elements as this (probably not what
>     // you want).
>     return $(this);

That helped clear up some confusion on my part...


> Thomas, you're right that there's nothing new about chaining. Sometimes
> people think that jQuery introduced the technique, but it's been common
> practice in JavaScript and other languages for a long time. For example:
>
>     var s1 = 'Testing 123';
>     var s2 = s1.replace( '123', '456' ).toUpperCase();

You're dead on. I really did think this was a new scripting technique.
For whatever reason, I completely forgot that you can do this in the
core JS language.


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread Michael Geary
Even more than that, if you were to return $(this) you wouldn't be chaining
on the original object.
 
// Return the same object that this function was
// called as a method of (i.e. the jQuery object).
return this;
 
// Return a *new* jQuery object that contains the
// same DOM elements as this (probably not what
// you want).
return $(this);
 
Thomas, you're right that there's nothing new about chaining. Sometimes
people think that jQuery introduced the technique, but it's been common
practice in JavaScript and other languages for a long time. For example:
 
var s1 = 'Testing 123';
var s2 = s1.replace( '123', '456' ).toUpperCase();
 
-Mike


  _  

From: Brandon Aaron

Just a quick clarification on this. The this keyword within the "newMethod"
plugin you just made is already the jQuery object. All you need to do is
return this;


--
Brandon Aaron


On Wed, Dec 3, 2008 at 1:01 PM, 703designs <[EMAIL PROTECTED]> wrote:



There's nothing special about chaining methods. You can do it in most
decent languages (in PHP, you could design methods to allow something
like: $toys->addNew("Block")->delete();) and all it involves is
returning an instance of the current object. It's not a performance
hit by any means.

A chainable method, in jQuery, is written:

$.fn.newMethod = function() {
   // Function body...
   return $(this);
}

As you can see, all that's happening is "this" is being converted to a
jQuery object (defined by jQuery and its alias "$") and returned.

Thomas



[jQuery] Re: setTimeout function call...

2008-12-03 Thread QuadCom

Holy @!$! that was fast. Thanks guys,

This is all in doc.ready. If I move the regular functions out, I
cannot use the 'olde' var in them. If I set the 'olde' var outside of
doc.ready, I can't use it inside doc.ready.

I'm sure there is a simple fix for this but the little grey cells are
smoking already.


[code]

// get the original email address for comparison
var olde = $('#editaemail').val();

// Define global error vars
var emailerror = 0;
var passworderror = 0;




// Save button on form starts the whole thing
$('#editasave').click(function(){
newe = $('#editaemail').val();
url = '/myaccount/process.cfm?t=' + new  Date().getTime();
$('#editasave').attr("disabled","disabled").attr("value","One
Moment");
if(olde != newe){
$('#editasave').attr("value","Checking Email");
$.post(url, {checkname: newe}, chkmail, "json");
}
else{
$('#emailerror, .emailerror').hide();
emailerror = 0;
checkeditapass();
}
});


// Checks the results of the post call to see if the email already
exists in the DB
// Displays error information and sets appropriate vars in the case of
an error
function chkmail(data){
if (data.exists == 1){
$('#emailerror, .emailerror').show();
emailerror = 1;
}
else{
$('#emailerror, .emailerror').hide();
var olde = $('#editaemail').val();
emailerror = 0;
}

//These always cause an 'undefined' error when the function is
included within doc.ready
setTimeout("checkeditapass()", 2000);

}

// Checks the password fields to make sure they are the same
// Displays error information and sets appropriate vars in the case of
an error
function checkeditapass(){
$('#editasave').attr("value","Checking Passwords");
p1 = $('#editapassword1').val();
p2 = $('#editapassword2').val();

if (p1 != p2){
$('#passerror, .passerror').show();
passworderror = 1;
}

else{
$('#passerror, .passerror').hide();
passworderror = 0;
}

//These always cause an 'undefined' error when the function is
included within doc.ready
setTimeout("checkeditavars()", 2000);

}

// Checks the global error vars and only submits the form if there are
no errors
function checkeditavars(){
if(emailerror == 0 && passworderror == 0) {
$('#editasave').attr("value","Saving Changes");
setTimeout("sendit()", 2000);
}

else
{
$('#editasave').removeAttr("disabled").attr("value","Save 
Changes");
}
}

// Actually sends the form data through form plugin and unblocks the
UI
function sendit(){
$('#editaform').ajaxSubmit(function(){
$('#editasave').attr("value","Changes Saved");
url = '/myaccount/process.cfm?getdetail=1&t=' + new  
Date().getTime
();
$('#accountcontent').load(url, function(){
$.unblockUI();
});
});
}
[/code]


[jQuery] Re: setTimeout function call...

2008-12-03 Thread SLR

> When I run into this, I put my functions outside the doc.ready.block,
> but call them from within it. Then they can share vars.

Without any code, it's pretty hard to help troubleshoot issues...

But if I had to take a wild guess, I'd say it was a scoping issue.

The setTimeOut function excutes from the Window Object so it cannot
see local variables in the document.ready block.


[jQuery] change image background

2008-12-03 Thread Alfredo Alessandrini

Hi,

I've write this function:

http://dpaste.com/95869/

for change the background image on mouse click

My problem is that there are others funcions that can change the
background image, and my the function must change the images whatever
it is:

if there is the image "bw-board2.png" change with "bw-board.png" and viceversa.

There is a better system for write my function?


Thanks,

Alfredo


[jQuery] Re: setTimeout function call...

2008-12-03 Thread RyOnLife

When I run into this, I put my functions outside the doc.ready.block,
but call them from within it. Then they can share vars.


[jQuery] Re: setTimeout function call...

2008-12-03 Thread Eric Martin

Yeah - some sample code would help...

On Dec 3, 1:52 pm, QuadCom <[EMAIL PROTECTED]> wrote:
> I am trying to use setTimeout to call another function. Everytime I
> put the functions I wish to call within the doc.ready block, I get
> errors stating that the function is undefined. If I move it out of the
> doc.ready block it works fine.
>
> The problem is I can't share vars between teh doc.ready block and any
> functions outside of the doc.ready block.
>
> I've been coding all day so my eyes are screwed, if you need to see
> some code I can put some up.
>
> Thanks everyone.


[jQuery] setTimeout function call...

2008-12-03 Thread QuadCom

I am trying to use setTimeout to call another function. Everytime I
put the functions I wish to call within the doc.ready block, I get
errors stating that the function is undefined. If I move it out of the
doc.ready block it works fine.

The problem is I can't share vars between teh doc.ready block and any
functions outside of the doc.ready block.

I've been coding all day so my eyes are screwed, if you need to see
some code I can put some up.


Thanks everyone.


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread SLR



On Dec 3, 12:59 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> That is half correct.
>
> Obj.method1().method2().method3()
>
> method1 return the modified original object, not a brand-new object.
>
> You could do this:
>
> var obj = $('#elementid');
> obj.method1();
> obj.method2();
> obj.method3();
>
> And it would be the same (with the same performance) of:
>
> $('#elementid').method1().method2().method3();

Ahh, that clears it things up.

> Personally, I like chaining because it makes for tighter code.  You can also
> do something like this:
>
> $('#elementid').addClass('someclass')
>     .children('div')
>         .addClass('someclass')
>     .end()
>     .find('ul')
>         .show();
>
> That will find the element, add the class, then find the child divs and add
> the class, then revert to the original element (#elementid) and then find
> any ULs and show them.
>

Yeah, I can see how that makes the code a lot more compact. Thanks for
the great response.


[jQuery] Re: Making an Element Fly to a New Position on the Page?

2008-12-03 Thread Vik

Fantastic. Thanks very much.

On Dec 3, 1:01 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
> http://docs.jquery.com/Effects/animate
>
> You'd do something like:
>
> $('.newdate').animate({
>    top: '200px',
>    left: '50px'
>
> },800);
>
> - ricardo
>
> On Dec 3, 4:12 pm, Vik <[EMAIL PROTECTED]> wrote:
>
> > On the NetFlix site, if you assign the movie a new position in the
> > Queue, the movie flies to the correct new position on its own, without
> > being dragged there.
>
> > I have a similar situation. I have list of items with dates.  They
> > appear on the page sorted by date. I permit the user to assign a new
> > date to an item.  After I determine the correct new position on the
> > page for this item, based on the new date, is there a way to have this
> > item fly to its new position on the page, without having the user
> > manually drag it there?
>
> > Thanks in advance to all for any info.


[jQuery] Re: Hover Repeats Over and Over...

2008-12-03 Thread ricardobeat



On Dec 3, 4:23 pm, brian <[EMAIL PROTECTED]> wrote:
>  Also, because jQuery
> animations cannot be stopped once they've started it's best not to
> start them prematurely.
> -- snip --

That's not the case; you can stop any animation, jumping to the end of
it or not.

cheers,
- ricardo


[jQuery] Re: Making an Element Fly to a New Position on the Page?

2008-12-03 Thread ricardobeat

http://docs.jquery.com/Effects/animate

You'd do something like:

$('.newdate').animate({
   top: '200px',
   left: '50px'
},800);

- ricardo

On Dec 3, 4:12 pm, Vik <[EMAIL PROTECTED]> wrote:
> On the NetFlix site, if you assign the movie a new position in the
> Queue, the movie flies to the correct new position on its own, without
> being dragged there.
>
> I have a similar situation. I have list of items with dates.  They
> appear on the page sorted by date. I permit the user to assign a new
> date to an item.  After I determine the correct new position on the
> page for this item, based on the new date, is there a way to have this
> item fly to its new position on the page, without having the user
> manually drag it there?
>
> Thanks in advance to all for any info.


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread Jeffrey Kretz

That is half correct.

Obj.method1().method2().method3()

method1 return the modified original object, not a brand-new object.

You could do this:

var obj = $('#elementid');
obj.method1();
obj.method2();
obj.method3();

And it would be the same (with the same performance) of:

$('#elementid').method1().method2().method3();

Personally, I like chaining because it makes for tighter code.  You can also
do something like this:

$('#elementid').addClass('someclass')
.children('div')
.addClass('someclass')
.end()
.find('ul')
.show();

That will find the element, add the class, then find the child divs and add
the class, then revert to the original element (#elementid) and then find
any ULs and show them.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of SLR
Sent: Wednesday, December 03, 2008 12:21 PM
To: jQuery (English)
Subject: [jQuery] Re: How beneficial is chaining methods?"


> > > One advantage to doing this
>
> > > $("#Results").html("Some Text").show();
>
> > > over this
>
> > > $("#Results").html("Some Text");
> > > $("#Results").show();
>
> > > would be that the script doesn't have to retrieve that wrapped set a
> > > second time

That's a good point. In this case, chaining would reduce overhead.






> > A chainable method, in jQuery, is written:
>
> > $.fn.newMethod = function() {
> >    // Function body...
> >    return $(this);
> > }
>
> > As you can see, all that's happening is "this" is being converted to a
> > jQuery object (defined by jQuery and its alias "$") and returned.

> Just a quick clarification on this. The this keyword within the
"newMethod"
> plugin you just made is already the jQuery object. All you need to do is
> return this;

So if I understand this correctly, essentially the line is execute
from left to right and returns the current object after each method
completes?

For Example:

Obj.method1().method2().method3()

This would do the following:
1)   Calls method 1 for the orignal Obj
2)   Calls method 2  for the obj that is returned from method 1
3)   Calls method 3 for the obj returned from method 2
4)   etc...

Is this correct?



[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread ricardobeat



On Dec 3, 6:21 pm, SLR <[EMAIL PROTECTED]> wrote:
> So if I understand this correctly, essentially the line is execute
> from left to right and returns the current object after each method
> completes?
>
> For Example:
>
> Obj.method1().method2().method3()
>
> This would do the following:
> 1)   Calls method 1 for the orignal Obj
> 2)   Calls method 2  for the obj that is returned from method 1
> 3)   Calls method 3 for the obj returned from method 2
> 4)   etc...
>
> Is this correct?

Yeap!

See John Resig's post for a discussion about 'ultra-chaining':
http://ejohn.org/blog/ultra-chaining-with-jquery/

- ricardo



[jQuery] Re: URGENT, URGENTE

2008-12-03 Thread ricardobeat

http://virusbusters.itcs.umich.edu//hoaxes/virtual.html
http://us.mcafee.com/virusInfo/default.asp?id=description&virus_k=98893

:]

On Dec 3, 4:56 pm, "diego valobra" <[EMAIL PROTECTED]> wrote:
> 02 dicembre alle ore 22.25
> Rispondi Di a tutti i tuoi contatti della tua lista, di non accettare ne il
> contatto [EMAIL PROTECTED] ne un video di Bush, è un hacker, formatta il
> computer, ti cancella i contatti e ti toglie la password alla posta
> elettronica. ATTENZIONE, se i tuoi contatti lo accettano, pure tu lo
> prenderai, così invia il messaggio urgentemente a tutti, questo è di molta
> importanza, semplicemente copia e incolla.URGENTISIM !!!PER
> FAVORE, FAI CIRCOLARE QUESTO AVVISO AI TUOI AMICI, FAMILIARI, CONTATTI!!!Nei
> prossimi giorni devi stare attent@: Non aprire nessun messaggio con un
> allegato chiamato:Invito, idipendentemente da chi te lo invia. E' un virus
> che BRUCIA tutto l' hard disk del computer. Questo virus verrà da una
> persona conosciuta pche ti aveva nei contatti. E' per questo che devi
> inviare questo messaggio ai tuoi contatti.E' preferibile ricevere questo
> messaggio 25 volte che ricevere il virus e aprirlo. Se ricevi il messaggio
> chiamato:Invito, anche se è inviato da un amico, non aprirlo e spegni subito
> il computer. E' il peggior virus annunciato dalla CNN. 'Un nuovo virus è
> stato scoperto recentemente ed è stato classificato da Microsoft come il
> virus più distruttivo che sia esistito. Questo virus è stato scoperto ieri
> pomeriggio dalla Mc Afee e non c'è rimedio contro questa classe di
> virus.Questo virus distrugge semplicemente il Settore Zero del Hard Disk,
> dove le informazioni vitali della sua funzione vengono conservate.> INVIA 
> QUESTA E-MAIL A CHI CONOSCI. COPIA QUESTO TESTO E INVIALO A TUTTI I
>
> TUOI AMICI.RICORDA: SE LO INVII A LORO,
>
> December 02 at 22.25
> Reply to all of your contacts in your list, not to accept it
> [EMAIL PROTECTED] contact and even a video of Bush, is a hacker, format
> the computer, you delete contacts and you cut off the password e-mail.
> ATTENTION, if your contacts so agree, and you catch it, just send an urgent
> message to all, this is very important, just copy and paste
> PLEASE, DO THIS CIRCULAR NOTICE TO YOUR FRIENDS, FAMILY, CONTACT! Over the
> next few days you have to be careful : Do not open any message with an
> attachment called: invitation or something like this,, idipendentemente to
> whom  send it. It 'a virus that  BURN the hard disk of your computer. This
> virus will come from a person known pche you had in contacts. And 'why you
> should send this message to your contacts.And' preferred receive this
> message 25 times to receive the virus and open it. If you receive the
> message called: invitation or something like this, even if it is sent by a
> friend, not open it and immediately turn off the computer. It 'the worst
> virus announced by CNN. 'A new virus was discovered recently and has been
> classified by Microsoft as the most destructive virus that has existed. This
> virus was discovered yesterday afternoon by Mc Afee and there is no remedy
> against this class of virus.This virus simply destroys the Zero Sector of
> the Hard Disk, where vital information of its function are preserved.> SEND
> THIS E-MAIL TO GET TO KNOW ABOUT. COPY THIS TEXT and send to ALL YOUR
> friends..
>
> --
> Diego Valobra
> pirolab WebDesign
> Roma


[jQuery] Treeview plugin - dynamically editing folders

2008-12-03 Thread c.barr

I'm working on a folder interface using the jQuery Treeview plugin,
which has been awesome so far - but I need it to do a bit more.

I've got the basics down for being able to add or remove a folder at
any level, but the folders I add don't have the appropriate expand/
collapse controls on them.  Not sure what I need to do to make that
happen.

Here's a demo: http://chris-barr.com/files/treeview/
Source: http://chris-barr.com/files/treeview/script.js

Try to add a child folder to a folder without any children already and
you'll see what I mean.  Anything else that you see that needs
improving right now?


[jQuery] Replacing Checkboxes with label + yes/no radiobuttons?

2008-12-03 Thread Oskar Austegard

Anyone aware of a plugin that allows you to selectively replace
checkboxes with yes/no radiobuttons?

i.e. I'd want this:



converted to something like this:

Yes  No



[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread SLR

> > > One advantage to doing this
>
> > > $("#Results").html("Some Text").show();
>
> > > over this
>
> > > $("#Results").html("Some Text");
> > > $("#Results").show();
>
> > > would be that the script doesn't have to retrieve that wrapped set a
> > > second time

That's a good point. In this case, chaining would reduce overhead.






> > A chainable method, in jQuery, is written:
>
> > $.fn.newMethod = function() {
> >    // Function body...
> >    return $(this);
> > }
>
> > As you can see, all that's happening is "this" is being converted to a
> > jQuery object (defined by jQuery and its alias "$") and returned.

> Just a quick clarification on this. The this keyword within the "newMethod"
> plugin you just made is already the jQuery object. All you need to do is
> return this;

So if I understand this correctly, essentially the line is execute
from left to right and returns the current object after each method
completes?

For Example:

Obj.method1().method2().method3()

This would do the following:
1)   Calls method 1 for the orignal Obj
2)   Calls method 2  for the obj that is returned from method 1
3)   Calls method 3 for the obj returned from method 2
4)   etc...

Is this correct?


[jQuery] Re: IE6 is not animating the menus and a bunch of JS errors

2008-12-03 Thread conticreative

Thanks for the tip. Yes, it's not applicable except that I only get
the errors when Jquery is in the mix and I always wondered how to use
that debug window in IE to troubleshoot javascript. My guess is that
it was made long ago when the only scripts were inline JS scripts. I
say that because telling me that "superfish" is not a function" and
that it's at line "43" really it's not much help when I have 4 JS
files that mention superfish and none have anything at line 43. So I
have to guess it's referring to the parsed output, which in IE I
cannot see.

Thanks for the help.

On Dec 3, 10:57 am, "Charlie Griefer" <[EMAIL PROTECTED]>
wrote:
> not really applicable to the jquery specific question, but as far as
> debugging JS in IE, have a look athttp://www.debugbar.com/
>
> On Wed, Dec 3, 2008 at 10:54 AM, conticreative <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > I really need someone's help here. I installed Superfish on a Joomla
> > 1.5 website and it's working splendid in Firefox and finally it's
> > working OK in IE7 as well.
> > However, it's simply not doing anything in IE6. Nada.
>
> > Also, in IE6 and 7 I get a number of JS errors, a couple of which are
> > related to Jquery.
>
> > If anyone is so kind to want to take a look, the site is at:
> >http://lmag.us/staging15/
>
> > Just for background: The client chose the template I am using, which
> > had a horizontal CSS menu, possibly Jquery driven. I took it off and I
> > took off as many JS files as I could. Some are necessary for some of
> > the template tools.
> > I am going to try to eliminate even more if I can, but it may be hard.
>
> > By the way, would anyone be so kind as to explain how to interpret
> > Internet Explore debugging window?
> > I love how it gives me a line and a Char number without telling me
> > what the file name is. Am I missing something?
>
> > Thank you kindly
>
> --
> 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: Questions regarding $.ajax ...

2008-12-03 Thread mhall

Thank you very much for the response.

I did as you suggested and checked my logs for both a regular post
(with full form submit and page load) and the ajax post,
unfortunately, the logs didn't show anything conclusive - the URLs in
both cases are logged unaltered and seem to be coming through just
fine.

At this point, so I can move past this, I will likely dynamically
format the post data into the URL of the ajax request and use the GET
method. None of my forms submit much data.

Non-optimum, but workable.

Thanks,
Micheal

On Dec 3, 6:17 am, Kevin Thorpe <[EMAIL PROTECTED]> wrote:
> mhall wrote:
> > Hi all, first post.
>
> > I'm in the processing of learning javascript and jQuery. I have a CGI
> > application that I have written and have been using in my business for
> > several years. It's written in a rather obscure CGI language called
> > WebBatch. Why? Well, because it's what I knew at the time I started
> > the project. :)
>
> > Anyway, one of the interesting things about that language is the
> > structure of its URLs - it isn't simply the path to a script in a cgi
> > directory, it's a path to the WebBatch executable with the script to
> > execute embedded in the query string after it like so:
>
> >http://atlas/webcgi/webbatch.exe?ordersys-dev/login.web
>
> > I mention that as I am having problems with the POST method in Ajax. I
> > can use the GET method just fine and load files and run scripts using
> > GET all day long, but I can't get any results when attempting to use
> > post - the script itself never executes on the server (I have a test
> > script that just writes out to a log file when it runs so that I can
> > see if it is executing).
>
> > Is there a chance that the unusual structure of the URLs presents an
> > issue with the POST method? I'm grasping at straws here as I've been
> > over everything for hours and can't think out anything else unusual
> > about what I'm trying to do or how I'm trying to do it.
>
> > Does that sound like it could even remotely be a source of the
> > problem, or do you figure I am completely off base?
>
> > This is the ajax call as I have it formatted currently:
>
> >             $.ajax({
> >               type: "POST",
> >              url: "//atlas/webcgi/webbatch.exe?ordersys-dev/login-ajax.web",
> >               data: '"username=' + elem.form.username.value + '&password=' +
> > elem.form.password.value + '"',
> >               success: function(msg){
> >                 alert( "Data Saved: " + msg );
> >               }
> >             });
>
> > Thanks for any thoughts!
> > Micheal
>
> What you're trying to do here is both a GET and a POST in the same
> query. Webbatch expects a raw QUERY_STRING as the
> script to execute and the data in POST_DATA (or whatever it's called).
> Check your web logs. Is jquery stripping the GET part
> from the URL? Certainly the server side can handle combined GET and
> POST, I've done it myself due to restrictions in certain
> frameworks.


[jQuery] navigating through checkboxes like in gmail

2008-12-03 Thread pantagruel

Hi,

Originally posted to Jquery-ui:

I was just wondering if anyone had already made anything similar to
gmail's interface where you can navigate between the checkboxes in an
application via keys, for example k selects the preceding checkbox, j
selects the next?  I'm supposing there is already an example
implementation out there someone, if anyone can point me to one.

Cheers,
Bryan Rasmussen


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread Brandon Aaron
Just a quick clarification on this. The this keyword within the "newMethod"
plugin you just made is already the jQuery object. All you need to do is
return this;

--
Brandon Aaron

On Wed, Dec 3, 2008 at 1:01 PM, 703designs <[EMAIL PROTECTED]> wrote:

>
> There's nothing special about chaining methods. You can do it in most
> decent languages (in PHP, you could design methods to allow something
> like: $toys->addNew("Block")->delete();) and all it involves is
> returning an instance of the current object. It's not a performance
> hit by any means.
>
> A chainable method, in jQuery, is written:
>
> $.fn.newMethod = function() {
>// Function body...
>return $(this);
> }
>
> As you can see, all that's happening is "this" is being converted to a
> jQuery object (defined by jQuery and its alias "$") and returned.
>
> Thomas
>
> On Dec 3, 1:54 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> > "I can see it saving time as there is less
> > code to write; but on the flip side, I can see how it can becomes
> > harder to manage especially if there is an excess amount chaining
> > going on"
> >
> > That's your decision to make, and you can have the choice to do it one
> > way or the other
> >
> > One advantage to doing this
> >
> > $("#Results").html("Some Text").show();
> >
> > over this
> >
> > $("#Results").html("Some Text");
> > $("#Results").show();
> >
> > would be that the script doesn't have to retrieve that wrapped set a
> > second time
> >
> > On Dec 3, 12:55 pm, SLR <[EMAIL PROTECTED]> wrote:
> >
> > > I'm new to jQuery and I'm trying to learn some more about jQuery's
> > > chaining feature. Chaining methods seems to be one of jQuery's best
> > > features (at least this is how I see it described all over over the
> > > web).
> >
> > > From a developer standpoint, I can see it saving time as there is less
> > > code to write; but on the flip side, I can see how it can becomes
> > > harder to manage especially if there is an excess amount chaining
> > > going on.
> >
> > > Also, how does this affect performance? Does chaining use more, less,
> > > or the same amount of resources?
> >
> >
>


[jQuery] Re: Hover Repeats Over and Over...

2008-12-03 Thread SmpleJohn

This worked.  Still has a bit of bugs, but doesn't loop infinitely.
Thanks for you help.

My final code:

$("#header").hover(
       function(over){
           $("#header #menu").stop(true,true).slideDown();
       },
       function(out){
           $("#header #menu").stop(true,true).slideUp();
       }
);


[jQuery] Re: Hover Repeats Over and Over...

2008-12-03 Thread SmpleJohn

My bad, copied and pasted the hoverIntent when I was testing it out,
but it's actually set up as hover and still giving me issues.

On Dec 3, 12:23 pm, brian <[EMAIL PROTECTED]> wrote:
> You are not using hover(), you're using the hoverIntent plugin. From
> its website:
>
> -- snip --
> hoverIntent is a plug-in that attempts to determine the user's
> intent... like a crystal ball, only with mouse movement! It works like
> (and was derived from) jQuery's built-in hover. However, instead of
> immediately calling the onMouseOver function, it waits until the
> user's mouse slows down enough before making the call.
>
> Why? To delay or prevent the accidental firing of animations or ajax
> calls. Simple timeouts work for small areas, but if your target area
> is large it may execute regardless of intent. Also, because jQuery
> animations cannot be stopped once they've started it's best not to
> start them prematurely.
> -- snip --
>
> On Wed, Dec 3, 2008 at 9:40 AM, SmpleJohn <[EMAIL PROTECTED]> wrote:
>
> > It's amazing I can't find anything helpful on this.  When I use hover
> > over and out with and animating technique, then mouse over it quickly,
> > it bugs out.
>
> > Here's my code:
>
> >       $("#header").hoverIntent(
> >                function(over){
> >                        $("#header #menu").slideDown();
> >                },
> >                function(out){
> >                        $("#header #menu").slideUp();
> >                }
> >        );
>
> > Now, as mentioned, the problem occurs when you mouse over and out
> > really quickly.  I tried adding the stop(), but if you mouse over and
> > out quickly with that, it'll only animate to a certain height and
> > won't show the entirety of the content.  Any suggestions?


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread 703designs

There's nothing special about chaining methods. You can do it in most
decent languages (in PHP, you could design methods to allow something
like: $toys->addNew("Block")->delete();) and all it involves is
returning an instance of the current object. It's not a performance
hit by any means.

A chainable method, in jQuery, is written:

$.fn.newMethod = function() {
// Function body...
return $(this);
}

As you can see, all that's happening is "this" is being converted to a
jQuery object (defined by jQuery and its alias "$") and returned.

Thomas

On Dec 3, 1:54 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> "I can see it saving time as there is less
> code to write; but on the flip side, I can see how it can becomes
> harder to manage especially if there is an excess amount chaining
> going on"
>
> That's your decision to make, and you can have the choice to do it one
> way or the other
>
> One advantage to doing this
>
> $("#Results").html("Some Text").show();
>
> over this
>
> $("#Results").html("Some Text");
> $("#Results").show();
>
> would be that the script doesn't have to retrieve that wrapped set a
> second time
>
> On Dec 3, 12:55 pm, SLR <[EMAIL PROTECTED]> wrote:
>
> > I'm new to jQuery and I'm trying to learn some more about jQuery's
> > chaining feature. Chaining methods seems to be one of jQuery's best
> > features (at least this is how I see it described all over over the
> > web).
>
> > From a developer standpoint, I can see it saving time as there is less
> > code to write; but on the flip side, I can see how it can becomes
> > harder to manage especially if there is an excess amount chaining
> > going on.
>
> > Also, how does this affect performance? Does chaining use more, less,
> > or the same amount of resources?
>
>


[jQuery] Re: IE6 is not animating the menus and a bunch of JS errors

2008-12-03 Thread Charlie Griefer
not really applicable to the jquery specific question, but as far as
debugging JS in IE, have a look at http://www.debugbar.com/

On Wed, Dec 3, 2008 at 10:54 AM, conticreative <[EMAIL PROTECTED]>wrote:

>
> I really need someone's help here. I installed Superfish on a Joomla
> 1.5 website and it's working splendid in Firefox and finally it's
> working OK in IE7 as well.
> However, it's simply not doing anything in IE6. Nada.
>
> Also, in IE6 and 7 I get a number of JS errors, a couple of which are
> related to Jquery.
>
> If anyone is so kind to want to take a look, the site is at:
> http://lmag.us/staging15/
>
> Just for background: The client chose the template I am using, which
> had a horizontal CSS menu, possibly Jquery driven. I took it off and I
> took off as many JS files as I could. Some are necessary for some of
> the template tools.
> I am going to try to eliminate even more if I can, but it may be hard.
>
> By the way, would anyone be so kind as to explain how to interpret
> Internet Explore debugging window?
> I love how it gives me a line and a Char number without telling me
> what the file name is. Am I missing something?
>
> Thank you kindly




-- 
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] URGENT, URGENTE

2008-12-03 Thread diego valobra
02 dicembre alle ore 22.25
Rispondi Di a tutti i tuoi contatti della tua lista, di non accettare ne il
contatto [EMAIL PROTECTED] ne un video di Bush, è un hacker, formatta il
computer, ti cancella i contatti e ti toglie la password alla posta
elettronica. ATTENZIONE, se i tuoi contatti lo accettano, pure tu lo
prenderai, così invia il messaggio urgentemente a tutti, questo è di molta
importanza, semplicemente copia e incolla.URGENTISIM !!!PER
FAVORE, FAI CIRCOLARE QUESTO AVVISO AI TUOI AMICI, FAMILIARI, CONTATTI!!!Nei
prossimi giorni devi stare attent@: Non aprire nessun messaggio con un
allegato chiamato:Invito, idipendentemente da chi te lo invia. E' un virus
che BRUCIA tutto l' hard disk del computer. Questo virus verrà da una
persona conosciuta pche ti aveva nei contatti. E' per questo che devi
inviare questo messaggio ai tuoi contatti.E' preferibile ricevere questo
messaggio 25 volte che ricevere il virus e aprirlo. Se ricevi il messaggio
chiamato:Invito, anche se è inviato da un amico, non aprirlo e spegni subito
il computer. E' il peggior virus annunciato dalla CNN. 'Un nuovo virus è
stato scoperto recentemente ed è stato classificato da Microsoft come il
virus più distruttivo che sia esistito. Questo virus è stato scoperto ieri
pomeriggio dalla Mc Afee e non c'è rimedio contro questa classe di
virus.Questo virus distrugge semplicemente il Settore Zero del Hard Disk,
dove le informazioni vitali della sua funzione vengono conservate.
> INVIA QUESTA E-MAIL A CHI CONOSCI. COPIA QUESTO TESTO E INVIALO A TUTTI I
TUOI AMICI.RICORDA: SE LO INVII A LORO,


December 02 at 22.25
Reply to all of your contacts in your list, not to accept it
[EMAIL PROTECTED] contact and even a video of Bush, is a hacker, format
the computer, you delete contacts and you cut off the password e-mail.
ATTENTION, if your contacts so agree, and you catch it, just send an urgent
message to all, this is very important, just copy and paste
PLEASE, DO THIS CIRCULAR NOTICE TO YOUR FRIENDS, FAMILY, CONTACT! Over the
next few days you have to be careful : Do not open any message with an
attachment called: invitation or something like this,, idipendentemente to
whom  send it. It 'a virus that  BURN the hard disk of your computer. This
virus will come from a person known pche you had in contacts. And 'why you
should send this message to your contacts.And' preferred receive this
message 25 times to receive the virus and open it. If you receive the
message called: invitation or something like this, even if it is sent by a
friend, not open it and immediately turn off the computer. It 'the worst
virus announced by CNN. 'A new virus was discovered recently and has been
classified by Microsoft as the most destructive virus that has existed. This
virus was discovered yesterday afternoon by Mc Afee and there is no remedy
against this class of virus.This virus simply destroys the Zero Sector of
the Hard Disk, where vital information of its function are preserved.> SEND
THIS E-MAIL TO GET TO KNOW ABOUT. COPY THIS TEXT and send to ALL YOUR
friends..


-- 
Diego Valobra
pirolab WebDesign
Roma


[jQuery] IE6 is not animating the menus and a bunch of JS errors

2008-12-03 Thread conticreative

I really need someone's help here. I installed Superfish on a Joomla
1.5 website and it's working splendid in Firefox and finally it's
working OK in IE7 as well.
However, it's simply not doing anything in IE6. Nada.

Also, in IE6 and 7 I get a number of JS errors, a couple of which are
related to Jquery.

If anyone is so kind to want to take a look, the site is at:
http://lmag.us/staging15/

Just for background: The client chose the template I am using, which
had a horizontal CSS menu, possibly Jquery driven. I took it off and I
took off as many JS files as I could. Some are necessary for some of
the template tools.
I am going to try to eliminate even more if I can, but it may be hard.

By the way, would anyone be so kind as to explain how to interpret
Internet Explore debugging window?
I love how it gives me a line and a Char number without telling me
what the file name is. Am I missing something?

Thank you kindly


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread MorningZ

"I can see it saving time as there is less
code to write; but on the flip side, I can see how it can becomes
harder to manage especially if there is an excess amount chaining
going on"

That's your decision to make, and you can have the choice to do it one
way or the other

One advantage to doing this

$("#Results").html("Some Text").show();

over this

$("#Results").html("Some Text");
$("#Results").show();


would be that the script doesn't have to retrieve that wrapped set a
second time




On Dec 3, 12:55 pm, SLR <[EMAIL PROTECTED]> wrote:
> I'm new to jQuery and I'm trying to learn some more about jQuery's
> chaining feature. Chaining methods seems to be one of jQuery's best
> features (at least this is how I see it described all over over the
> web).
>
> From a developer standpoint, I can see it saving time as there is less
> code to write; but on the flip side, I can see how it can becomes
> harder to manage especially if there is an excess amount chaining
> going on.
>
> Also, how does this affect performance? Does chaining use more, less,
> or the same amount of resources?


[jQuery] Re: Scope variables in anonymous functions?

2008-12-03 Thread 703designs

Thanks Mike, That looks pretty similar to what I came up with (after
deciding to dis/enable rather than hide/show the inputs). I'll keep
the quote advice in mind -- I always assumed that double quotes were
preferred in JS, but I agree, single quotes are easier.

Thomas

On Dec 3, 1:32 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> What you're doing right now is already the best way to do it. It's called a
> "closure" and it's one of the most powerful features in JavaScript.
>
> You can simplify the code a bit. Try this:
>
>     $('.responsibleCouncil .category').each(function() {
>         var $category = $(this);
>
>         $category.find('.toggler input').click(function() {
>             $category.siblings().find('ul').hide();
>             $category.find('ul').show();
>         });
>     });
>
> What I changed:
>
> * Remove input and siblings variables; they're only used once and it's just
> as easy to put the code for each one inline.
>
> * No duplicate $(this) calls.
>
> * No redundant $() wrapping of variables that are already jQuery objects,
> like $(category) and $(siblings) in the original code.
>
> * $ prefix on $category variable name since it's a jQuery object, and single
> quotes instead of double. Neither is required, but both are good coding
> practices. The $ prefix gives a nice visual resemblance between the variable
> name and the original $() call. Single quotes let you avoid escaping double
> quotes inside a string - typically a more common case than the other way
> around, because of HTML attributes - plus they're easier to type. :-)
>
> -Mike
>
> > From: 703designs
>
> > What I'm trying to figure out is how I can access parent
> > scopes from a nested anonymous function. As you can see here,
> > I'm managing to do this by assigning "this" to variables, but
> > I know that there's a way to pass "this" into the anonymous functions:
>
> > $(".responsibleCouncil .category").each(function() {
> >     var category = $(this);
> >     var input = $(this).find(".toggler input");
> >     var siblings = $(this).siblings();
>
> >     input.click(function() {
> >         $(siblings).find("ul").hide();
> >         $(category).find("ul").show();
> >     });
> > });
>
> > Basically, those three assignments at the top of the first
> > anonymous function would be unnecessary if I knew of a better
> > way to access "this" from nested functions.
>
>


[jQuery] Re: Scope variables in anonymous functions?

2008-12-03 Thread 703designs

Thanks, that makes sense. I still don't feel good about this code...

$.fn.disable = function() {
$(this).attr("checked", false);
$(this).attr("disabled", true);
return $(this);
}

$.fn.enable = function() {
$(this).attr("disabled", false);
return $(this);
}

$(".responsibleCouncil .category").each(function() {
var cat = $(this);
var inputSelector = "ul input";

cat.find(".toggler input").focus(function() {
cat.siblings().find(inputSelector).disable();
cat.find(inputSelector).enable();
});
});


What do you think? Any obvious improvements? Corresponding Form
structure:


...

...









...repeated

...


Thomas

On Dec 3, 1:19 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> You have to do it that way because the context has changed.  Thus "this" in
> the second anonymous function will refer to something different than in the
> first.  A lot of people use the convention "var self = this" or something
> similar.
>
> Also within the anonymous function you can do this:
> siblings.find( etc );
> category.find( etc );
>
> ...since they are already jQuery objects.
>
> -- Josh
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of 703designs
> Sent: Wednesday, December 03, 2008 9:44 AM
> To: jQuery (English)
> Subject: [jQuery] Scope variables in anonymous functions?
>
> What I'm trying to figure out is how I can access parent scopes from a
> nested anonymous function. As you can see here, I'm managing to do
> this by assigning "this" to variables, but I know that there's a way
> to pass "this" into the anonymous functions:
>
> $(".responsibleCouncil .category").each(function() {
>     var category = $(this);
>     var input = $(this).find(".toggler input");
>     var siblings = $(this).siblings();
>
>     input.click(function() {
>         $(siblings).find("ul").hide();
>         $(category).find("ul").show();
>     });
> });
>
> Basically, those three assignments at the top of the first anonymous
> function would be unnecessary if I knew of a better way to access
> "this" from nested functions.
>
>


[jQuery] Re: Scope variables in anonymous functions?

2008-12-03 Thread Michael Geary

What you're doing right now is already the best way to do it. It's called a
"closure" and it's one of the most powerful features in JavaScript.

You can simplify the code a bit. Try this:

$('.responsibleCouncil .category').each(function() {
var $category = $(this);

$category.find('.toggler input').click(function() {
$category.siblings().find('ul').hide();
$category.find('ul').show();
});
});

What I changed:

* Remove input and siblings variables; they're only used once and it's just
as easy to put the code for each one inline.

* No duplicate $(this) calls.

* No redundant $() wrapping of variables that are already jQuery objects,
like $(category) and $(siblings) in the original code.

* $ prefix on $category variable name since it's a jQuery object, and single
quotes instead of double. Neither is required, but both are good coding
practices. The $ prefix gives a nice visual resemblance between the variable
name and the original $() call. Single quotes let you avoid escaping double
quotes inside a string - typically a more common case than the other way
around, because of HTML attributes - plus they're easier to type. :-)

-Mike

> From: 703designs
> 
> What I'm trying to figure out is how I can access parent 
> scopes from a nested anonymous function. As you can see here, 
> I'm managing to do this by assigning "this" to variables, but 
> I know that there's a way to pass "this" into the anonymous functions:
> 
> $(".responsibleCouncil .category").each(function() {
> var category = $(this);
> var input = $(this).find(".toggler input");
> var siblings = $(this).siblings();
> 
> input.click(function() {
> $(siblings).find("ul").hide();
> $(category).find("ul").show();
> });
> });
> 
> Basically, those three assignments at the top of the first 
> anonymous function would be unnecessary if I knew of a better 
> way to access "this" from nested functions.



[jQuery] Re: Hover Repeats Over and Over...

2008-12-03 Thread brian

You are not using hover(), you're using the hoverIntent plugin. From
its website:

-- snip --
hoverIntent is a plug-in that attempts to determine the user's
intent... like a crystal ball, only with mouse movement! It works like
(and was derived from) jQuery's built-in hover. However, instead of
immediately calling the onMouseOver function, it waits until the
user's mouse slows down enough before making the call.

Why? To delay or prevent the accidental firing of animations or ajax
calls. Simple timeouts work for small areas, but if your target area
is large it may execute regardless of intent. Also, because jQuery
animations cannot be stopped once they've started it's best not to
start them prematurely.
-- snip --

On Wed, Dec 3, 2008 at 9:40 AM, SmpleJohn <[EMAIL PROTECTED]> wrote:
>
> It's amazing I can't find anything helpful on this.  When I use hover
> over and out with and animating technique, then mouse over it quickly,
> it bugs out.
>
> Here's my code:
>
>   $("#header").hoverIntent(
>function(over){
>$("#header #menu").slideDown();
>},
>function(out){
>$("#header #menu").slideUp();
>}
>);
>
> Now, as mentioned, the problem occurs when you mouse over and out
> really quickly.  I tried adding the stop(), but if you mouse over and
> out quickly with that, it'll only animate to a certain height and
> won't show the entirety of the content.  Any suggestions?
>


[jQuery] Re: Hover Repeats Over and Over...

2008-12-03 Thread ricardobeat

Try adding stop(true,true) before either of the slide calls. That
jumps to the end of the animation and clears the queue. But
hoverIntent should be preventing this from happening, to a certain
extent.

- ricardo

On Dec 3, 12:40 pm, SmpleJohn <[EMAIL PROTECTED]> wrote:
> It's amazing I can't find anything helpful on this.  When I use hover
> over and out with and animating technique, then mouse over it quickly,
> it bugs out.
>
> Here's my code:
>
>        $("#header").hoverIntent(
>                 function(over){
>                         $("#header #menu").slideDown();
>                 },
>                 function(out){
>                         $("#header #menu").slideUp();
>                 }
>         );
>
> Now, as mentioned, the problem occurs when you mouse over and out
> really quickly.  I tried adding the stop(), but if you mouse over and
> out quickly with that, it'll only animate to a certain height and
> won't show the entirety of the content.  Any suggestions?


[jQuery] Re: Scope variables in anonymous functions?

2008-12-03 Thread Josh Nathanson

You have to do it that way because the context has changed.  Thus "this" in
the second anonymous function will refer to something different than in the
first.  A lot of people use the convention "var self = this" or something
similar.

Also within the anonymous function you can do this:
siblings.find( etc );
category.find( etc );

...since they are already jQuery objects.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of 703designs
Sent: Wednesday, December 03, 2008 9:44 AM
To: jQuery (English)
Subject: [jQuery] Scope variables in anonymous functions?


What I'm trying to figure out is how I can access parent scopes from a
nested anonymous function. As you can see here, I'm managing to do
this by assigning "this" to variables, but I know that there's a way
to pass "this" into the anonymous functions:

$(".responsibleCouncil .category").each(function() {
var category = $(this);
var input = $(this).find(".toggler input");
var siblings = $(this).siblings();

input.click(function() {
$(siblings).find("ul").hide();
$(category).find("ul").show();
});
});

Basically, those three assignments at the top of the first anonymous
function would be unnecessary if I knew of a better way to access
"this" from nested functions.



[jQuery] Making an Element Fly to a New Position on the Page?

2008-12-03 Thread Vik

On the NetFlix site, if you assign the movie a new position in the
Queue, the movie flies to the correct new position on its own, without
being dragged there.

I have a similar situation. I have list of items with dates.  They
appear on the page sorted by date. I permit the user to assign a new
date to an item.  After I determine the correct new position on the
page for this item, based on the new date, is there a way to have this
item fly to its new position on the page, without having the user
manually drag it there?

Thanks in advance to all for any info.


[jQuery] Re: using depends method with Validate() plugin

2008-12-03 Thread Jörn Zaefferer
See 
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29

Jörn

On Wed, Dec 3, 2008 at 6:58 PM, luke adamis <[EMAIL PROTECTED]> wrote:
>
> Thanks,
> That did it.
> Now I have another issue:
>
> these checkboxes must be names like an array:
>
> product_interest[]
>
> but in the rules I can't have this:
>
>product_interest[]: "required",
>
> I know I can insert code in HTML:
> class="required"
>
> but I would rather have it in the rules.
>
> Is there any way to do that?
>
> L.
>
>
> On Dec 3, 2008, at 11:30 AM, Jörn Zaefferer wrote:
>
>> I guess you have to escape that ID: jQuery interprets that as "element
>> with id product_interest and an attribute named '0'".
>>
>> Jörn
>>
>> On Wed, Dec 3, 2008 at 5:24 PM, luke adamis <[EMAIL PROTECTED]> wrote:
>>>
>>> Is there a reason for this to not work?
>>>
>>>   other_product_interest: {
>>>   required:
>>> "#product_interest[0]:checked"
>>>   },
>>>
>>> product_interest[] is a list of checkboxes, if user picks 'other' ,
>>> #product_interest[0] then user must fill the text filed:
>>> other_product_interest.
>>>
>>> Thanks,
>>> Luke
>>>
>>>
>
>
>


[jQuery] Re: using depends method with Validate() plugin

2008-12-03 Thread luke adamis


Thanks,
That did it.
Now I have another issue:

these checkboxes must be names like an array:

product_interest[]

but in the rules I can't have this:

product_interest[]: "required",

I know I can insert code in HTML:
class="required"

but I would rather have it in the rules.

Is there any way to do that?

L.


On Dec 3, 2008, at 11:30 AM, Jörn Zaefferer wrote:


I guess you have to escape that ID: jQuery interprets that as "element
with id product_interest and an attribute named '0'".

Jörn

On Wed, Dec 3, 2008 at 5:24 PM, luke adamis <[EMAIL PROTECTED]>  
wrote:


Is there a reason for this to not work?

   other_product_interest: {
   required:
"#product_interest[0]:checked"
   },

product_interest[] is a list of checkboxes, if user picks 'other' ,
#product_interest[0] then user must fill the text filed:
other_product_interest.

Thanks,
Luke







[jQuery] Reset my jquery account password

2008-12-03 Thread Brian J. Cardiff
I'm trying to reset my password of jquery site and the e-mail never arrives.
I've tried several times.
Someone knows who I can contact?

Thanks.
Brian J. Cardiff
bcardiff(?)gmail.com
.


[jQuery] How beneficial is chaining methods?"

2008-12-03 Thread SLR

I'm new to jQuery and I'm trying to learn some more about jQuery's
chaining feature. Chaining methods seems to be one of jQuery's best
features (at least this is how I see it described all over over the
web).

>From a developer standpoint, I can see it saving time as there is less
code to write; but on the flip side, I can see how it can becomes
harder to manage especially if there is an excess amount chaining
going on.

Also, how does this affect performance? Does chaining use more, less,
or the same amount of resources?


[jQuery] Scope variables in anonymous functions?

2008-12-03 Thread 703designs

What I'm trying to figure out is how I can access parent scopes from a
nested anonymous function. As you can see here, I'm managing to do
this by assigning "this" to variables, but I know that there's a way
to pass "this" into the anonymous functions:

$(".responsibleCouncil .category").each(function() {
var category = $(this);
var input = $(this).find(".toggler input");
var siblings = $(this).siblings();

input.click(function() {
$(siblings).find("ul").hide();
$(category).find("ul").show();
});
});

Basically, those three assignments at the top of the first anonymous
function would be unnecessary if I knew of a better way to access
"this" from nested functions.


[jQuery] Re: jquery validation and disabled elements

2008-12-03 Thread Jörn Zaefferer
Usually via ignore: ":disabled".

Jörn

On Wed, Dec 3, 2008 at 5:29 PM, Jan Limpens <[EMAIL PROTECTED]> wrote:
>
> How can I tell the bassistence validator to ignore disabled inputs?
>
> I have ui.tabs, and only the selected tab's controls are enabled.
> I want validation to fire only at them.
>
> --
> Jan
>


[jQuery] Re: using depends method with Validate() plugin

2008-12-03 Thread Jörn Zaefferer
I guess you have to escape that ID: jQuery interprets that as "element
with id product_interest and an attribute named '0'".

Jörn

On Wed, Dec 3, 2008 at 5:24 PM, luke adamis <[EMAIL PROTECTED]> wrote:
>
> Is there a reason for this to not work?
>
>other_product_interest: {
>required:
> "#product_interest[0]:checked"
>},
>
> product_interest[] is a list of checkboxes, if user picks 'other' ,
> #product_interest[0] then user must fill the text filed:
> other_product_interest.
>
> Thanks,
> Luke
>
>


[jQuery] Re: Josh Nathanson's magnify not showing stage in IE7

2008-12-03 Thread Josh Nathanson

Andrew - I got the link you sent and indeed, it does not seem to work on ie6
or ie7.  However, I couldn't see your code because it was compressed.  Have
you been able to get it working?

-- Josh


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrew
Sent: Monday, December 01, 2008 3:02 PM
To: jQuery (English)
Subject: [jQuery] Josh Nathanson's magnify not showing stage in IE7


I am almost certain that I previously had it working in IE7, which
leads me to think it's some new JS that is conflicting but I can't
figure it out. Where can I start to look for IE7 conflicts?



[jQuery] JQuery Ajax get function BROKE in Safari 3.2.1 (latest)?!

2008-12-03 Thread Serb

Ok, I'm using the simplest possible jquery ajax get call to execute a
database call in another php file (since I switched from using a
really nice prototype powered function thinking it was prototype's
fault for not working in Safari), but I can't get it working in the
latest version of Safari no matter what (as much as I couldn't get
prototype one to work in Safari either).

This works just fine in IE6, IE7 & FF3, but Safari is not budging -
it's not executing for some reason... here's the code:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>


Test


function setVideo(video) {
  $.get("setVideo.php", { video: video } );
}




http://download.com/video_1.zip"; onclick="setVideo
('video_1');">Click to view Video #1




Using the latest jQuery and/or Prototype, and still can't figure out
why this simple call doesn't work in Safari... anyone? It's eating me
alive, consuming hours of my time trying to google up some solutions,
and no luck...


[jQuery] tabindex issues

2008-12-03 Thread eyever

I'm try to sort out a tabbing issu i have across our site. Basically
the from i am having is the order the tab index is applied to a page
using the script below. Currently the script adds a tabindex on all
the'a' tags first the inputs etc but that means if i have an input
field before some A tags the order of tabbing is messed up. Does any
one know of a solution around this?



 
 $("#MainContent > *").removeAttr("tabindex");
 $(document).ready(function() {
 // set tabs
 $('#MainContent > a,input,select,textarea').each(function(i) {
 $(this).attr('tabindex', i);
 $(this).after("" + i + "");

 })
 });



[jQuery] [autocomplete]

2008-12-03 Thread bmc

Hi everybody,
I found autocomplete plugin quite nice, but there are some stuff i
don`t know how to implement with autocomplete plugin without hacking
it.

I have a complex framework (seamframework.org) that have it`s own
JavaScript wrapper to get AJAX things done. So i can easily get data
from server with this framework. But Autocomplete can only work with
array or URL as data source, so the question is - can I force
autocomplete plugin to call my custom function while getting data
instead of requesting URL?


[jQuery] JQuery Jerusalem2020j2IL Carousel Plugin

2008-12-03 Thread Duchess BMJB

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


http://ajax.googleapis.com/ajax/libs/
jqueryjerusalem2020j2il/1.2.6/jquery.jerusalem2020j2ilmin.js">

http://ajax.googleapis.com/ajax/libs/
jqueryjerusalem2020j2ilui/1.5.2/jqueryjerusalem2020j2il-ui.min.js">




[jQuery] Re: how to check if a form has changed

2008-12-03 Thread ggerri

Hi Sridhar

you could do something like

 var vFlag;

 $('input').bind('change', function() { vFlag = 'X';});


Then you can check with window.onbeforeunload mentioned earlier if
things have changed and react accordingly.

Regards
Gerald

On Dec 2, 4:46 pm, "Web Specialist" <[EMAIL PROTECTED]> wrote:
> Try this
>
> http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo3.htm
>
> Cheers
> Marco Antonio
>
> On 12/2/08, Sridhar <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
>
> >     we are trying to give a feedback to the user if the user has
> > changed some values in the form and tries to close the form with out
> > saving the changes. is there a plug-in that can check this? or do I
> > have to loop-through each control and check if the value has changed
> > by comparing the value with the stored value in a hidden variable? If
> > there is a standard way to do this, please let me know. we are using
> > asp.net to create the forms
>
> > Thanks,
> > sridhar.- Hide quoted text -
>
> - Show quoted text -


[jQuery] Hover Repeats Over and Over...

2008-12-03 Thread SmpleJohn

It's amazing I can't find anything helpful on this.  When I use hover
over and out with and animating technique, then mouse over it quickly,
it bugs out.

Here's my code:

   $("#header").hoverIntent(
function(over){
$("#header #menu").slideDown();
},
function(out){
$("#header #menu").slideUp();
}
);

Now, as mentioned, the problem occurs when you mouse over and out
really quickly.  I tried adding the stop(), but if you mouse over and
out quickly with that, it'll only animate to a certain height and
won't show the entirety of the content.  Any suggestions?


[jQuery] Drag/Drop + Node Connection through arrows

2008-12-03 Thread Startworld67

Hi,

Is there something similar to

http://www.il og.com/image.cfm?name=designer_topology.png
http://www.mida regami.net/Japan-Hierarchy.jpg
http://www.ajax weaver.com/screenshots.html

which can done using jQuery.

Thanks.


[jQuery] [treeview]

2008-12-03 Thread kt

I want to add a dropdown menu after each tree node i.e.,

[+]item1 menu1  
 -- [+] item1.1 menu2... 

The dropdown menu is an unordered list which gets picked up by the
treeview plugin. the end result is that treeview nodes are generated
for elements in that menu item.

i've tried restricting/filtering the detection of UL elements in
treeview by using classes, i.e., only build treeview nodes for an UL/
LI element that has class 'tv', but i've not had any success.

anyone had this requirement before? interested in what your solution
is.

tks in advance!


[jQuery] jcarousel ie6 bug

2008-12-03 Thread hcvitto

hi
i'm using jcarousel plugin for a project.
Problem is in ie6 the last image in all of my carousel doesn't show
up?

Any idea?
Thanks
Vitto


[jQuery] Re: Tabs - #Link not working for ajax tab in IE 7

2008-12-03 Thread strummer75

Bumped to here

http://groups.google.com/group/jquery-en/browse_thread/thread/d7ea7e3a047dc116?hl=en#

On Nov 25, 11:14 am, strummer75 <[EMAIL PROTECTED]> wrote:
> I am having an issue in IE 7 and UI/Tabs as follows:
>
> I am linking directly to a tabs id from another page like so:
>
> http://devapp/contacts/#organizations
>
> My tab link is  title="organizations">Organization
>
> I also have a div id in the page that matches the title attribute on
> the li - 
>
> In Firefox the tab is selected and loads the page into the tab when I
> hithttp://devapp/contacts/#organizations.
> In IE 7 the tab is selected but nothing loads... if I click to another
> tab and click back the tab gets loaded.
>
> Any ideas?
>
> Thanks,
> Tony Covert


[jQuery] jquery validation and disabled elements

2008-12-03 Thread Jan Limpens

How can I tell the bassistence validator to ignore disabled inputs?

I have ui.tabs, and only the selected tab's controls are enabled.
I want validation to fire only at them.

-- 
Jan


[jQuery] Re: using depends method with Validate() plugin

2008-12-03 Thread luke adamis


Is there a reason for this to not work?

other_product_interest: {
required: "#product_interest[0]:checked"
},

product_interest[] is a list of checkboxes, if user picks 'other' ,  
#product_interest[0] then user must fill the text filed:  
other_product_interest.


Thanks,
Luke



[jQuery] Re: jQuery-specific selected (highlighted) text?

2008-12-03 Thread ricardobeat

Just before someone shoots me: actually Mozilla's implementation
follows the W3C DOM Range API with some extra stuff added, and Opera/
Safari implementations are alike, only IE is non-standard. So this
should work in all modern browsers.

On Dec 3, 12:16 am, ricardobeat <[EMAIL PROTECTED]> wrote:
> Please try not to post multiple messages for the same question, so
> that people can keep track of a solution.
>
> jQuery is a framework: it eases the pain of cross-browser development
> and provides shortcuts for DOM manipulation and other common taks. It
> does that by using the browser methods available, there is no magic in
> it.
>
> getSelection() returns text only, there's nothing jQuery or you or
> anybody else (except the browser developers) can do about it. I
> pointed you earlier to the docs on Mozilla Developer Center about the
> 'selection' object which contains extra information about what is
> selected on the page. Here's something you can do:
>
> sel = window.getSelection();
> range = sel.getRangeAt(0);
> contents = range.cloneContents();
>
> $(contents.childNodes).filter('.dolor')
>
> This will give you the element with class "dolor" inside your
> selection. This only works in Firefox. IE has a different method of
> doing this (both are non-standard):
>
> sel = document.selection;
> range = sel.createRange();
> contents = range.htmlText;
>
> Mixing both you get something that is closer to 'cross-browser', I
> don't know specifically which part of this Webkit supports:
>
> function filterSelection(class){
>   var sel, output;
>   if (window.getSelection) {
>      sel = window.getSelection().getRangeAt(0).cloneContents();
>      output = $(sel.childNodes).filter(class).text();
>   } else if (document.selection) {
>      sel = document.selection.createRange().htmlText;
>      output = $(sel).filter(class).text();
>   };
>   alert(output);
>
> };
>
> I also recommend you to use Firefox + Firebug for development so you
> can get rid of alert() :)
>
> cheers,
> - ricardo
>
> On Dec 2, 6:35 pm, stephane_r <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I'm still a beginner with jQuery (and not really fluent in JavaScript), but
> > I begin to understand how it works.
>
> > I am trying to move the following code to jQuery:
>
> > var text = window.getSelection();
> > alert(text);
>
> > It shows me the currently highlighted part of an xhtml page. Now I want to
> > use jQuery because it allows me to filter the text according to the class it
> > is part of, by doing something in the style of:
>
> > $('td.selectable').each(function() {
> > var text = this.innerHTML;
> > alert(text);
>
> > })
>
> > My problem is that I cannot find an equivalent to window.getSelection() in
> > jQuery, nor use getSelection() with the jQuery objects (once again, beginner
> > alert, maybe I'm missing something obvious here).
>
> > So, what would you do in order to restrict the returned text to the part of
> > the DOM that is currently selected (highlighted)?
>
> > Thanks.
> > --
> > View this message in 
> > context:http://www.nabble.com/jQuery-specific-selected-%28highlighted%29-text...
> > Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Simple Selector Question -- Context

2008-12-03 Thread ricardobeat

Or pError.filter(':visible').

By using 'pError' as a context, you are looking for it's children, not
the elements themselves.

- ricardo

On Dec 3, 1:17 pm, Liam Potter <[EMAIL PROTECTED]> wrote:
> it would be this
>
> $('p.error:visible')
>
> Joe wrote:
> > If I have the following:
>
> > var pError = $('p.error');
>
> > Then I can do the following with no problem:
>
> > pError.text('lorem");
>
> > Yet, I want to check for the paragraphs that have the class "error"
> > that are visible, I would think it is something like this:
>
> > var visibleError = $(':visible', pError);
>
> > However, this fails.
>
> > Is this because the visible selector is different in creating the
> > wrapped set of paragraph tags with the class error?
>
> > What is the proper way of using the context of pError with the visible
> > selector?
>
> > Thanks!


[jQuery] Re: getting clicked element

2008-12-03 Thread ricardobeat

$(document).click(function(e){
el = $(e.target);
alert( el.text() );
});

jQuery normalizes the target property of the event object, so don't
worry about IE.

- ricardo

On Dec 3, 9:12 am, revivedk <[EMAIL PROTECTED]> wrote:
> Hi.
> how would I register what element is clicked on the site?
>
> I need to be able to register what element is clicked, on the entire
> DOM.
>
>                            $(document).click(function () {
>                                         var oBj = this;
>                                   //alert($(oBj).text());
>                                 });
>
> this doesn't work, as it returns the entire DOM. and I only need the
> element that is being clicked on.
>
> how would I do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Registering the value of variable instead of the variable itself in a loop

2008-12-03 Thread ricardobeat

Use classes instead. Considering "tabcontent" to be inside "item":

$('.item').click(function() {
var tab = $(this).find('.tabcontent');
if (tab.is(":hidden")) {
if (active == "init") {
tab.slideDown(300);
$('.tabcontent').removeClass('active');
tab.addClass(active);
} else {
$('.tabcontent.active').slideUp(300, function
() {
tab.slideDown(300);
$('.tabcontent').removeClass
('active');
tab.addClass(active);
});
}
} else {
tab.slideUp(300);
}

}

On Dec 3, 9:02 am, Ozberk <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've started to work on this project again. A solution to the problem
> above will definitely help me a lot since much more complicated ui
> behaviors have been decided for the gadget.
>
> Thx in advance.
> Cheers,
> Ozberk
>
> On Oct 28, 7:40 pm, Ozberk <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I'm new to jQuery and I am currently working on google gadget which
> > has some animations.
> > I have wrote the jQuery code and manage to make it work:
>
> > $('#itemn').click(function() {
> >         if ($("#tabcontentn").is(":hidden")) {
> >                 if(active == "init") {
> >                         $("#tabcontentn").slideDown(300);
> >                         active = "#tabcontentn";
> >                 } else {
> >                         $(active).slideUp(300, function() {
> >                                 $("#tabncontent").slideDown(300);
> >                                 active = "#tabcontentn";
> >                         });
> >                 }
> >         } else {
> >                 $("#tabcontentn").slideUp(300);
> >         }
>
> > }
>
> > The problem has arisen after I decided to create a single forloop
> > instead of binding all elements one by one. Although I managed to get
> > it work with some workaround I'm not happy with the result:
>
> > for(var i = 1; i < 6;i ++) {
> >         item = '#item'+i;
> >         $(item).click(function() {
> >                 alert(vts(this));
> >                 if ($(vts(this)).is(":hidden")) {
> >                         if(active == "init") {
> >                                 $(vts(this)).slideDown(300);
> >                                 active = vts(this);
> >                         } else {
> >                                 that = vts(this);
> >                                 $(active).slideUp(300, function() {
> >                                         $(that).slideDown(300);
> >                                         active = that;
> >                                 });
> >                         }
> >                 } else {
> >                         $(vts(this)).slideUp(300);
> >                         active = 'init';
> >                 }
> >         });
>
> > }
>
> > function vts(e) {
> >         var t;
> >         t = e.id;
> >         t = t.replace(/item/ig, '');
> >         t = '#tabcontent'+t;
> >         return t;
>
> > }
>
> > what I really want is creating some kind of code like this:
>
> > for(var i = 1; i < 6; i++) {
>
> > var item = '#item'+i;
> > var element = '#tabcontent'+i;
> > $(item).click(function() {
> >         if ($(element).is(":hidden")) {
> >                 if(active == "init") {
> >                         $(element).slideDown(300);
> >                         active = element;
> >                 } else {
> >                         $(active).slideUp(300, function() {
> >                                 $(element).slideDown(300);
> >                                 active = element;
> >                         });
> >                 }
> >         } else {
> >                 $(element).slideUp(300);
> >         }
>
> > }
> > }
>
> > The problem with the above code is the $(element) stays as the last
> > element (#tabcontent5). I need to find a way toregisterthat element
> > variable as a static value instead of the variable itself.
>
> > Any help would be appreciated.
>
> > Ozberk


[jQuery] Re: ask : jquery validation plugins not working

2008-12-03 Thread ksun

Ok, I think I found the problem

you form input elements don't have unique names (check how many times
you have 'expPerson1' 'expPerson2' etc). so the validation plugin only
picks the first ones. give unique names and then try. The following is
the code in validate.jquery.js file that does this , look at the
comment "// select only the first element for each name, and only
those with rules specified".  Hope this helps.

elements: function() {
var validator = this,
rulesCache = {};

// select all valid inputs inside the form (no submit 
or reset
buttons)
// workaround $Query([]).add until 
http://dev.jquery.com/ticket/2114
is solved
return $([]).add(this.currentForm.elements)
.filter(":input")
.not(":submit, :reset, :image, [disabled]")
.not( this.settings.ignore )
.filter(function() {
!this.name && validator.settings.debug && 
window.console &&
console.error( "%o has no name assigned", this);

// select only the first element for each name, 
and only those
with rules specified
if ( this.name in rulesCache || 
!validator.objectLength($
(this).rules()) )
return false;

rulesCache[this.name] = true;
return true;
});
},


On Dec 3, 12:00 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> Here is the test pagehttp://wysmedia.com/test/
>
> you can delete the first field .. and the validate() will work .. but
> when you delete the second, third, etc ... the validation will simply
> said it is valid and allow me to go to next page.
>
> On Dec 2, 5:16 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Could you provide a testpage?
>
> > Jörn
>
> > On Mon, Dec 1, 2008 at 10:32 PM,AdwinWijaya <[EMAIL PROTECTED]> wrote:
>
> > > Hi jquery users,
>
> > > I have forms which has a lot of input inside and all of it I set as
> > > required. Actually I generated the form using database, not by hand :)
>
> > > each input has unique id (generated by server).
>
> > > at the moment, the validation wont work on all field, it just detect
> > > the first fields ... (eg: houseHoldExpfood, expPerson1food,
> > > expPerson2food) .. but ignored another fields.
>
> > > is this jquery validation bug ?
>
> > > here is
> > > My javascript code:
> > > $(document).ready(function(){
> > >      $('#householdBudgetForm').validate({
> > >          errorLabelContainer: $('#householdBudgetErrorMsg'),
> > >          submitHandler: submitHouseholdBudgetForm
> > >      });
> > > });
>
> > > here is my form :
> > > 
> > > 
> > >            
> > >                
> > >                    Expenses
> > >                    Suggested exp
> > >                    Household exp
> > >                    %
> > >                    Person1
> > >                    Person2
> > >                    Reason
> > >                
> > >            
>
> > >        
> > >            Food incl groceries & take aways
> > >            
> > >                2,100
> > >                 > > id="suggestedExpfood" name="suggestedExp"/>
> > >            
> > >             > > id="houseHoldExpfood" name="houseHoldExp" size="10" class="money
> > > required houseHoldExp"/>
> > >            
> > >            
> > >            
> > >            
> > >                 > > id="expPerson1food" name="expPerson1" size="10" class="money required
> > > expPerson1"/>
> > >            
> > >            
> > >                 > > id="expPerson2food" name="expPerson2" size="10" class="money required
> > > expPerson2"/>
> > >            
> > >            
> > >             > > id="reasonfood">
> > >                 > > name="reason"/>
> > >                 > > href="#">
> > >            
> > >            
> > >        
>
> > >        
> > >            Phone mobile internet
> > >            
> > >                830
> > >                 > > id="suggestedExpcommunication" name="suggestedExp"/>
> > >            
> > >             > > id="houseHoldExpcommunication" name="houseHoldExp" size="10"
> > > class="money required houseHoldExp"/>
> > >            
> > >            
> > >            
> > >            
> > >                 > > id="expPerson1communication" name="expPerson1" size="10" class="money
> > > required expPerson1"/>
> > >            
> > >            
> > >                 > > id="expPerson2communication" name="expPerson2" size="10" class="money
> > > required expPerson2"/>
> > >            
> > >            
> > >             > > id="reasoncommunication">
> > >                 > > name="reason"/>
> > >                 > > id="reasonLinkcommunication" href="#">
> > >            
> > >            
> > >        
>
> > >    

[jQuery] Re: someone please for to helps me!

2008-12-03 Thread ricardobeat

the ready() shortcut doesn't work all the time for frames/popups. Use
the onload instead:

$(popup.document).load(function(){
console.log($('#test', $(popup.document.body)).length);
});

- ricardo

On Nov 20, 7:47 pm, dickles <[EMAIL PROTECTED]> wrote:
> very simple codes not run right. test for when popup window is
> loaded...
>
> i try everything, very frustration! please for you to helps, 1,000
> thanks in advance to you!
>
> from parent window:
>
> 
> var popup = window.open('test.html', 'client_window',
> 'height=400,width=700');
> $(popup.document).ready(function() {
>         console.log($('#test', $(popup.document.body)).length);});
>
> 
>
> from 'test.html':
>
> 
>   
>   
>     yes you can
>   
> 
>
> console.log() says the length is 0 if the popup is a new browser
> window. If the popup is already open and you refresh parent page, the
> length is 1. ready() is not working as i expects!


[jQuery] Re: listnav plugin

2008-12-03 Thread Alexsandro_xpt

My examples is about add itens on the list in run-time, xhr, delete in
run-time, events onadd, ondelete.
Things like that above.

On Dec 2, 4:29 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> Alexsandro, can you give me a few examples, so I can be sure I understand 
> what you're looking for?
> Thanks,
> Jack
> Alexsandro_xpt wrote:Hello all, I would like to add somes methods like 
> refresh/add/remove item from list too. Thz. On 1 dez, 05:04, idgcorp<[EMAIL 
> PROTECTED]>wrote:Hi Jack, thanks for the reply, yes Im just adding/removing 
> via jq Ive created a workaround that solves this one for me. Also I just 
> posted another question, I would love to get this new one solved its driving 
> me 
> nuts!http://groups.google.com/group/jquery-en/browse_thread/thread/d10260b... 
> On Nov 26, 7:58 pm, Jack Killpatrick<[EMAIL PROTECTED]>wrote:Glad you like 
> the plugin. Can you give me a little more about your use case so I'm sure I 
> know what you're asking for? IE, are you just adding/removing LI's?- 
> Jackidgcorp wrote:I have implemented this awesome plugin with great success 
> and would like to know if its possible to refresh the plugin after appending/ 
> removing data from the list.Can I break the connection and then rebind the 
> data?


[jQuery] Re: jQuery and VS.NET

2008-12-03 Thread MorningZ

I would try to help, as i have my projects working fully with jQuery
and Intellisense

but i have no idea what this is supposed to mean

"and can get jQuery to work but only after changing the HTML
manually"

nor where to start to help

but with that said

http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx

is a good place to start




On Dec 3, 6:42 am, Pete <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm a little new to jQuery and C# .NET.  I have been reading a lot
> about MS shipping .NET with jQuery, I have VS.NET Web Developer Pro
> 2008 and can get jQuery to work but only after changing the HTML
> manually as if I were writing a php page in notepad.  I've searched
> high and low for a quick guide on how to get started with jQuery
> and .NET but I have so far had no luck.  Can anyone recommend a good
> place to start?  Will jQuery become more integrated in VS.NET as a
> inbuilt library with debugging and predictive functuion names or
> something like that?
>
> Thanks
>
> Pete


[jQuery] Tabs - External link not working on remote tab in IE 7

2008-12-03 Thread strummer75

Dear jQuery gang,
I am having the following issue with a remote content tab in IE 7.

Here's the scoop:

Link on one page ie: (http://appname/list/#tab_two) takes me to
another page with 3 tabs and via that link I want to default to the
2nd tab open. This of course works like a dream in Firefox and loads
up the ajax for that tab... IE 7 does not do this.

I found an example of the same issue occurring on Klaus' site here:

http://stilbuero.de/jquery/test/remote_tabs_with_scripts.html#Tab_one

The text in tab one will show 'Plain HTML' if you are viewing in
Firefox but it wont if you are viewing in IE 7.

I have tried the approach of creating container divs and giving them
all an id and then referring to those ids in the title tags of my
hrefs in my tab list to no avail.

Anyone had any experience with this issue and any luck with a
workaround?

Thanks,
Tony


[jQuery] Re: Simple Selector Question -- Context

2008-12-03 Thread Liam Potter


it would be this

$('p.error:visible')

Joe wrote:

If I have the following:

var pError = $('p.error');

Then I can do the following with no problem:

pError.text('lorem");

Yet, I want to check for the paragraphs that have the class "error"
that are visible, I would think it is something like this:

var visibleError = $(':visible', pError);

However, this fails.

Is this because the visible selector is different in creating the
wrapped set of paragraph tags with the class error?

What is the proper way of using the context of pError with the visible
selector?

Thanks!
  




[jQuery] Simple Selector Question -- Context

2008-12-03 Thread Joe

If I have the following:

var pError = $('p.error');

Then I can do the following with no problem:

pError.text('lorem");

Yet, I want to check for the paragraphs that have the class "error"
that are visible, I would think it is something like this:

var visibleError = $(':visible', pError);

However, this fails.

Is this because the visible selector is different in creating the
wrapped set of paragraph tags with the class error?

What is the proper way of using the context of pError with the visible
selector?

Thanks!


[jQuery] Re: Fixed div, content scrolls under it

2008-12-03 Thread Liam Potter


if you don't care about ie6 then position:fixed with a z-index above 
everything else will do the trick.


for ie6 you will need some javascript, though even then it will be jumpy.
Andy Matthews wrote:

No, not like that.
 
I'm looking to essentially simulate a frameset, where the navigation 
stays on top while all content scrolls underneath it. It might be a 
pure CSS solution and that's fine. I assumed it would require 
JavaScript of some sort.
 
 
andy



*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 
*On Behalf Of *aquaone

*Sent:* Tuesday, December 02, 2008 6:23 PM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Re: Fixed div, content scrolls under it

do you mean something other than:
...
...

Sounds like a CSS question, not a jQuery one...

stephen



On Tue, Dec 2, 2008 at 14:38, Andy Matthews <[EMAIL PROTECTED] 
> wrote:


I'm looking at the possibility of having navigation at the top of
the page, pinned to the top. I'd like for the content to scroll
UNDER the container. I've seen it before, but forgot to bookmark
it to see how it was done.

Does anyone have a plugin for this, or know how it's accomplished
and can point me to an example?


andy






  1   2   >