Javascript Firefox和Chrome中的noty窗口大小不同
我想调整提交表单时显示的“noty”窗口的大小-使文本字体和窗口大小变大 “noty”代码如下所示:Javascript Firefox和Chrome中的noty窗口大小不同,javascript,google-chrome,firefox,noty,Javascript,Google Chrome,Firefox,Noty,我想调整提交表单时显示的“noty”窗口的大小-使文本字体和窗口大小变大 “noty”代码如下所示: <script> $(function() { $('#task-form').submit(function() { $(this).find('.submit').val('Saving...'); $.post('biomed/default/save', $('#task-form')
<script>
$(function()
{
$('#task-form').submit(function()
{
$(this).find('.submit').val('Saving...');
$.post('biomed/default/save', $('#task-form').serialize(), function(data)
{
if (data.isValid)
{
$(".btn").attr("disabled", true);
noty
({
layout:'center',
text:'Your task #'+data.timestamp+' has been submitted. Redirecting... ',
type:'success'
});
setTimeout(function() {window.location = "biomed/progress?task_id="+data.timestamp; }, 5000);
}
....
....
....
....
</script>
结果:这在Firefox中有效,但在Chome中不起作用,也就是说,我现在在Firefox中提交时看到一个大窗口,具有大的可读字体,在Chrome中提交时看到默认的小字体
请建议一种解决方法,即我希望它在两种浏览器中都能以相同的方式工作。好的,我知道发生了什么-谷歌浏览器从它自己(谷歌浏览器)的本地缓存中获取了noty设置。这就是为什么我对服务器上文件的操作从未在Chrome浏览器中进行过任何更改。清理缓存(历史->清除->缓存数据)对我很有效-现在我可以看到对我的站点所做的更改
container: {
object: '<ul id="noty_center_layout_container" />',
selector: 'ul#noty_center_layout_container',
style: function() {
$(this).css({
width: '800px', <- HERE
....
css: {
display: 'none',
width: '800px' <- HERE
},
switch (this.options.layout.name) {
case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
this.$bar.css({
borderRadius: '5px',
border: '1px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
HERE -> this.$message.css({fontSize: '32px', lineHeight: '40px', textAlign: 'center'});
break;