how to apply jquery patch file
I googled for an issue in jQuery, and found patch file form jQuery site for that. I have downloaded it. It has jus the following 4 lines of code.
572c572
< if (inst.input[0].type != 'hidden')
---
> 开发者_如何学运维 if (inst.input[0].type != 'hidden' && inst.input[0].disabled == false && $(inst.input[0]).is(":visible") == true)
Could somebody help me to apply this fix in the existing jquery library. I tried searching for the above text in the library, but couldn't find it.
you have to change
if (inst.input[0].type != 'hidden')
to
if (inst.input[0].type != 'hidden' && inst.input[0].disabled == false && $(inst.input[0]).is(":visible") == true)
in your code. Whole code you posted is called "diff" output
Correct me if I'm wrong, but to do this you should first download a non-compressed version of the jQuery library (development), then search for this line of code
if (inst.input[0].type != 'hidden')
And replace it with this one
if (inst.input[0].type != 'hidden' && inst.input[0].disabled == false && $(inst.input[0]).is(":visible") == true)
Then save the new patched file and you may want to compress it again using one of the many compression tools avaiable online.
精彩评论