Created
December 16, 2011 15:03
-
-
Save totem3/1486380 to your computer and use it in GitHub Desktop.
CSS Selector便利。。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<lift:surround with="default" at="content"> | |
<lift:CssSelectorTest.selector> | |
<div id="button" /> | |
<div class="text" /> | |
<div name="input" /> | |
<div class="text2" /> | |
<span>spanですよ。 </span><br/> | |
<button>ボタン!</button> | |
</lift:CssSelectorTest.selector> | |
</lift:surround> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CssSelectorTest { | |
val alert = Run("alert('まじかよ!')") | |
val unitToAlert = () => alert | |
val strToAlert = (s:String) => alert | |
def selector = { | |
".text" #> <p>文字列でも?</p> & | |
"#button" #> ajaxButton("ボタンも置けるの?", unitToAlert) & | |
"@input" #> ajaxText("これも??", (s:String) => alert) & | |
".text2 *+" #> "置き換わっちゃうのもこうすれば!!" & | |
"button" #> "元ボタンです" & | |
"span *+" #> "Lift Cool! Awesome!!" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment