Đoạn code có sử dụng tệp jQuery 1.4.2. Hãy gỡ bỏ tệp này nếu website của bạn đã tồn tại phiên bản này hoặc cao hơn.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'></script>
<script src='http://jquery-translate.googlecode.com/files/jquery.translate-1.3.9.min.js' type='text/javascript'></script>
<script type='text/javascript'>
//<![CDATA[
jQuery.cookie=function(key,value,options){if(arguments.length>1&&(value===null||typeof value!=="object")){options=jQuery.extend({},options);if(value===null){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
return(document.cookie=[encodeURIComponent(key),'=',options.raw?String(value):encodeURIComponent(String(value)),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};
//]]>
</script>
<script type='text/javascript'>var date=new Date();date.setTime(date.getTime()+(86400*360));$(function(){if($.cookie('lang')=='EN'){lanEN();}
if($.cookie('lang')=='VI'){lanVN();}
if($.cookie('lang')=='JP'){lanJP();}
if($.cookie('lang')=='ES'){lanES();}
if($.cookie('lang')=='FR'){lanFR();}})
function lanVN(){$('body').translate('vietnamese');$.cookie('lang','VN',{path:'/',expires:date});}
function lanEN(){$('body').translate('english');$.cookie('lang','EN',{path:'/',expires:date});}
function lanJP(){$('body').translate('japanese');$.cookie('lang','JP',{path:'/',expires:date});}
function lanES(){$('body').translate('Spanish');$.cookie('lang','ES',{path:'/',expires:date});}
function lanFR(){$('body').translate('French');$.cookie('lang','FR',{path:'/',expires:date});}
$(function(){$("#slide_item_vip").carousel({direction:"vertical",loop:true,autoSlideInterval:5000,dispItems:5,autoSlide:true});$(".button_down").click(function(){$(".carousel-next").click();});$(".button_up").click(function(){$(".carousel-previous").click();});})</script>
<div id="lang" style="margin-left:10px;">
<a onclick="lanEN()" href="javascript:void(0)" title="English"><img alt="English" style="border:none;" src="http://ca0.upanh.com/13.626.17844084.goM0/code1kcomunitedkingdom.png" /></a>
<a onclick="lanVN()" href="javascript:void(0)" title="Vietnamese"><img alt="Vietnamese" style="border:none;" src="http://ca0.upanh.com/13.626.17844085.iV0/code1kcomvietnam.png" /></a>
<a onclick="lanJP()" href="javascript:void(0)" title="Japanese"><img alt="Japanese" style="border:none;" src="http://ca0.upanh.com/13.626.17844082.YEu0/code1kcomjapan.png" /></a>
<a onclick="lanES()" href="javascript:void(0)" title="Español"><img alt="Spanish" style="border:none;" src="http://ca0.upanh.com/13.626.17844083.oON0/code1kcomspain.png" /></a>
<a onclick="lanFR()" href="javascript:void(0)" title="French"><img alt="French" style="border:none;" src="http://ca0.upanh.com/13.626.17844081.8Na0/code1kcomfrance.png" /></a>
</div>
0 nhận xét:
Đăng nhận xét