Created
December 2, 2010 14:38
-
-
Save mads-hartmann/725432 to your computer and use it in GitHub Desktop.
Shows how to use JqAttr (Lift)
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
package sidewayscoding.example | |
// normal imports goes here | |
import net.liftweb.http.js.JE._ // implicit string => Str | |
import net.liftweb.http.js.JsCmds._ // implicit JsExp => JsCmd | |
import net.liftweb.http.js.jquery.JqJE.{JqId,JqAttr, Jq} | |
class Test { | |
def test = | |
"#test *" #> a( () => JqId("myid") ~> JqAttr("class","lolcat"), Text("clickme")) | |
} |
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
<div class="lift:surround?with=default;at=content"> | |
<div class="lift:Test.test"> | |
<span id="myid">this will get changed</span> | |
<span id="test">link</span> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment