小编Mik*_*ude的帖子

在jquery上禁用缓存

我在jstree节点上单击时使用jquery和jstree插件加载一些图像.看起来当我单击一个jstree节点时,它首先检查缓存,如果不在缓存中,则会发生noghting.我必须再次单击该节点以从服务器加载它.(如果缓存中的图像,第一次单击节点工作.)

因此,最终用户的行为不一致.第一次单击jstree节点,我应该去服务器检索图像并将其放入div中.我已经看了一段时间了,我无法想出任何解决方案.

我正在接触这个社区,也许有人以前见过这个并且可以提供帮助.

$(document).ready(function() {
    $("#div_tree").jstree({
        "xml_data": {
            "ajax": {
                "url": "tree.xml"
            },
            "xsl": "nest"
        },
        "plugins": ["themes", "xml_data", "ui", "types"]
    }).bind("select_node.jstree", function(event, data) {
        var node_id = data.rslt.obj.attr("id");
        if (node_id = "tree_a") {
            $("#mydiv").html(myPic1);
        }
Run Code Online (Sandbox Code Playgroud)

有没有一种快速的方法来禁用jquery缓存,所以每次我点击一个jstree节点,我都应该从服务器获取图像.

javascript jquery caching jstree

1
推荐指数
1
解决办法
9129
查看次数

ggplot没有图表

我已经看了一段时间了,有没有人看到这个ggplot语法有什么问题?我收到此错误:

Error: Discrete value supplied to continuous scale
Run Code Online (Sandbox Code Playgroud)

这是z:

     Month Value
1  2011-01-01    11
2  2011-02-01     5
3  2011-03-01     6
4  2011-04-01     6
5  2011-05-01     4
6  2011-06-01     5
7  2011-07-01     3
8  2011-08-01     9
9  2011-09-01    19
10 2011-10-01     3
11 2011-11-01     6
12 2011-12-01     2
13 2012-01-01     1
14 2012-02-01     4
15 2012-04-01     1
16 2012-05-01     2
17 2012-06-01    11
18 2012-07-01     5


ggplot(z, aes(Month, Value)) + 
  geom_bar(fill="orange",size=.3)  + 
  theme_bw() + scale_x_discrete(name="Date") +   
  scale_y_continuous("Number") +
  opts(title="Monthly issues", 
       axis.title.x …
Run Code Online (Sandbox Code Playgroud)

r ggplot2

1
推荐指数
1
解决办法
1113
查看次数

标签 统计

caching ×1

ggplot2 ×1

javascript ×1

jquery ×1

jstree ×1

r ×1