Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. checkLang();
  2.  
  3. function checkLang(){
  4. if (jQuery('.LanguageSelector').val() == 'en-US'){
  5. hideFrench();
  6. }else if (jQuery('.LanguageSelector').val() == 'fr-FR'){
  7. hideEnglish();
  8. }
  9. }
  10.  
  11. function hideEnglish(){
  12. jQuery('.iMIS-WebPart').each(function(index,key) {
  13. var id = jQuery(key).children('div').attr('id');
  14. var isEnglish = id.match(/LANGEN/g);
  15. if (id && isEnglish){
  16. jQuery(key).children('#' + id).css('display','none');
  17. return false;
  18. }
  19. });
  20. }
  21.  
  22. function hideFrench(){
  23. jQuery('.iMIS-WebPart').each(function(index,key) {
  24. var id = jQuery(key).children('div').attr('id');
  25. var isFrench = id.match(/LANGFR/g);
  26. if (id && isFrench){
  27. jQuery(key).children('#' + id).css('display','none');
  28. return false;
  29. }
  30. });
  31. }
  32.  
  33. removeLanguages();
  34.  
  35. function removeLanguages(){
  36. jQuery(".LanguageSelector option[value='es-ES']").remove();
  37. jQuery(".LanguageSelector option[value='nl-NL']").remove();
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement