See below

---------- Forwarded message ----------
From: Adrian Lynch <[EMAIL PROTECTED]>
Date: Sep 4, 2007 2:07 PM
Subject: [jQuery] Re: editable accessing clicked element for extraParam
To: "jQuery (English)" <jquery-en@googlegroups.com>



I came up with a clunky work around involving changing the editable
code which wasn't ideal. Talking to Dylan, he suggested doing the
following which works like a charm.

$(".editable").each(function(i) {

       $(this).editable("page-update.cfm?action=updatePageName", {
               paramName: "pageName",
               callback: doneUpdatingPageName,
               saving: "Saving... ",
               extraParams: {
                       pageID: this.id.split("-")[1]
               }
       });

});

Using each() to apply editable() to each element in turn.

On 9/14/07, Dylan Verheul <[EMAIL PROTECTED]> wrote:
> You should wrap your editable calls with an each(), ad assign the
> class names from there. Example code was posted to this list not too
> long ago, I'll see if I can find it for you.
>
> Dylan
>
> On 9/14/07, Zerutreck <[EMAIL PROTECTED]> wrote:
> >
> > I want to catch the name of the classroom that is being edited at the
> > moment , So that my script php knows of which div is come the
> > information.
> >
> > If div link 1 or div link 2 or div link3 that it was edited, I try
> > with the code, $('div').attr('class'), but he did not function
> >
> >
> > $(".link1, .link2, .link3, .link4").editable("http://localhost/somzoom/
> > index.php/admin/atualizaVideos/1/", {
> >                 id          : 'elementid',
> >                 name      : $('div').attr('class'),
> >                 submit    : 'Modificar',
> >                 indicator : "<img 
> > src='http://localhost/somzoom/img/load.gif'>",
> >                 tooltip   : 'Clique para editar...'
> >         });
> >
> > <div class='link1'>Link 1</div>
> > <div class='link2'>Link 2</div>
> > <div class='link3'>Link 3</div>
> > <div class='link4>Link 4</div>
> >
> > Thanxs,
> >
> > Hermes Alves
> > www.argohost.net
> >
> >
>

Reply via email to