In your boot try this:

ResourceServer.allow {
  case "jquery-tabs.js" :: Nil => true
  case "jquery-ui-1.7.1.custom.min.js" :: Nil => true

}

On Apr 9, 12:17 am, glenn <gl...@exmbly.com> wrote:
> What am I doing wrong?
>
> I'm trying to implement tabs using the jquery-tabs.js (the JqueryTabs
> Plugin), but when I run the application, I get the following
> javascript error:
>
>    jQuery.Tabs is undefined  http://localhost:8080/Line 34
>
> I'm using the following snippet to create the jquery script
> initializing the tabs.
>
> class HomePage {
> def tabRender(selector: String, height: String, width: String, tabs:
> List[String], ids: List[String]) : NodeSeq = {
>
>     val onLoad = Unparsed("""
>                  $(document).ready(function() {
>                     jQuery.Tabs.initialize('"""+selector+"""', '"""+height
> +"""', '"""+width+"""',
>                        """ + JsArray(tabs.map(Str(_)):_*) + """, """ + JsArray
> (ids.map(Str(_)):_*) + """ );
>                   });
>                  """)
>
>     <head>
>        <script type="text/javascript" src={"/" +
> LiftRules.resourceServerPath + "/jquery-tabs.js"}></script>
>        <script type="text/javascript" src={"/" +
> LiftRules.resourceServerPath + "/jquery-ui-1.7.1.custom.min.js"}></
> script>
>        <script type="text/javascript" charset="utf-8">{onLoad}</
> script>
>      </head>
>   }
>
>   def renderTabs(xhtml: NodeSeq): NodeSeq = {
>      val ids = List("Page1", "Page2", "Page3")
>      val tabs = List("Tab1","Tab2", "Tab3")
>
>       tabRender("MyTabbedView","300px", "150px", tabs, ids )
>   }
>
> }
>
> My index.html is the following:
>
> <lift:surround with="default" at="content">
>    <lift:HomePage.renderTabs/>
>    <div id = "MyTabbedView"></div>
>    <div id = "Page1">Page 1<br/>Description of jQuery Tabs plugin</
> div>
>    <div id = "Page2">Page 2<br/>How to use this plugin</div>
>    <div id = "Page3">Page 3<br/>Download plugin</div>
> </lift:surround>
>
> I put the jquery-tabs.js file in src/main/resources/toserve.
>
> The returned source athttp://localhost:8080contains the following
> html:
>
> <script type="text/javascript" src="/classpath/jquery-tabs.js">
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html><body>The Requested URL /classpath/jquery-tabs.js was not found
> on this server</body></html>
>
> Any help on getting this to run would be appreciated.
>
> Glenn Silverman
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to