Created
October 29, 2013 19:07
-
-
Save alnutile/7220714 to your computer and use it in GitHub Desktop.
Example needs tons of work though
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
Drupal.settings.lang = {}; | |
Drupal.settings.lang.test1 = "test1"; | |
Drupal.settings.lang.test2 = "test2"; | |
console.log(janrain.settings.language); | |
if(janrain.settings.language == 'en-US') { | |
console.log("Language matches"); | |
//Make this an array so it is auto hide | |
jQuery('.ru-RU').hide(); | |
}; | |
if(janrain.settings.language == 'ru-RU') { | |
console.log("Language matches"); | |
//Make this an array so it is auto hide | |
jQuery('.en-US').hide(); | |
}; | |
jQuery('#choose-lang').live('change', function(){ | |
var lang = $(':selected', this).val(); | |
jQuery('.en-US').toggle(); | |
jQuery('.ru-RU').toggle(); | |
}); | |
}); | |
</script> | |
<div style="display:none;" id="signIn"> | |
<div class="capture_header"> | |
</div> | |
<div class="choose"> | |
<label for="choose-lang">Choose Language</label> | |
<select name="select-lang" id="choose-lang"> | |
<option value="en-US">US</option> | |
<option value="ru-RU">Russian</option> | |
</select> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment