[Koha] Multiple Statements
Chris Cormack
chrisc at catalyst.net.nz
Mon Aug 11 20:51:41 NZST 2014
* Chrispin Simasiku Sitali (libsitali at gmail.com) wrote:
> Greetings to all,
>
> How would I add multiple statements in opacuserjs. e.g.
>
> $(document).ready(function(){
> $("#auth legend:contains('Log in to your account')").text("Log in to your
> library account");
> $("#auth label[for='userid']").html("Library Card Number:");
> $("#auth label[for='password']").html("PIN:");
> });
>
>
> $(document).ready(function(){
> var holdlinks = $("a:contains('Place Hold'),a:contains('Place hold')");
> $(holdlinks).text("Get It Now!");
> });
> $(window).load(function(){
> $("input[value='Place Hold']").attr("value","Get It Now!");
>
>
>
>
> $(document).ready(function(){
> $("a:contains('Browse Shelf')").text("See Similar Items");
> });
>
Hi Crispin
You should only ever have one $document.ready so you can put this together as one block
$(document).ready(function(){
$("#auth legend:contains('Log in to your account')").text("Log in to your library account");
$("#auth label[for='userid']").html("Library Card Number:");
$("#auth label[for='password']").html("PIN:");
var holdlinks = $("a:contains('Place Hold'),a:contains('Place hold')");
$(holdlinks).text("Get It Now!");
$("a:contains('Browse Shelf')").text("See Similar Items");
});
$(window).load(function(){
$("input[value='Place Hold']").attr("value","Get It Now!");
Chris
--
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand
More information about the Koha
mailing list