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
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
@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
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
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
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;
});
}
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
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
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();
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
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
11 matches
Mail list logo