On Thursday, October 25, 2012 at 1:45 PM, andr
...@officenet.no wrote:
> På torsdag 25. oktober 2012 kl. 12:23:06, skrev Roch Delsalle <rdelsa
...@gmail.com (mailto:rdelsa
...@gmail.com)>:
> > Hi,
> > I'm using Lift's autocomplete widget a lot in some parts of my website,
> > I would like to know if there is any way I can get rid of the <span> thats appearing around my input text :
> > <span class="product" size="16" type="text">
> > <link type="text/css" rel="stylesheet" href="/classpath/autocomplete/jquery.autocomplete.css">
> > <input type="text" value="" id="F4641319815512IPJBJ" autocomplete="off" class="ac_input">
> > <input name="F4641319815525IP1WI" type="hidden" value="" id="F4641319815525IP1WI">
> > </span>
> > I'm adding the AutoComplete to ".product" using a CssSel (I don't have this issue when I call the autocomplete directly into the template but I have to pass parameters this time),
> > Thanks for your help,
> def hideParent(sel: CssSel): CssSel = {
> "*" #> ((ns: NodeSeq) => PassThru(sel(ns.head.child)))
> }
> val xml = <div class="outer"><input type="text"/></div>
> (".outer" #> hideParent(":text" #> <input type="text" name="struts" value=""/>)).apply(xml)
> res3: scala.xml.NodeSeq = NodeSeq(<input value="" type="text" name="struts" class="outer"></input>)
> without hideParent:
> (".outer" #> (":text" #> <input type="text" name="struts" value=""/>)).apply(xml)
> res4: scala.xml.NodeSeq = NodeSeq(<div class="outer"><input value="" type="text" name="struts"></input></div>)
> --
> Andreas Joseph Krogh <andr...@officenet.no (mailto:andr...@officenet.no)> mob: +47 909 56 963
> Senior Software Developer / CEO - OfficeNet AS - http://www.officenet.no
> Public key: http://home.officenet.no/~andreak/public_key.asc
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code