Skip to content

Instantly share code, notes, and snippets.

@totem3
Created December 15, 2011 01:09
Show Gist options
  • Save totem3/1479371 to your computer and use it in GitHub Desktop.
Save totem3/1479371 to your computer and use it in GitHub Desktop.
ajaxButtonのためのSnippet
class Foo {
def foo(xhtml:NodeSeq):NodeSeq = {
bind("foo", xhtml,
"button" -> ajaxButton("PressMe!", //ボタンに表示される文字列
()=>SetHtml("set-here", Text("FooBarBaz!")) //クリック時の処理。ここではidがset-hereのdiv要素に"FooBarBaz!"をセットする
)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment