如何应用jquery补丁文件

时间:2011-08-24 13:57:59

标签: jquery

我在jQuery中搜索了一个问题,并找到了jQuery网站的补丁文件。我已经下载了它。它有以下4行代码。

572c572
<           if (inst.input[0].type != 'hidden')
---
>           if (inst.input[0].type != 'hidden' && inst.input[0].disabled == false     && $(inst.input[0]).is(":visible") == true)

有人可以帮助我在现有的jquery库中应用此修复程序。我试图在库中搜索上面的文本,但找不到它。

2 个答案:

答案 0 :(得分:3)

你必须改变

       if (inst.input[0].type != 'hidden')

       if (inst.input[0].type != 'hidden' && inst.input[0].disabled == false && $(inst.input[0]).is(":visible") == true)
你的代码中的

。您发布的整个代码称为“diff”输出

答案 1 :(得分:0)

如果我错了,请纠正我,但要做到这一点,你应首先下载一个非压缩版本的jQuery库(开发),然后搜索这行代码

if (inst.input[0].type != 'hidden')

用这个替换它

if (inst.input[0].type != 'hidden' && inst.input[0].disabled == false     && $(inst.input[0]).is(":visible") == true)

然后保存新的修补文件,您可能希望使用在线可用的众多压缩工具之一再次压缩它。