问题标签 [jquery-1.4]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1646 浏览

jquery - .attr('checked', 'checked') / .attr('checked', 'true') 不在 html 中添加属性

这是我的 JavaScript,使用 jQuery:

当它将数据从一个<div>( #E_DIV_H) 复制到另一个 DIV ( #copy) 时,它取消选中该复选框,由于以下代码,该复选框应该已经被选中!

使用 Firebug,我看到.attr('checked', 'checked')正在检查复选框而不添加属性。

有没有可以跨浏览器工作的解决方案?我正在使用 jQuery 1.4.2。

0 投票
1 回答
509 浏览

jquery - Check a radiobutton onload and expand the treeview accordingly using jquery

I have a treeview which is implemented using jquery Treeview version 1.4. TreeView is Implemented as below

What i need is ,onload the lastnode radiobutton to be checked and all its parent nodes to be expanded (note :there are multiple levels and radiobuttons in the tree).

Below is the code that i have used acheive this

This code works perfectly fine in terms of selecting the radiobutton and expanding the level-2 and level-1 nodes. Although the Image (+ or -) does not change. How can i achieve this

Thanks in Advance!!

0 投票
0 回答
769 浏览

jquery - 将 JQuery 3.1 加载到 Chrome 扩展程序中?

我的坏处:我有 webpack 用于这个项目的一个角度方面,破坏了我的 JQuery

我在处理 chrome 扩展时收到错误“$ 未定义”。

我可以让它在 JQuery 1.4 上正常工作,但不是 JQuery 3.1

我已按照这些链接中的说明进行操作

  1. chrome-extension-is-not-defined-error
  2. 将 jquery 加载到 chrome 扩展中
  3. 如何使用-jquery-in-chrome-extension
  4. chrome-extensions-uncaught-referenceerror-is-not-defined

这是失败代码的 ZIP

我已将以下日志条目添加到 JQUERY 文件的顶部和底部,以查看它们是否运行正常。

JQuery 3.1 失败

在此处输入图像描述

适用于 JQuery 1.4

在此处输入图像描述

JQuery 1.4 的清单文件(工作正常)

与以下相同,但"scripts/jquery-3.1.1.min.js"已更改为"scripts/jquery.js"

JQuery 3.1 的清单文件(不起作用)

内容脚本.js

0 投票
1 回答
85 浏览

jquery - jquery 1.4.2 和 chrome.. 检测到一个复选框被选中....怎么样?

因此,出于我无法控制的原因,我使用的是 jquery 1.4.2 和 chrome..

我在尝试检测复选框时遇到了可笑的麻烦……正在工作……

这是我所拥有的...

asp.net Mvc3生成的HTML

我试过的各种版本

在我开始跟踪之前,我已经尝试过其他人,以确保我不只是在兜圈子......

有谁知道我坚持使用的旧学校 jquery 的版本是什么?

0 投票
0 回答
15 浏览

jquery-1.4 - 使用 JS 变量作为 Jquery 1.4.4 的选择器时出现问题

我需要遍历一个 html(由 AJAX 加载)元素列表,这些元素除了最后一个字符外具有相同的 id。

所以我设置了一个这样的 jquery 选择器:

$('#selector_' + id).click(function(){...});

但是当我点击元素时,什么也没有发生。

我已经测试了几件事:

var selector = '#selector_' + id; $(selector).click(function(){...});=> 这不起作用,

var selector = '#selector_' + id.toString(); $(selector).click(function(){...});=> 这不起作用,

$('#selector_' + id.toString()).click(function(){...});=> 这不起作用,

$('#selector_0').click(function(){...});=> 正在工作,

似乎 Jquery 不允许在此处使用连接,尽管事实上我在项目的其他部分中使用了这种技术,没有任何问题。

我希望你能解决这个问题。

谢谢你。