有没有办法翻译花式框中的工具提示,例如关闭按钮上的工具提示?
我已经在 afterShow 回调中将值更改为丹麦语并且似乎可以工作..或者有更好的方法来改变它吗?
<script type="text/javascript">
$(document).ready(function() {
$("a.mapoverlay").fancybox({
width : '90%',
height : '90%',
fixed: false,
autoSize : false,
autoCenter : true,
afterLoad : function() {
loadMap();
},
afterShow : function() {
$("a.fancybox-close").attr("title", "Luk");
}
});
});
</script>
编辑: 这段代码似乎工作正常。
我在写这篇文章时遇到了语法错误。我想你错过了什么?SyntaxError:意外的令牌}
我在这里看到了这篇文章:https ://github.com/fancyapps/fancyBox/issues/7
<script type="text/javascript">
$(document).ready(function() {
$("a.mapoverlay").fancybox({
width : '90%',
height : '90%',
fixed: false,
autoSize : false,
autoCenter : true,
afterLoad : function() {
loadMap();
},
tpl: {
closeBtn: '<div title="Test" class="fancybox-item fancybox-close"></div>'
}
});
});
</script>