[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-10-01 Thread Wayne

Wow! Hey, that actually worked. I don't fully understand why, though.
I thought that clone(true) simply allowed for jQuery to grab a clone
from the new clone. Does livequery duplicate or interfere with that
procedure?

Thanks for digging into my code, Brandon. I seem to be working, now.

-Wayne

On Sep 29, 10:31 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> After glancing over the JS it looks like you are using both live query and
> clone(true). Using both is unnecessary and might be the cause of the issue.
> Just try using one of the two and see if that resolves your issue.
> --
> Brandon Aaron
>
> On Mon, Sep 29, 2008 at 2:04 PM, Wayne <[EMAIL PROTECTED]> wrote:
>
> > On Sep 29, 1:25 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> > > In layman's terms. After clicking baseline the new item is still
> > > editable, but the problem is when triggering the event it also makes
> > > not only the clicked element but also previous element editable.
>
> > > Is this your problem?
>
> > Right, because I'm cloning the ":last" li of the list, that's the
> > element that the editable latches onto. In the example linked, it's
> > the caption tag of each table within the li.
>
> > -Wayne
>
>


[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-29 Thread Brandon Aaron
After glancing over the JS it looks like you are using both live query and
clone(true). Using both is unnecessary and might be the cause of the issue.
Just try using one of the two and see if that resolves your issue.
--
Brandon Aaron

On Mon, Sep 29, 2008 at 2:04 PM, Wayne <[EMAIL PROTECTED]> wrote:

>
> On Sep 29, 1:25 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> > In layman's terms. After clicking baseline the new item is still
> > editable, but the problem is when triggering the event it also makes
> > not only the clicked element but also previous element editable.
> >
> > Is this your problem?
>
> Right, because I'm cloning the ":last" li of the list, that's the
> element that the editable latches onto. In the example linked, it's
> the caption tag of each table within the li.
>
> -Wayne
>


[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-29 Thread Wayne

On Sep 29, 1:25 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> In layman's terms. After clicking baseline the new item is still  
> editable, but the problem is when triggering the event it also makes  
> not only the clicked element but also previous element editable.
>
> Is this your problem?

Right, because I'm cloning the ":last" li of the list, that's the
element that the editable latches onto. In the example linked, it's
the caption tag of each table within the li.

-Wayne


[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-29 Thread Mika Tuupola



On Sep 29, 2008, at 7:30 PM, Wayne wrote:


Here's an example that I cut out of the project:
http://dev.ficclaims.com/perf/proj/test.php

When you click the link to "Add another baseline" that's when the
clone will be made, and you can see how it works from there. The way I
understand it, livequery should be dynamically unbinding and rebinding
that jEditable function, but for some reason, I don't see it doing
that.



In layman's terms. After clicking baseline the new item is still  
editable, but the problem is when triggering the event it also makes  
not only the clicked element but also previous element editable.


Is this your problem?

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



[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-29 Thread Wayne

I may have phrased it poorly, but, for my needs, the livequery
function would probably work. However, any method that I try still
seems to be binding the jEditable onto both the clone and the
original. That is, if I click on the clone to edit it, it opens
jEditable forms on both the original and the clone, and when I submit,
it will only submit AJAX data based on the original element.

Here's an example that I cut out of the project:
http://dev.ficclaims.com/perf/proj/test.php

When you click the link to "Add another baseline" that's when the
clone will be made, and you can see how it works from there. The way I
understand it, livequery should be dynamically unbinding and rebinding
that jEditable function, but for some reason, I don't see it doing
that.

Any insight is appreciated.

-Wayne

On Sep 28, 3:48 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> On Sep 27, 2008, at 11:39 PM, Brandon Aaron wrote:
>
> I understood he was binding Jeditable to event called  
> "editable" (which is possible). So the question would have been does  
> LiveQuery handle other than inbuilt jQuery events?
>
> Although maybe misunderstood the original question.
>
>
>
> > Quickly looking over the jEditable docs, 'editable' isn't an actual  
> > event. You can instead use a function based live query like this:
>
> > $('.editable, .bline_measure caption').livequery(function(){
> >     $(this).editable(function(value, settings) { ... });
> > });
>
> > --
> > Brandon Aaron
>
> > On Fri, Sep 26, 2008 at 4:24 PM, Wayne <[EMAIL PROTECTED]> wrote:
>
> > I was trying to put livequery in place on the site, but it seems to
> > attach to pre-known events, like click, instead of new events, like
> > editable.
>
> > For instance, I'm trying to do this:
>
> >                $(".editable, .bline_measure  
> > caption").livequery("editable",
> > function(value, settings) {
>
> > Wanting to watch these items and rebind editable to the newly created
> > captions when I clone them. Is this not a good job for livequery?
>
> --
> Mika Tuupolahttp://www.appelsiini.net/


[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-28 Thread Brandon Aaron
Ahh ... I guess I just misunderstood :)  Yes it is possible to use LiveQuery
to bind custom events using LiveQuery.
--
Brandon Aaron

On Sun, Sep 28, 2008 at 2:48 PM, Mika Tuupola <[EMAIL PROTECTED]>wrote:

>
>
> On Sep 27, 2008, at 11:39 PM, Brandon Aaron wrote:
>
> I understood he was binding Jeditable to event called "editable" (which is
> possible). So the question would have been does LiveQuery handle other than
> inbuilt jQuery events?
>
> Although maybe misunderstood the original question.
>
>  Quickly looking over the jEditable docs, 'editable' isn't an actual event.
>> You can instead use a function based live query like this:
>>
>> $('.editable, .bline_measure caption').livequery(function(){
>>$(this).editable(function(value, settings) { ... });
>> });
>>
>> --
>> Brandon Aaron
>>
>> On Fri, Sep 26, 2008 at 4:24 PM, Wayne <[EMAIL PROTECTED]> wrote:
>>
>> I was trying to put livequery in place on the site, but it seems to
>> attach to pre-known events, like click, instead of new events, like
>> editable.
>>
>> For instance, I'm trying to do this:
>>
>>   $(".editable, .bline_measure caption").livequery("editable",
>> function(value, settings) {
>>
>>
>> Wanting to watch these items and rebind editable to the newly created
>> captions when I clone them. Is this not a good job for livequery?
>>
>
> --
> Mika Tuupola
> http://www.appelsiini.net/
>
>


[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-28 Thread Mika Tuupola



On Sep 27, 2008, at 11:39 PM, Brandon Aaron wrote:

I understood he was binding Jeditable to event called  
"editable" (which is possible). So the question would have been does  
LiveQuery handle other than inbuilt jQuery events?


Although maybe misunderstood the original question.

Quickly looking over the jEditable docs, 'editable' isn't an actual  
event. You can instead use a function based live query like this:


$('.editable, .bline_measure caption').livequery(function(){
$(this).editable(function(value, settings) { ... });
});

--
Brandon Aaron

On Fri, Sep 26, 2008 at 4:24 PM, Wayne <[EMAIL PROTECTED]> wrote:

I was trying to put livequery in place on the site, but it seems to
attach to pre-known events, like click, instead of new events, like
editable.

For instance, I'm trying to do this:

   $(".editable, .bline_measure  
caption").livequery("editable",

function(value, settings) {


Wanting to watch these items and rebind editable to the newly created
captions when I clone them. Is this not a good job for livequery?


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



[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-27 Thread Brandon Aaron
Quickly looking over the jEditable docs, 'editable' isn't an actual event.
You can instead use a function based live query like this:

$('.editable, .bline_measure caption').livequery(function(){
$(this).editable(function(value, settings) { ... });
});

--
Brandon Aaron

On Fri, Sep 26, 2008 at 4:24 PM, Wayne <[EMAIL PROTECTED]> wrote:

>
> I was trying to put livequery in place on the site, but it seems to
> attach to pre-known events, like click, instead of new events, like
> editable.
>
> For instance, I'm trying to do this:
>
>$(".editable, .bline_measure caption").livequery("editable",
> function(value, settings) {
>
>
> Wanting to watch these items and rebind editable to the newly created
> captions when I clone them. Is this not a good job for livequery?
>
> -Wayne
>
> On Sep 22, 9:06 am, Wayne <[EMAIL PROTECTED]> wrote:
> > Thanks, Mike. This info helps. Great work, btw.
> >
> > -Wayne
> >
> > On Sep 20, 12:22 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> >
> > > On Sep 19, 2008, at 6:20 PM, Wayne wrote:
> >
> > > > In short, I can clone jEditable items, but I can't edit them in place
> > > > without a page reload and rewriting from the server side. Am I
> > > > ignoring something or do I need to reset a binding somewhere when I
> do
> > > > the DOM modification?
> >
> > > This should help:
> >
> > >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st.
> ..
> >
> > > basically you need to rebind events to cloned elements.
> >
> > > --
> > > Mika Tuupolahttp://www.appelsiini.net/
>


[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-27 Thread Mika Tuupola



On Sep 27, 2008, at 12:24 AM, Wayne wrote:


I was trying to put livequery in place on the site, but it seems to
attach to pre-known events, like click, instead of new events, like
editable.



Brandon would be the correct person to answer this. He knows the  
internals on livquery the best.



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



[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?

2008-09-26 Thread Wayne

I was trying to put livequery in place on the site, but it seems to
attach to pre-known events, like click, instead of new events, like
editable.

For instance, I'm trying to do this:

$(".editable, .bline_measure caption").livequery("editable",
function(value, settings) {


Wanting to watch these items and rebind editable to the newly created
captions when I clone them. Is this not a good job for livequery?

-Wayne

On Sep 22, 9:06 am, Wayne <[EMAIL PROTECTED]> wrote:
> Thanks, Mike. This info helps. Great work, btw.
>
> -Wayne
>
> On Sep 20, 12:22 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
>
> > On Sep 19, 2008, at 6:20 PM, Wayne wrote:
>
> > > In short, I can clone jEditable items, but I can't edit them in place
> > > without a page reload and rewriting from the server side. Am I
> > > ignoring something or do I need to reset a binding somewhere when I do
> > > the DOM modification?
>
> > This should help:
>
> >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> > basically you need to rebind events to cloned elements.
>
> > --
> > Mika Tuupolahttp://www.appelsiini.net/


[jQuery] Re: jEditable Clone Referring to the Original Element

2008-09-22 Thread Wayne

Thanks, Mike. This info helps. Great work, btw.

-Wayne

On Sep 20, 12:22 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> On Sep 19, 2008, at 6:20 PM, Wayne wrote:
>
> > In short, I can clone jEditable items, but I can't edit them in place
> > without a page reload and rewriting from the server side. Am I
> > ignoring something or do I need to reset a binding somewhere when I do
> > the DOM modification?
>
> This should help:
>
> http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> basically you need to rebind events to cloned elements.
>
> --
> Mika Tuupolahttp://www.appelsiini.net/


[jQuery] Re: jEditable Clone Referring to the Original Element

2008-09-20 Thread Mika Tuupola



On Sep 19, 2008, at 6:20 PM, Wayne wrote:


In short, I can clone jEditable items, but I can't edit them in place
without a page reload and rewriting from the server side. Am I
ignoring something or do I need to reset a binding somewhere when I do
the DOM modification?



This should help:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

basically you need to rebind events to cloned elements.

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