jQuery: The Write Less, Do More JavaScript Library

jeditable lazy load?

View: New views
3 Messages — Rating Filter:   Alert me  

jeditable lazy load?

by jan.vanvlimmeren@gmail.com :: Rate this Message:

| View Threaded | Show Only this Message


Hello,

Is it possible to lazy load jeditable on an element?

I have a grid which uses several edit in place fields.  The load time
on this is very high and I'm desperately trying to reduce it.

Is there a way that the edit in place is not set untill the field is
clicked for the first time?

Re: jeditable lazy load?

by Andras Kende :: Rate this Message:

| View Threaded | Show Only this Message


Hello,

I had a table with hundreds of edit in place, jeditable was very slow..
used this and its loads very quick:
http://www.davehauenstein.com/code/jquery-edit-in-place/example/

Andras Kende
http://www.kende.com/

-----Original Message-----
From: jquery-en@... [mailto:jquery-en@...] On
Behalf Of jan.vanvlimmeren@...
Sent: Friday, September 05, 2008 3:07 AM
To: jQuery (English)
Subject: [jQuery] jeditable lazy load?


Hello,

Is it possible to lazy load jeditable on an element?

I have a grid which uses several edit in place fields.  The load time
on this is very high and I'm desperately trying to reduce it.

Is there a way that the edit in place is not set untill the field is
clicked for the first time?


Re: jeditable lazy load?

by Mika Tuupola :: Rate this Message:

| View Threaded | Show Only this Message



On Sep 5, 2008, at 10:06 AM, jan.vanvlimmeren@... wrote:

> I have a grid which uses several edit in place fields.  The load time
> on this is very high and I'm desperately trying to reduce it.
>
> Is there a way that the edit in place is not set untill the field is
> clicked for the first time?


Just a wild idea, but seems to work. On click even it attaches  
Jeditable which is triggered using custom event called edit.

$(".editable").bind("click", function() {
     $(this).editable("http://www.example.com/save.php", {
         event : 'edit'
     }).trigger("edit");
});

Although you still bind click to several elements. You would be better  
off delegating event. Bind click to parent element and figure out  
later which child was clicked.

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