Re: [jQuery] Re initialise selectables

2007-03-04 Thread Priet

Did you found a solution yet? I've been asking myself the same question and
tried to fix it, but I didn't succeed.

Anyone who knows how to 'reinitialize' the selectables?

I've prepared a showcase: http://www.peterriet.net/temp/selectables/

Any help would be great! Thanks!


Peter Riet


floepi wrote:
 
 Hi,
 
 i am using ajax to search for users and call the selectables function on
 the found set afterwards. 
 
 function makeSelectable(){
   $('#mainWindow').Selectable(
   {
   accept : 'selectableitem',
   selectedclass : 'selecteditem',
   helperclass : 'selecthelper'
   }
   );
 }
 
 Though when i make another search and call Selectables again, i still get
 the helper class (the div that gets created and shows the nice drag
 window) but the new found set can't be selected any more. I guess there is
 already a selectables object in the dom and won't overwrite or something.
 Anybody knows how to solve this . 
 
 Thanks
 
 Phil
 

-- 
View this message in context: 
http://www.nabble.com/Re-initialise-selectables-tf2654220.html#a9294614
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] selectable not working after loading content through .load the second time

2007-03-03 Thread Priet

I am as well very interested in the alternate paint method of selecting
objects. Could you maybe e-mail it to [EMAIL PROTECTED]
Thanks!

I'm also having troubles reinitializing the selectables. I have made an
example page: http://www.peterriet.net/temp/selectables. After you reset the
items (or add one) the selecthelper is still working, but nothing can be
selected.

When I call this code again after resetting the HTML nothing happens: still
the items can't be selected:

$('div.msd').Selectable(
{
accept : 'selectableitem',
opacity : 0.2,
selectedclass : 'selecteditem',
helperclass : 'selecthelper'
}
);

Does anyone have an idea on how to solve this? Any help is appreciated.

Kind regards,


Peter Riet


floepi wrote:
 
 Hi Jason,
 
 send you the files to your gmail account. Did you get them ?
 
 Cheers
 
 Phil
 
 
 
 jason schleifer wrote:
 
 Heya phil!
 
 thanks for the feedback!  I noticed it got very slow if I had more than
 20
 items selectable.. which, of course, is what I want to do.. heh :)
 
 I'd  love to try the paint selection, if you've got time to send it my
 way!
 
 cheers!
 -jason
 
 On 12/12/06, floepi [EMAIL PROTECTED] wrote:


 Hi Jason,

 i had the same problem. If you include a script reinitialise
 selectables
 code /script at the end of the data you are loading, it should work. I
 assume that the onsuccess function is called before your newly loaded
 elements are registered in the dom. It is not slick but works.

 By the way - if you have a lot of elements, selectables tends to become
 very
 slow and unusable. Had to write my own version which works like paint
 selection in maya but is much faster. Give me a shout if you wanna try
 that
 at some point.

 Cheers

 Phil







 jason schleifer wrote:
 
  that's what I thought.. so the select command should work just fine..
 
 
  On 12/11/06, Chris Domigan [EMAIL PROTECTED] wrote:
 
 
  and if I go $(#content).load()
  
   does the stuff inside #content get deleted automatically?
 
 
 
  Yes - load() overwrites the contents of the element.
 
  Chris
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
 
 
 
  --
  jason schleifer
  ah-ni-may-tor | weirdo
  http://jonhandhisdog.com/
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context:
 http://www.nabble.com/selectable-not-working-after-loading-content-through-.load-the-second-time-tf2804253.html#a7836677
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 
 
 
 -- 
 jason schleifer
 ah-ni-may-tor | weirdo
 http://jonhandhisdog.com/
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/selectable-not-working-after-loading-content-through-.load-the-second-time-tf2804253.html#a9286482
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/