playframework - jQuery can't work with play framework -
i searched same problem , found this.
jquery not detected in play framework application
can't make sense solution problem. made same kind of questions.
develop environment
- play 2.3.8
- sbt 0.13.8
- java 1.8
- scala 2.11
- mac osx 10.9
- jquery 1.11.3
i'm new on play framework. tried use jquery in *.scala.html, can't work. checked browser can js file livehttp httpheader(304 status) code follwoing.
<body> @content <script src="@routes.assets.at("javascripts/jquery.min.js")"></script> <script src="@routes.assets.at("bootstrap/js/bootstrap.min.js")"></script> </body>
i know vague, jquery can use always. don't know tell , say.
if need more information, please tell me.
thank kindness.
add want use jquery.
<div id="c1" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> <div class="item active"> <div class="row"> <div class="col-xs-offset-2 col-xs-8"> <p class="lead"> <i>sample item</i> </p> <p class="lead text-right"> <i>sample, inc.</i> </p> </div> </div> </div> <div class="item"> <div class="row"> <div class="col-xs-offset-2 col-xs-8"> <p class="lead"> <i>sample2</i> </p> <p class="lead text-right"> <i>americaninitiative, inc.</i> </p> </div> </div> </div> </div> <!-- carousel button --> <a class="carousel-control left carousel-black" href="#c1" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="carousel-control right carousel-black" href="#c1" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div>
thank folks. finally, solve problem. i'll leave detail following.
conclusion :
- path of "bootstrap.min.js" wrong.
- there no problem using jquery play.
-- should check path of file.
detail :
i tried using jquery play via twitter bootstrap. like,
<div id="c1" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> <div class="item active"> <div class="row"> <div class="col-xs-offset-2 col-xs-8"> <p class="lead"> <i>sample item</i> </p> <p class="lead text-right"> <i>sample, inc.</i> </p> </div> </div> </div> <div class="item"> <div class="row"> <div class="col-xs-offset-2 col-xs-8"> <p class="lead"> <i>sample2</i> </p> <p class="lead text-right"> <i>americaninitiative, inc.</i> </p> </div> </div> </div> </div> <!-- carousel button --> <a class="carousel-control left carousel-black" href="#c1" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="carousel-control right carousel-black" href="#c1" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div>
and thus, need,
<head> ... <link rel="stylesheet" href="@routes.assets.at("my_bootstrap/css/bootstrap.min.css")" > ... </head> <body> @content <script src="@routes.assets.at("javascripts/jquery.min.js")"></script> <script src="@routes.assets.at("my_bootstrap/js/bootstrap.min.js")"></script> </body>
but, path of "bootstrap.min.js" wrong. both of "bootstrap.min.css" , "jquery.min.js" correct, it's hard recognize path problem of "bootstrap.min.js" me.
thanks again. see again on question ::)
Comments
Post a Comment