SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit d5170f61 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Update spec selection js

parent e20186f0
No related branches found
No related tags found
No related merge requests found
...@@ -5,16 +5,24 @@ $(document).ready(function(){ ...@@ -5,16 +5,24 @@ $(document).ready(function(){
switch(selection){ switch(selection){
case "physics": case "physics":
$("#id_expertises_0").closest("li").show(); $('li:contains("Physics")').filter(function(){
return $(this).text().indexOf('Physics') == 0;}).show();
break; break;
case "astrophysics": case "astrophysics":
$("#id_expertises_1").closest("li").show(); $('li:contains("Astrophysics")').filter(function(){
return $(this).text().indexOf('Astrophysics') == 0;}).show();
break; break;
case "mathematics": case "mathematics":
$("#id_expertises_2").closest("li").show(); $('li:contains("Mathematics")').filter(function(){
return $(this).text().indexOf('Mathematics') == 0;}).show();
break;
case "chemistry":
$('li:contains("Chemistry")').filter(function(){
return $(this).text().indexOf('Chemistry') == 0;}).show();
break; break;
case "computerscience": case "computerscience":
$("#id_expertises_3").closest("li").show(); $('li:contains("Computer Science")').filter(function(){
return $(this).text().indexOf('Computer Science') == 0;}).show();
break; break;
default: default:
$("ul[id^='id_expertises_']").closest("li").show(); $("ul[id^='id_expertises_']").closest("li").show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment