Much faster and simple : each page (intranet and opac) has an id on the
body :
For example for mainpage :
$(document).ready(function(){
$("body#main_intranet-main #header_search
a[href='#catalog_search']").click();
});
Le 03/06/2014 15:19, Nicole Engard a écrit :
On Tue, Jun 3, 2014 at 12:58 AM, Fridolin SOMERS <
fridolin.som...@biblibre.com> wrote:
$(document).ready(function(){
$("#header_search a[href='#catalog_search']").click();
});
That works on every page in the staff client, but if I wanted it to work on
the main page only so I edited it like this:
$(document).ready(function(){
if (window.location.href.indexOf("cgi-bin/koha/mainpage.pl") > -1) {
$("#header_search a[href='#catalog_search']").click();
}
});
And it's perfect!!! Thanks Fridolin!
--
Fridolin SOMERS
Biblibre - Pôles support et système
fridolin.som...@biblibre.com
_______________________________________________
Koha mailing list http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha