jquery mobile ajax navigation,jQuery Mobile with flot and AJAX navigation

博主在尝试在一个jQuery Mobile项目中展示Flot生成的图表。当通过绝对路径直接访问页面时,图表显示正常,但使用jQuery Mobile的内置AJAX导航时,图表变得混乱。已尝试过其他论坛中提到的解决方案,但未能解决问题。由于禁用AJAX不是可行选项,博主寻求一种方法使jQuery Mobile和Flot能够协同工作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I am trying to display a flot generated chart in a jQuery Mobile project.

If I call the jQuery Mobile page by its absolute path (sth. like: http://server.com/graph/fancy.php) everything works fine, but as soon as I start using the jQM integrated AJAx navigation the chart looks scrambled.

I also found this other topic jquery mobile and flot library, but none of the described solutions do work for me.

Is there a way to get jQM and flot working together? Unfortunatelly disabling AJAX is also not an option.

The chart generation:

var data = [[0, 3], [4, 8], [8, 5], [9, 13]];

$(function () {

var plot = $.plot($("#chart"), [

{

label: "Oh hai",

data: data,

bars: { show: true }

}

]);

});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值