Skip to content

Commit cfd45c5

Browse files
Update README.md
1 parent 27a6abf commit cfd45c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function switch_lang(hide_lan, show_lan){
3636
}
3737
```
3838
Then I quickly found that the user with javascript disabled or slow load in would result in seeing the [original HTML](https://chienhsiang-hung.github.io/javascript-language-switcher/) w/ multiple langs not being hidden.
39+
3940
So I've tried to initialize the hidden lang by set CSS `visible` to `hidden`.
4041
### CSS Visibility
4142
```css
@@ -53,6 +54,7 @@ Result: [Simple JavaScript Language Switcher w/ css display (chienhsiang-hung.gi
5354

5455
## How to use it
5556
*The example was shown for TW-EN site.*
57+
5658
Set up your HTML like [this](https://chienhsiang-hung.github.io/javascript-language-switcher/css-display.html):
5759
```html
5860
<h1 class="mt-5 en">Simple JavaScript Language Switcher w/ css display</h1>
@@ -67,3 +69,6 @@ And this in `<body>` part of you HTML:
6769
```html
6870
<script src='https://chienhsiang-hung.github.io/javascript-language-switcher/src/js/switch-lang-no-onload.js'></script>
6971
```
72+
73+
## Support
74+
It's always appreciated if you would like to [buy me a cofee](https://ko-fi.com/chienhsianghung) to support this API. Thank you :)

0 commit comments

Comments
 (0)