[Koha] jQuery: Change default active tab in borrower account page

Kyle Hall kyle.m.hall at gmail.com
Sat Mar 21 00:52:07 NZDT 2015


This should work in theory, but my href.replace line isn't working:

$( document ).ready(function() {
    var a = $("#menu a[href*='/cgi-bin/koha/members/pay.pl']");
    var href = a.attr('href');
    href.replace("pay", "boraccount");
    a.attr('href', href );
});

Perhaps someone else can catch my error?

If you get it to work, please add it to the jquery library!

Kyle

http://www.kylehall.info
ByWater Solutions ( http://bywatersolutions.com )
Meadville Public Library ( http://www.meadvillelibrary.org )
Crawford County Federated Library System ( http://www.ccfls.org )
Mill Run Technology Solutions ( http://millruntech.com )

On Thu, Mar 19, 2015 at 7:17 PM, Chad Roseburg <croseburg at ncrl.org> wrote:

> Currently, the patron fines link in the staff interface links to:
> Eg.,
> http://koha.testing.com/cgi-bin/koha/members/pay.pl?borrowernumber=611739
>
> We're wondering if it's possible, through the magic of jQuery, to have it
> link to:
>
> http://koha.ncrl.org/cgi-bin/koha/members/boraccount.pl?borrowernumber=611739
>
> I looked through the jQuery library and did not find anything that could be
> coaxed to do this -- the only tricky part would be grabbing the borrower
> number. I could figure out the rest.
>
> Thanks!
>
> --
> Chad Roseburg
> Automation Dept.
> North Central Regional Library
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list