Skip to content

Instantly share code, notes, and snippets.

@mrchrisadams
Created May 14, 2009 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrchrisadams/111584 to your computer and use it in GitHub Desktop.
Save mrchrisadams/111584 to your computer and use it in GitHub Desktop.
<div id="form_submit">
<input type="image" title="submit" src="/images/icons/submit.png" name="submit" id="submit" class="forward"/>
</div>
// currently undocumented, but presumably very handy method in YUI3
var GLOBAL = {
signupSwitchForward : function () {
signupSwitchForward: function() {
YUI().use("node", function(Y) {
Y.get('#sign_up_two').setStyle('display', 'none');
if (Y.get("#form_submit").insertHTML) {
Y.get("#form_submit").insertHTML('<a class="forward" href="#sign_up_one">Next step</a> <a class="back" href="#sign_up_one">Back</a>');
}
else {
Y.log("I can't find that method on the object");
}
if (Y.get('#submit')) {
Y.get('#submit').setStyle('display', 'none');
}
else {
Y.log("It ain't in the dom, bucko");
}
});
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment