[jQuery] Re: Multiple elements slider

2010-01-19 Thread Mircea
Nathan,
It does work this way!
Thank you!


Re: [jQuery] Re: Multiple elements slider

2010-01-19 Thread Nathan Klatt
On Tue, Jan 19, 2010 at 3:12 PM, Mircea  wrote:
> This is strange,
> The element is selected after I had click and drag it, change its
> position. It have the class 'selected' dynamically added to it. If I
> create another static element Some text -
> the text resize work on that new element.

You need to have the selector inside of the handler - if you select
it, save it off in a variable, then reference the variable in the
handler, it will be referring to whatever met the selector when it was
executed. E.g.,

onChanging: function(percentage, e) {
   $(".resizeable").css('font-size', maxFont * percentage);

not

var resizeable = $(".resizeable");
onChanging: function(percentage, e) {
   resizeable.css('font-size', maxFont * percentage);

You know?

Just a thought.

Nathan


[jQuery] Re: Multiple elements slider

2010-01-19 Thread Mircea
This is strange,
The element is selected after I had click and drag it, change its
position. It have the class 'selected' dynamically added to it. If I
create another static element Some text -
the text resize work on that new element.


[jQuery] Re: Multiple elements slider

2010-01-19 Thread Mircea
Thanx Nathan,
I've set a class on the selected element and tell the slider to resize
text on that class. Firebug tells me that the class is set but does
nothing to the respective class...