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