Thanks Gerolf Seitz for adding animator.js functionality to wicket-stuff.

I need a bit of help: Can anyone let me know how to implement a
JavascriptSubject style subject?
I have NumericalStyleSubject and CssStyleSubject animating a div nicely but
I would love to add, for example something similar to this bit of javascript
from the berniecode.com site:

function updateButton(value) {
    $('ex1Button').innerHTML = "Progress: " + Math.round(value * 100) + "%";
}

It seems that JavascriptSubject style subject is meant for this purpose
however

animJS.addSubject(new JavascriptSubject() {

          protected String getFunctionBody() {
                        
               return "[Wicket.$('"+progBar.getMarkupId()+"').innerHTML =
\"Progress: \" + Math.round(value *    100) + \"%\"]";
                    }
});

gives me errors.

Any help for a javascript and Wicket beginner appreciated

Nick

PS Is it possible to use animate with a timer rather than a javascript
event?


-- 
View this message in context: 
http://www.nabble.com/Wicket-stuff-Animator-JavascriptSubject-tf4536756.html#a12948411
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to