Locale switcher with theme using css and javascript

General Add comments
SocialTwist Tell-a-Friend

I made small css based locale switcher with theme. You can see the demo here. In this example, common.css has generic style definations for page elements. gray.css has india locale and gray theme style definations. yellow.css has US locale and yellow theme style definations. Below 3 lines of javascript code will switch locale as well as theme.

<script>
function changeTheme(){
    var obj = document.getElementById("themeContainer"); 
    obj.className = (obj.className=='gray')?'yellow':'gray'; 
}
</script>

US locale - yellow themeIndia locale - gray theme

you can download this example here.

0 responses to “Locale switcher with theme using css and javascript”

Leave a Reply

*** Please do not post spam. All comments require moderation,
So it may take some time to post to this blog! ***





Powered by Mango Blog. Design and Icons by N.Design Studio