[jQuery] Re: find.click vs bind(click)

2007-04-20 Thread Shelane Enos
From: Shelane Enos [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Tuesday, April 17, 2007 11:26:16 AM Subject: [jQuery] Re: find.click vs bind(click) Unfortunately this is an internal application. The jQuery code on the page is just this (I have the one function commented out b/c

[jQuery] Re: find.click vs bind(click)

2007-04-20 Thread Ariel Jakobovits
no it should not throw an error. j(#edit) will return an empty array is all and the bind will not be called. - Original Message From: Shelane Enos [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Friday, April 20, 2007 9:10:58 AM Subject: [jQuery] Re: find.click vs bind(click

[jQuery] Re: find.click vs bind(click)

2007-04-20 Thread Shelane Enos
@googlegroups.com Sent: Friday, April 20, 2007 9:10:58 AM Subject: [jQuery] Re: find.click vs bind(click) OK, going back to this function: *$j(function(){ bindEdit = function(){ $j('#edit').bind(click, function(){ var linkval = $j(this).attr(href); $j('#jobinfo

[jQuery] Re: find.click vs bind(click)

2007-04-20 Thread Ariel Jakobovits
0; i++) { // never will happen; } - Original Message From: Shelane Enos [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Friday, April 20, 2007 1:07:37 PM Subject: [jQuery] Re: find.click vs bind(click) Thanks to another problem I had, I've changed my code to this (which

[jQuery] Re: find.click vs bind(click)

2007-04-20 Thread Shelane Enos
Subject: [jQuery] Re: find.click vs bind(click) Thanks to another problem I had, I've changed my code to this (which fixed my issue): bindEdit = function(){ var linkval = $j('#edit').attr(href); if (linkval != ''){ $j('#edit').click(function(){ $j

[jQuery] Re: find.click vs bind(click)

2007-04-17 Thread Shelane Enos
So I'm trying this: $j(function(){ bindEdit = function(){ $j('#edit').bind(click, function(){ var linkval = $j(this).attr(href); $j('#jobinfo').load(linkval, function(){ bindEdit(); }); return false; }); }

[jQuery] Re: find.click vs bind(click)

2007-04-17 Thread Jeffrey Kretz
I'm going to go out on a limb and say there is very little difference between them. I suppose it is possible that the second function has a little bit more overhead, because it is declaring a jQuery element, then finding a second element. The first example doesn't do that. But both of these

[jQuery] Re: find.click vs bind(click)

2007-04-17 Thread spinnach
are the pages you load complete html pages (along with the head and body and all of that)? if yes, the pages you load through the .load function should contain only the html you want to load in the '#jobinfo' div.. if you're using php, jquery sets a header ('HTTP_X_REQUESTED_WITH') when

[jQuery] Re: find.click vs bind(click)

2007-04-17 Thread Shelane Enos
I changed to this: function loadEdit(){ var linkval = $j('#edit').attr(href); $j('#jobinfo').load(linkval); return false; } And added the function itself to my link. onclick=loadEdit(); The return false in the function isn't working. If I put it in the onclick (onclick=loadEdit();

[jQuery] Re: find.click vs bind(click)

2007-04-17 Thread John Resig
Do you have an example with a full page, there's probably another issue here. --John On 4/17/07, Shelane Enos [EMAIL PROTECTED] wrote: I changed to this: function loadEdit(){ var linkval = $j('#edit').attr(href); $j('#jobinfo').load(linkval); return false; } And added the

[jQuery] Re: find.click vs bind(click)

2007-04-17 Thread Ariel Jakobovits
From: Shelane Enos [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Tuesday, April 17, 2007 11:26:16 AM Subject: [jQuery] Re: find.click vs bind(click) Unfortunately this is an internal application. The jQuery code on the page is just this (I have the one function commented out b/c I